/*
 * Styles personnalisés pour Synap's+
 * Utilise Bootstrap 5 comme base
 */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.16);
}

/* ============================================
   BASE & GLOBAL
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Empêcher la coupure des mots */
p, li, td, th, span, div, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Page entrance animation */
main > section:first-child,
main > .container:first-child,
main > .container-fluid:first-child {
    animation: pageEnter 0.4s ease-out;
}

/* Global focus-visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible, .btn:focus-visible {
    outline-offset: 3px;
}

/* ============================================
   NAVBAR STANDARD (visiteurs + étudiants)
   ============================================ */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand img {
    max-height: 45px;
    width: auto;
}

.navbar-brand img[src=""],
.navbar-brand img:not([src]),
.navbar-brand img[alt]:not([src]) {
    display: none;
}

.navbar-nav .nav-link {
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    transition: all var(--transition-base);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.navbar-nav .btn {
    padding: 0.5rem 1.5rem;
}

/* ============================================
   NAVBAR ADMIN (Light Mode - Same style as Student)
   ============================================ */
.navbar-admin {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
}

.navbar-admin .navbar-brand {
    color: #1e293b;
    font-size: 1.1rem;
}

.navbar-admin .navbar-brand:hover {
    color: #0f172a;
}

.navbar-admin .nav-link {
    color: #475569;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

.navbar-admin .nav-link:hover {
    color: #1e293b;
    transform: none;
}

.navbar-admin .navbar-toggler {
    border-color: #e2e8f0;
}

.navbar-admin .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2871, 85, 105, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-admin .dropdown-menu {
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.navbar-admin .dropdown-item {
    color: #475569;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.navbar-admin .dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.navbar-admin .dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.navbar-admin .dropdown-header {
    color: #1e293b;
    padding: 0.5rem 1rem;
}

.navbar-admin .dropdown-divider {
    border-color: #e2e8f0;
}

.admin-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.navbar-admin .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
}

/* Admin Navbar Enhanced */
.navbar-admin {
    padding: 0.4rem 0;
    min-height: 56px;
}

.navbar-logo-admin {
    margin-left: 30px;
}

.badge-admin {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
    font-weight: 500;
}

.nav-link-admin {
    color: #475569 !important;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.nav-link-admin:hover {
    color: #1e293b !important;
    background: #f1f5f9;
}

.mobile-shell-btn,
.mobile-shell-spacer,
.mobile-header-link-label,
.mobile-sidebar-close,
.mobile-site-menu-close,
.mobile-sidebar-head,
.mobile-sidebar-backdrop {
    display: none;
}

/* ============================================
   NAVBAR ÉTUDIANT (Standard)
   ============================================ */
.navbar-student {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
}

.navbar-student .navbar-brand img {
    height: 32px;
}

.nav-link-student {
    color: #374151 !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem !important;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.nav-link-student:hover {
    color: #111827 !important;
    background: #f3f4f6;
}

.nav-link-student.active {
    color: #2563eb !important;
    background: #eff6ff;
}

.nav-link-student i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-link-admin-accent {
    color: #dc2626 !important;
}

.nav-link-admin-accent:hover {
    color: #b91c1c !important;
    background: #fef2f2;
}

/* Dropdown étudiant */
.dropdown-menu-student {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 200px;
}

.dropdown-menu-student .dropdown-item {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    transition: all var(--transition-fast);
}

.dropdown-menu-student .dropdown-item i {
    width: 20px;
    margin-right: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.dropdown-menu-student .dropdown-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.dropdown-menu-student .dropdown-item:hover i {
    color: #374151;
}

.dropdown-menu-student .dropdown-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.dropdown-menu-student .dropdown-divider {
    margin: 0.375rem 0;
    border-color: #e5e7eb;
}

/* Avatar utilisateur étudiant */
.user-avatar-student {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform var(--transition-fast);
}

.user-avatar-student:hover {
    transform: scale(1.05);
}

/* ============================================
   SIDEBAR ADMIN (Light Mode - Same style as Student)
   ============================================ */
.sidebar-admin {
    background: #f8fafc;
    min-height: 100vh;
    border-right: 1px solid #e2e8f0;
    margin-top: -24px;
    padding-top: 24px;
    margin-bottom: -100px;
    padding-bottom: 100px;
    max-width: 300px;
    flex: 0 0 300px;
}

/* Admin Sidebar Logo */
.sidebar-admin-logo {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.sidebar-admin-logo img,
.sidebar-admin-logo .sidebar-logo-img {
    height: 36px !important;
    width: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 0 auto;
}

.sidebar-admin .nav-link {
    color: #475569;
    padding: 0.75rem 1rem;
    margin: 0.15rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
}

.sidebar-admin .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-admin .nav-link:hover {
    background: #e2e8f0;
    color: #dc2626;
}

.sidebar-admin .nav-link.active {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.sidebar-admin .nav-link.active:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    color: white;
}

.sidebar-admin .sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: #64748b;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.sidebar-admin .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

/* ============================================
   ADMIN PAGE STYLES (Professional Design)
   ============================================ */

/* Admin Page Header */
.admin-page-header {
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.admin-page-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Admin Cards */
.admin-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: none;
}

.admin-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
}

.admin-card-header h5,
.admin-card-header h6 {
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    font-size: 0.9375rem;
}

/* Admin Tables */
.admin-table {
    margin-bottom: 0;
}

.admin-table thead {
    background: #f8fafc;
}

.admin-table thead th {
    font-weight: 600;
    color: #475569;
    font-size: 0.8125rem;
    padding: 0.875rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #475569;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

/* Admin Badges/Status */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.admin-badge-success {
    background: #dcfce7;
    color: #15803d;
}

.admin-badge-danger {
    background: #fef2f2;
    color: #dc2626;
}

.admin-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.admin-badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.admin-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.admin-badge-success .admin-badge-dot { background: #22c55e; }
.admin-badge-danger .admin-badge-dot { background: #ef4444; }
.admin-badge-warning .admin-badge-dot { background: #f59e0b; }
.admin-badge-info .admin-badge-dot { background: #0ea5e9; }
.admin-badge-secondary .admin-badge-dot { background: #94a3b8; }

/* Admin Buttons */
.admin-btn {
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    transition: all var(--transition-fast);
}

.admin-btn-primary {
    background: #1e293b;
    color: white;
}

.admin-btn-primary:hover {
    background: #334155;
    color: white;
}

.admin-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.admin-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.admin-btn-danger {
    background: #fef2f2;
    color: #dc2626;
}

.admin-btn-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.admin-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Admin Search */
.admin-search-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-search-input {
    border-color: #e2e8f0;
    background: #f8fafc;
    padding-left: 38px;
}

.admin-search-input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

/* Admin Pagination */
.admin-pagination {
    padding: 0.875rem 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Admin Modal */
.admin-modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.admin-modal-header-danger {
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
}

.admin-modal-header-warning {
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
}

.admin-modal-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

.admin-modal-title-danger {
    color: #991b1b;
}

.admin-modal-title-warning {
    color: #92400e;
}

/* Admin Stats */
.admin-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.admin-stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* Admin Avatar */
.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Admin Info Text */
.admin-text-muted {
    font-size: 0.75rem;
    color: #94a3b8;
}

.admin-text-small {
    font-size: 0.8125rem;
}

/* ============================================
   SIDEBAR ÉTUDIANT
   ============================================ */
.sidebar-etudiant {
    background: #f8fafc;
    min-height: 100vh;
    border-right: 1px solid #e2e8f0;
    margin-top: -24px;
    padding-top: 24px;
    margin-bottom: -100px;
    padding-bottom: 100px;
}

.sidebar-etudiant .nav-link {
    color: #475569;
    padding: 0.75rem 1rem;
    margin: 0.15rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
}

.sidebar-etudiant .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-etudiant .nav-link:hover {
    background: #e2e8f0;
    color: #1e40af;
}

.sidebar-etudiant .nav-link.is-disabled {
    color: #94a3b8;
    background: #eef2f7;
    border: 1px dashed #dbe3ee;
}

.sidebar-etudiant .nav-link.is-disabled i {
    color: #94a3b8;
}

.sidebar-etudiant .nav-link.is-disabled:hover {
    color: #94a3b8;
    background: #eef2f7;
}

.sidebar-etudiant .nav-link.is-disabled.active,
.sidebar-etudiant .nav-link.is-disabled.active:hover {
    color: #94a3b8;
    background: #eef2f7;
    box-shadow: none;
}

.sidebar-etudiant .nav-link.recap-disabled-hint {
    position: relative;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Crect x='1' y='1' width='16' height='16' rx='3' fill='%231e40af'/%3E%3Cpath d='M5 9h8' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 9 9, not-allowed;
}

.sidebar-etudiant .nav-link.recap-disabled-hint::before,
.sidebar-etudiant .nav-link.recap-disabled-hint::after {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.sidebar-etudiant .nav-link.recap-disabled-hint::before {
    content: "";
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    border: 6px solid transparent;
    border-right-color: #0f172a;
    z-index: 24;
}

.sidebar-etudiant .nav-link.recap-disabled-hint::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    white-space: nowrap;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.42rem 0.58rem;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
    z-index: 25;
}

.sidebar-etudiant .nav-link.recap-disabled-hint:hover::before,
.sidebar-etudiant .nav-link.recap-disabled-hint:hover::after,
.sidebar-etudiant .nav-link.recap-disabled-hint:focus-visible::before,
.sidebar-etudiant .nav-link.recap-disabled-hint:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.sidebar-etudiant .nav-link.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sidebar-etudiant .nav-link.active:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.sidebar-etudiant .sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* ------------------------------------------------------------------
   Coquille admin / étudiant : sidebar à largeur fixe + contenu fluide.
   Les colonnes Bootstrap (col-md-2 + col-md-9/col-lg-10) additionnent
   300px + 83% de la ligne, ce qui dépasse la largeur disponible entre
   1200px et ~1810px et fait passer le contenu SOUS la sidebar.
   On bascule donc la ligne en grille dès 768px : la sidebar prend sa
   largeur fixe, le contenu occupe strictement ce qui reste.
   ------------------------------------------------------------------ */
@media (min-width: 768px) {
    .app-shell-row,
    .container-fluid > .row:has(> .sidebar-admin),
    .container-fluid > .row:has(> .sidebar-etudiant) {
        --shell-sidebar-width: 300px;
        align-content: start !important;
        align-items: start !important;
        display: grid !important;
        grid-template-columns: var(--shell-sidebar-width) minmax(0, 1fr);
        flex-wrap: nowrap !important;
        min-height: 0 !important;
    }

    .app-shell-row > .sidebar-admin,
    .app-shell-row > .sidebar-etudiant,
    .sidebar-admin,
    .sidebar-etudiant {
        align-self: start !important;
        flex: 0 0 var(--shell-sidebar-width, 300px) !important;
        grid-column: 1;
        grid-row: 1;
        max-width: var(--shell-sidebar-width, 300px) !important;
        min-width: var(--shell-sidebar-width, 300px) !important;
        width: var(--shell-sidebar-width, 300px) !important;
    }

    .sidebar-admin .nav-link,
    .sidebar-etudiant .nav-link {
        white-space: nowrap;
    }

    .app-shell-row > main[class*="col-"],
    .container-fluid > .row:has(> .sidebar-admin) > main[class*="col-"],
    .container-fluid > .row:has(> .sidebar-etudiant) > main[class*="col-"] {
        align-self: start !important;
        flex: 1 1 auto !important;
        grid-column: 2;
        grid-row: 1;
        margin-left: 0 !important;
        max-width: none !important;
        min-width: 0 !important;
        width: auto !important;
    }
}

/* Sur tablette la sidebar est un peu plus compacte pour laisser
   respirer le contenu. */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .app-shell-row,
    .container-fluid > .row:has(> .sidebar-admin),
    .container-fluid > .row:has(> .sidebar-etudiant) {
        --shell-sidebar-width: 280px;
    }

    .app-shell-row > main[class*="col-"],
    .container-fluid > .row:has(> .sidebar-admin) > main[class*="col-"],
    .container-fluid > .row:has(> .sidebar-etudiant) > main[class*="col-"] {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Sidebar layout fix */
.container-fluid > .row {
    min-height: calc(100vh - 56px);
}

/* ============================================
   SUBSCRIPTION BADGES (sidebar étudiant)
   ============================================ */
.subscription-badge-container {
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    padding-top: 1.1rem;
}

.subscription-badge {
    --badge-bg: linear-gradient(135deg, #f8fafc, #e2e8f0);
    --badge-border: rgba(148, 163, 184, 0.55);
    --badge-glow: rgba(148, 163, 184, 0.28);
    --badge-text: #1e293b;
    --badge-muted: #475569;
    --badge-icon: linear-gradient(135deg, #64748b, #334155);
    display: flex;
    align-items: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 0.85rem;
    border: 1px solid var(--badge-border);
    border-radius: 18px;
    background: var(--badge-bg);
    background-size: 190% 190%;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.78) inset;
    gap: 0.75rem;
    transform: translateZ(0);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.subscription-badge::before {
    content: "";
    position: absolute;
    inset: -70% -35%;
    z-index: -1;
    background: linear-gradient(115deg, transparent 24%, rgba(255, 255, 255, 0.72) 45%, transparent 62%);
    transform: translateX(-65%) rotate(8deg);
    animation: subscriptionShine 4.8s ease-in-out infinite;
}

.subscription-badge::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -42px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--badge-glow), transparent 64%);
    filter: blur(2px);
    z-index: -1;
}

.subscription-badge:hover {
    border-color: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18), 0 0 26px var(--badge-glow);
    transform: translateY(-2px) scale(1.01);
}

.subscription-badge-icon {
    width: 42px;
    height: 42px;
    position: relative;
    flex: 0 0 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: var(--badge-icon);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22), 0 0 0 4px rgba(255, 255, 255, 0.36);
    font-size: 1.05rem;
}

.subscription-badge-icon::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.44);
    opacity: 0.75;
}

.subscription-badge-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.12rem;
}

.subscription-badge-label {
    color: var(--badge-text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-transform: uppercase;
}

.subscription-badge-expires {
    color: var(--badge-muted);
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
}

/* Mensuel - Argent */
.subscription-badge-monthly {
    --badge-bg: linear-gradient(135deg, #ffffff 0%, #dbe4ef 34%, #f8fafc 58%, #b8c4d4 100%);
    --badge-border: rgba(148, 163, 184, 0.72);
    --badge-glow: rgba(203, 213, 225, 0.58);
    --badge-text: #263449;
    --badge-muted: #526173;
    --badge-icon: linear-gradient(135deg, #f8fafc, #94a3b8 48%, #334155);
}

/* Trimestriel - Or */
.subscription-badge-quarterly {
    --badge-bg: linear-gradient(135deg, #fff9db 0%, #fbbf24 32%, #fff7ed 58%, #b45309 100%);
    --badge-border: rgba(245, 158, 11, 0.76);
    --badge-glow: rgba(251, 191, 36, 0.58);
    --badge-text: #422006;
    --badge-muted: #7c3f08;
    --badge-icon: linear-gradient(135deg, #fff7ad, #f59e0b 48%, #92400e);
}

/* Annuel - Diamant */
.subscription-badge-annual {
    --badge-bg: linear-gradient(135deg, #ecfeff 0%, #bfdbfe 28%, #ddd6fe 52%, #f0f9ff 76%, #67e8f9 100%);
    --badge-border: rgba(125, 211, 252, 0.76);
    --badge-glow: rgba(103, 232, 249, 0.58);
    --badge-text: #0f2f4a;
    --badge-muted: #315a78;
    --badge-icon: linear-gradient(135deg, #f8fafc, #38bdf8 42%, #7c3aed 100%);
    animation: subscriptionDiamondPulse 5.5s ease-in-out infinite;
}

/* Sans abonnement */
.subscription-badge-none {
    --badge-bg: linear-gradient(135deg, #f8fafc, #eef2f7);
    --badge-border: rgba(148, 163, 184, 0.5);
    --badge-glow: rgba(148, 163, 184, 0.22);
    --badge-text: #475569;
    --badge-muted: #2563eb;
    --badge-icon: linear-gradient(135deg, #cbd5e1, #64748b);
    border-style: dashed;
    cursor: pointer;
}

@keyframes subscriptionShine {
    0%, 44% {
        transform: translateX(-70%) rotate(8deg);
        opacity: 0;
    }
    52% {
        opacity: 0.9;
    }
    68%, 100% {
        transform: translateX(72%) rotate(8deg);
        opacity: 0;
    }
}

@keyframes subscriptionDiamondPulse {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.78) inset;
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 18px 44px rgba(14, 165, 233, 0.18), 0 0 34px rgba(125, 211, 252, 0.42);
    }
}

@media (prefers-reduced-motion: reduce) {
    .subscription-badge::before,
    .subscription-badge-annual {
        animation: none;
    }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* Cards inside sidebars, modals, forms shouldn't hover-float */
.sidebar-etudiant .card,
.sidebar-admin .card,
.modal .card,
form .card,
.card .card {
    box-shadow: none;
}
.sidebar-etudiant .card:hover,
.sidebar-admin .card:hover,
.modal .card:hover,
form .card:hover,
.card .card:hover {
    transform: none;
    box-shadow: none;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 1.25rem;
    font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.btn:disabled, .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
}

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}
.btn-loading .btn-text { visibility: hidden; }
.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.6s linear infinite;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    animation: fadeSlideUp 0.6s ease-out;
}

.hero-section p.lead {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
    animation: fadeSlideUp 0.6s ease-out 0.1s both;
}

.hero-section .d-flex {
    animation: fadeSlideUp 0.6s ease-out 0.2s both;
}

.hero-section .mt-4 {
    animation: fadeSlideUp 0.6s ease-out 0.3s both;
}

.hero-illustration {
    animation: floatIn 0.8s ease-out 0.2s both;
}

.hero-section .btn-light {
    background: white;
    color: #6366f1;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-outline-light {
    border: 2px solid white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
}

.hero-section .btn-outline-light:hover {
    background: white;
    color: #6366f1;
}

/* ============================================
   STATS & PRICING
   ============================================ */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.stats-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-card p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.pricing-card {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-slow);
    height: 100%;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -1px;
}

.pricing-card.featured .price {
    font-size: 3.2rem;
}

.pricing-card .price-wrapper {
    display: inline-block;
}

.pricing-card .price small {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    display: block;
    margin-top: 0.25rem;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-card ul li i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.dashboard-stat-icon.primary { background: var(--primary-color); }
.dashboard-stat-icon.success { background: var(--success-color); }
.dashboard-stat-icon.warning { background: var(--warning-color); }
.dashboard-stat-icon.danger { background: var(--danger-color); }
.dashboard-stat-icon.info { background: var(--info-color); }

.dashboard-stat-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-stat-info p {
    margin: 0;
    color: var(--secondary-color);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    height: 25px;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    font-weight: 600;
    transition: width 0.6s ease;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table-hover tbody tr {
    transition: background-color var(--transition-fast);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    cursor: pointer;
}

/* Tableaux dans les cours (côté étudiant) */
.cours-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
}
.cours-table thead {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
}
.cours-table thead th {
    font-weight: 600;
    padding: 0.875rem 1rem;
    border: none;
    letter-spacing: 0.02em;
}
.cours-table tbody td,
.cours-table tbody th {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: #e8ecf1;
}
.cours-table tbody tr:nth-child(odd) {
    background-color: #f8fafc;
}
.cours-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}
.cours-table tbody tr:hover {
    background-color: #edf2f7;
}
.cours-table tbody th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #334155;
}

/* Alertes dans les cours */
.alert .alert-heading {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 5px;
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.75rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ============================================
   ALERTS & FLASH MESSAGES
   ============================================ */
.alert {
    border-radius: 10px;
    border: none;
}

/* Toast-style flash messages */
.flash-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.3s ease-out;
    box-shadow: var(--shadow-lg);
}

.flash-toast.flash-toast-exit {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* ============================================
   SIDEBAR GENERIC
   ============================================ */
.sidebar {
    background: white;
    min-height: calc(100vh - 56px);
    padding: 2rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 0.25rem 1rem;
    transition: all var(--transition-base);
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* ============================================
   EXAM MODE
   ============================================ */
.exam-mode-warning {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    text-align: center;
    z-index: 9999;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.exam-mode-warning.show {
    transform: translateY(0);
    opacity: 1;
    animation: pulse 1s infinite;
}

.exam-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1000;
    transition: background var(--transition-base), color var(--transition-base);
}

.exam-timer.warning {
    background: var(--warning-color);
    color: white;
}

.exam-timer.danger {
    background: var(--danger-color);
    color: white;
    animation: pulse 1s infinite;
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-event {
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.calendar-event:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-title { height: 1.5rem; margin-bottom: 0.75rem; width: 60%; }
.skeleton-card { height: 120px; border-radius: 10px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

/* Global loader overlay */
#global-loader {
    transition: opacity 0.2s ease;
}

#global-loader.loader-hiding {
    opacity: 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background:
        radial-gradient(circle at 12% 20%, rgba(59, 130, 246, 0.24), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(220, 38, 38, 0.18), transparent 28%),
        linear-gradient(135deg, #07111f 0%, #0f172a 48%, #111827 100%) !important;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 -24px 70px rgba(15, 23, 42, 0.16);
    margin-top: auto;
    overflow: hidden;
    position: relative;
}

footer::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    content: "";
    height: 1px;
    left: 7%;
    position: absolute;
    right: 7%;
    top: 0;
}

footer h5 {
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

footer a {
    transition: color var(--transition-base);
}

footer a:hover {
    color: var(--primary-color) !important;
}

.footer-text {
    color: #cbd5e1 !important;
    line-height: 1.7;
}

.footer-link {
    color: #cbd5e1 !important;
    position: relative;
    transition: color var(--transition-base), transform var(--transition-base);
}

.footer-link:hover {
    color: white !important;
    transform: translateX(2px);
}

.footer-logo-white {
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

/* Colonnes "Ressources" et "Légal" côte à côte sur téléphone : deux blocs
   courts qui n'ont pas besoin de toute la largeur chacun. */
@media (max-width: 575.98px) {
    .footer-col-compact h5 {
        font-size: 1rem;
    }

    .footer-col-compact .footer-link {
        font-size: 0.875rem;
    }

    .footer-col-compact ul {
        margin-bottom: 0;
    }
}

footer .social-links a {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 12px;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    margin-right: 0.45rem !important;
    transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
    width: 36px;
}

footer .social-links a:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(147, 197, 253, 0.35);
    transform: translateY(-2px);
}

footer .btn-outline-light {
    border-color: rgba(226, 232, 240, 0.35);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
}

footer hr {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

@media (max-width: 767.98px) {
    footer {
        text-align: center;
    }

    footer .container {
        padding-bottom: 2rem !important;
        padding-top: 2.5rem !important;
    }

    footer .footer-link:hover {
        transform: none;
    }
}

/* ============================================
   DROPDOWN ANIMATIONS
   ============================================ */
.dropdown-menu {
    animation: dropdownFade 0.15s ease-out;
}

/* ============================================
   MODAL ENHANCEMENTS
   ============================================ */
.modal.fade .modal-dialog {
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.35s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes floatIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

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

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        min-height: auto;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .stats-card h3 {
        font-size: 2rem;
    }

    .pricing-card {
        margin-bottom: 2rem;
    }

    .sidebar {
        min-height: auto;
    }

    .flash-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    /* Faster animations on mobile */
    .animate-on-scroll { transition-duration: 0.3s; }
    .stagger-children > * { transition-duration: 0.25s; }
}

.site-mobile-menu {
    display: none;
}

.mobile-header-close {
    display: none;
}

@media (max-width: 767.98px) {
    body.mobile-sidebar-open,
    body.mobile-site-menu-open {
        overflow: hidden;
    }

    .navbar-admin,
    .navbar-student {
        position: sticky;
        top: 0;
        z-index: 1040;
    }

    .navbar-admin .container-fluid,
    .navbar-student .container {
        align-items: center;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 0.5rem;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        position: relative;
    }

    .mobile-shell-btn {
        align-items: center;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        color: #1e293b;
        display: inline-flex;
        height: 40px;
        justify-content: center;
        width: 40px;
    }

    .mobile-shell-spacer {
        display: block;
        height: 40px;
        width: 40px;
    }

    .mobile-shell-btn:hover,
    .mobile-shell-btn:focus {
        background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
        border-color: #cbd5e1;
        color: #0f172a;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    }

    .mobile-header-toggle {
        justify-self: end;
    }

    .navbar-admin .navbar-brand,
    .navbar-student .navbar-brand {
        justify-content: center;
        margin: 0;
        min-width: 0;
    }

    .navbar-logo-admin {
        margin-left: 0;
    }

    .badge-admin {
        display: none;
    }

    .navbar-admin .mobile-header-menu,
    .navbar-student .mobile-header-menu {
        background:
            radial-gradient(circle at 20% 0%, rgba(30, 58, 95, 0.08), transparent 34%),
            #fff;
        border-left: 1px solid #e2e8f0;
        box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
        display: block !important;
        height: 100vh !important;
        left: auto;
        max-width: none;
        overflow-y: auto;
        padding: 0.75rem;
        position: fixed;
        right: 0;
        top: 0;
        transform: translateX(105%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
        width: min(82vw, 320px);
        z-index: 1050;
        will-change: transform;
    }

    .mobile-header-close {
        align-items: center;
        align-self: flex-end;
        background: #f8fafc;
        border: 1px solid #dbe5f0;
        border-radius: 13px;
        color: #0f172a;
        display: inline-flex;
        height: 38px;
        justify-content: center;
        margin: 0 0 0.6rem auto;
        width: 38px;
    }

    .mobile-header-close:hover,
    .mobile-header-close:focus {
        background: #eaf2fb;
        color: #1e3a5f;
    }

    .navbar-admin .mobile-header-menu.show,
    .navbar-student .mobile-header-menu.show {
        transform: translateX(0);
    }

    .navbar-admin .mobile-header-menu .navbar-nav,
    .navbar-student .mobile-header-menu .navbar-nav {
        align-items: stretch !important;
        gap: 0.25rem !important;
    }

    .navbar-admin .mobile-header-menu .nav-link,
    .navbar-student .mobile-header-menu .nav-link {
        border-radius: 11px;
        color: #334155 !important;
        justify-content: flex-start;
        padding: 0.7rem 0.85rem !important;
        width: 100%;
    }

    .navbar-admin .mobile-header-menu .nav-link:hover,
    .navbar-student .mobile-header-menu .nav-link:hover {
        background: #f1f5f9;
        color: #0f172a !important;
    }

    .navbar-admin .mobile-header-menu .nav-link i,
    .navbar-student .mobile-header-menu .nav-link i {
        color: #475569;
    }

    .navbar-admin .mobile-header-menu .d-none.d-lg-inline,
    .navbar-student .mobile-header-menu .d-none.d-lg-inline,
    .mobile-header-link-label {
        color: #334155;
        display: inline !important;
    }

    /* Le sous-menu utilisateur est déplié directement dans le panneau mobile :
       la pastille aux initiales disparaît, les rubriques sont visibles
       d'emblée, séparées du reste du menu par un filet horizontal. */
    .navbar-admin .mobile-header-menu .nav-item.dropdown,
    .navbar-student .mobile-header-menu .nav-item.dropdown {
        margin-left: 0 !important;
        width: 100%;
    }

    .navbar-admin .mobile-header-menu .nav-item.dropdown > .dropdown-toggle,
    .navbar-student .mobile-header-menu .nav-item.dropdown > .dropdown-toggle {
        display: none !important;
    }

    .navbar-admin .mobile-header-menu .dropdown-menu,
    .navbar-student .mobile-header-menu .dropdown-menu {
        background: transparent;
        border: 0;
        border-radius: 0;
        border-top: 1px solid #e2e8f0;
        box-shadow: none;
        display: block !important;
        float: none;
        inset: auto !important;
        margin: 0.55rem 0 0;
        padding: 0.6rem 0 0;
        position: static !important;
        transform: none !important;
        width: 100%;
    }

    .navbar-admin .mobile-header-menu .dropdown-header,
    .navbar-student .mobile-header-menu .dropdown-header {
        padding: 0.1rem 0.85rem 0.5rem;
    }

    .navbar-admin .mobile-header-menu .dropdown-item,
    .navbar-student .mobile-header-menu .dropdown-item {
        border-radius: 11px;
        color: #334155;
        padding: 0.7rem 0.85rem;
        white-space: normal;
    }

    .navbar-admin .mobile-header-menu .dropdown-item:hover,
    .navbar-student .mobile-header-menu .dropdown-item:hover {
        background: #f1f5f9;
        color: #0f172a;
    }

    .navbar-admin .mobile-header-menu .dropdown-item.text-danger:hover,
    .navbar-student .mobile-header-menu .dropdown-item.text-danger:hover {
        background: #fef2f2;
        color: #b91c1c;
    }

    .navbar-admin .mobile-header-menu .dropdown-item i,
    .navbar-student .mobile-header-menu .dropdown-item i {
        color: #475569;
        margin-right: 0.55rem;
        width: 18px;
    }

    .navbar-admin .mobile-header-menu .dropdown-item.text-danger i,
    .navbar-student .mobile-header-menu .dropdown-item.text-danger i {
        color: inherit;
    }

    .navbar-admin .mobile-header-menu .dropdown-divider,
    .navbar-student .mobile-header-menu .dropdown-divider {
        margin: 0.35rem 0;
    }

    .sidebar-etudiant,
    .sidebar-admin {
        background: #fff;
        border-right: 1px solid #e2e8f0;
        box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18);
        display: block !important;
        height: 100vh !important;
        left: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding-bottom: 1rem;
        padding-top: 0 !important;
        position: fixed !important;
        top: 0 !important;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
        width: min(82vw, 320px) !important;
        z-index: 1060;
        will-change: transform;
    }

    body.mobile-sidebar-open .sidebar-admin,
    body.mobile-sidebar-open .sidebar-etudiant {
        display: block !important;
        flex: none !important;
        left: 0 !important;
        max-height: 100vh !important;
        max-width: none !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding-bottom: 1rem;
        padding-top: 0 !important;
        position: fixed !important;
        right: auto !important;
        top: 0 !important;
        transform: translateX(0);
        width: min(82vw, 320px) !important;
        z-index: 1060;
    }

    body.mobile-sidebar-open .sidebar-admin .position-sticky,
    body.mobile-sidebar-open .sidebar-etudiant .position-sticky {
        position: static !important;
        padding-top: 0.75rem !important;
        top: auto !important;
    }

    body.mobile-sidebar-open .sidebar-admin .nav.flex-column,
    body.mobile-sidebar-open .sidebar-etudiant .nav.flex-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        white-space: normal !important;
        width: 100% !important;
    }

    body.mobile-sidebar-open .sidebar-admin .nav-item,
    body.mobile-sidebar-open .sidebar-etudiant .nav-item {
        flex: 0 0 auto !important;
        width: 100% !important;
    }

    body.mobile-sidebar-open .sidebar-admin .sidebar-heading,
    body.mobile-sidebar-open .sidebar-etudiant .sidebar-heading {
        display: block !important;
    }

    body.mobile-sidebar-open .sidebar-admin .nav-link,
    body.mobile-sidebar-open .sidebar-etudiant .nav-link {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .mobile-sidebar-first-item {
        align-items: center;
        display: flex !important;
        gap: 0.6rem !important;
        padding: 0 0.75rem !important;
    }

    .mobile-sidebar-first-item .nav-link {
        flex: 1 1 auto;
        margin: 0 !important;
    }

    .mobile-sidebar-close {
        align-items: center;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        color: #0f172a;
        display: inline-flex;
        flex: 0 0 38px;
        font-size: 1rem;
        height: 34px;
        justify-content: center;
        padding: 0;
        width: 34px;
    }

    .mobile-sidebar-close i {
        color: currentColor;
        font-size: 1rem;
        line-height: 1;
    }

    .mobile-sidebar-backdrop {
        background: rgba(15, 23, 42, 0.38);
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        transition: opacity 0.18s ease;
        z-index: 1055;
    }

    body.mobile-sidebar-open .mobile-sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .site-mobile-menu {
        background:
            radial-gradient(circle at 15% 0%, rgba(30, 58, 95, 0.12), transparent 30%),
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        border-right: 1px solid #dbe5f0;
        box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18);
        display: block;
        height: 100vh;
        left: 0;
        overflow-y: auto;
        padding: 1rem;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        width: min(84vw, 330px);
        z-index: 1060;
        will-change: transform;
    }

    body.mobile-site-menu-open .site-mobile-menu {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    body.mobile-site-menu-open .mobile-sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-site-menu-close {
        align-items: center;
        background: #fff;
        border: 1px solid #dbe5f0;
        border-radius: 13px;
        color: #0f172a;
        display: inline-flex;
        height: 38px;
        justify-content: center;
        margin-left: auto;
        width: 38px;
    }

    .site-mobile-menu-brand {
        align-items: center;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        gap: 0.75rem;
        margin: 0.75rem 0 1rem;
        padding-bottom: 1rem;
    }

    .site-mobile-menu-brand span {
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .site-mobile-menu-links {
        display: grid;
        gap: 0.55rem;
    }

    .site-mobile-menu-link,
    .site-mobile-menu-cta {
        align-items: center;
        border-radius: 15px;
        display: flex;
        gap: 0.8rem;
        padding: 0.9rem 1rem;
        text-decoration: none;
    }

    .site-mobile-menu-link {
        color: #334155;
        font-weight: 700;
    }

    .site-mobile-menu-link i {
        color: #1e3a5f;
        width: 18px;
    }

    .site-mobile-menu-link:hover,
    .site-mobile-menu-link.active {
        background: #eef6ff;
        color: #0f2743;
    }

    .site-mobile-menu-cta {
        background: linear-gradient(135deg, #1e3a5f 0%, #0f2743 100%);
        box-shadow: 0 16px 30px rgba(30, 58, 95, 0.24);
        color: #fff;
        font-weight: 800;
        justify-content: center;
        margin-top: 0.45rem;
    }

    .subscription-badge-container {
        border-top: none;
        padding-top: 0.5rem;
    }
}

/* ============================================
   STUDENT BILLING / SUBSCRIPTIONS
   ============================================ */
/* --------------------------------------------------------------------
   Espace étudiant : abonnement, factures et tickets partagent désormais
   les mêmes jetons visuels que le reste du site (filet #e2e8f0,
   rayon 18-20px, ombre douce, action principale en bleu nuit #0f172a).
   -------------------------------------------------------------------- */
.student-subscription-page,
.student-invoices-page,
.student-tickets-page {
    color: #0f172a;
}

.student-subscription-page > .d-flex,
.student-invoices-page > .d-flex {
    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.16), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(139, 92, 246, 0.14), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    display: block !important;
    margin: 1rem 0 1.35rem !important;
    padding: 1.35rem 1.5rem !important;
}

.student-page-eyebrow {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.student-subscription-page h1,
.student-invoices-page h1 {
    align-items: center;
    color: #0f172a;
    display: flex;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 850;
    gap: 0.65rem;
    letter-spacing: -0.035em;
    margin: 0;
}

.student-subscription-page h1 i,
.student-invoices-page h1 i {
    color: #2563eb;
}

.student-page-subtitle {
    color: #64748b;
    margin: 0.45rem 0 0;
}

.student-subscription-page .card,
.student-invoices-page .card,
.student-tickets-page .card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden;
}

.student-subscription-page .card-header,
.student-invoices-page .card-header,
.student-tickets-page .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 800;
}

.student-subscription-page .btn,
.student-invoices-page .btn,
.student-tickets-page .btn {
    border-radius: 12px;
    font-weight: 700;
}

.student-subscription-page .btn-primary,
.student-invoices-page .btn-primary,
.student-tickets-page .btn-primary,
.student-subscription-page .btn-change-plan {
    background: #0f172a !important;
    border-color: #0f172a !important;
    box-shadow: none !important;
    color: #fff !important;
}

.student-subscription-page .btn-primary:hover,
.student-invoices-page .btn-primary:hover,
.student-tickets-page .btn-primary:hover,
.student-subscription-page .btn-change-plan:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
    box-shadow: none !important;
}

.student-subscription-page .alert,
.student-invoices-page .alert,
.student-tickets-page .alert {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.student-subscription-page .plan-card {
    border-color: #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.student-subscription-page .plan-card:hover:not(.plan-current),
.student-subscription-page .plan-card.plan-selected {
    border-color: #0f172a;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.student-subscription-page .plan-price {
    color: #0f172a;
    letter-spacing: -0.04em;
}

.student-subscription-page .progress,
.student-invoices-page .progress {
    background: #e8eef6;
}

.student-subscription-page .cours-table,
.student-invoices-page .cours-table {
    border-collapse: separate;
    border-spacing: 0;
}

.student-subscription-page .cours-table th,
.student-invoices-page .cours-table th {
    background: #f8fbff;
    color: #64748b;
    font-weight: 800;
}

.student-subscription-page .cours-table td,
.student-invoices-page .cours-table td {
    border-color: #edf2f7;
    color: #334155;
}

.student-invoices-page .row.mb-4 .card.bg-primary,
.student-invoices-page .row.mb-4 .card.bg-success,
.student-invoices-page .row.mb-4 .card.bg-info {
    background: linear-gradient(135deg, #0f2743 0%, #1e3a5f 100%) !important;
    color: #fff;
}

.student-invoices-page .row.mb-4 .card h3 {
    font-weight: 850;
    letter-spacing: -0.04em;
}

@media (max-width: 767.98px) {
    .student-subscription-page,
    .student-invoices-page {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .student-subscription-page > .d-flex,
    .student-invoices-page > .d-flex {
        align-items: flex-start !important;
        gap: 0.9rem;
    }

    .student-subscription-page .card-body,
    .student-invoices-page .card-body {
        padding: 1rem !important;
    }

    .student-subscription-page .d-flex.gap-2 {
        flex-direction: column;
        width: 100%;
    }

    .student-subscription-page .d-flex.gap-2 .btn {
        width: 100%;
    }

    .student-invoices-page .btn-toolbar {
        display: grid;
        gap: 0.65rem;
        width: 100%;
    }

    .student-invoices-page .btn-toolbar .btn {
        margin: 0 !important;
        width: 100%;
    }
}

/* ============================================
   KATEX FORMULA STYLES
   ============================================ */
.katex-formula-block {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.katex-formula-inline {
    display: inline;
    padding: 0 0.25rem;
}

/* Improve KaTeX rendering in course content */
.cours-content .katex {
    font-size: 1.15em;
}

.cours-content .katex-display {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Custom colors for formula icon */
.text-purple { color: #6f42c1 !important; }
.text-indigo { color: #6610f2 !important; }

/* ====================================================================
   EN-TÊTE STANDARD DES PAGES D'ADMINISTRATION
   Référence : admin/calendrier.php. Toute page admin doit utiliser ce
   bloc pour son titre :

   <div class="admin-page-hero">
       <div>
           <span class="admin-page-eyebrow">Surtitre</span>
           <h1 class="admin-page-title"><i class="fas fa-…"></i> Titre</h1>
           <p class="admin-page-subtitle">Sous-titre</p>
       </div>
       <button class="btn admin-page-action">Action</button>   (facultatif)
   </div>
   ==================================================================== */
.admin-page-hero {
    align-items: flex-end;
    background:
        radial-gradient(circle at 12% 20%, rgba(37, 99, 235, 0.16), transparent 30%),
        radial-gradient(circle at 92% 8%, rgba(14, 165, 233, 0.12), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 1rem 0 1.35rem;
    padding: 1.35rem 1.5rem;
}

.admin-page-hero > div {
    min-width: 0;
}

.admin-page-eyebrow {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.admin-page-title {
    align-items: center;
    color: #0f172a;
    display: flex;
    font-size: 1.7rem;
    font-weight: 850;
    gap: 0.65rem;
    letter-spacing: -0.035em;
    margin: 0;
}

.admin-page-title i {
    color: #2563eb;
}

.admin-page-subtitle {
    color: #64748b;
    margin: 0.45rem 0 0;
}

.admin-page-back {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    text-decoration: none;
}

.admin-page-back:hover {
    color: #0f172a;
}

.admin-page-action,
.admin-page-hero .btn.admin-page-action {
    background: #1e293b;
    border: 0;
    border-radius: 12px;
    color: #fff;
    flex: 0 0 auto;
    font-weight: 750;
    min-height: 44px;
    padding: 0.6rem 1rem;
    white-space: nowrap;
}

.admin-page-action:hover,
.admin-page-hero .btn.admin-page-action:hover {
    background: #0f172a;
    color: #fff;
}

.admin-page-aside {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 575.98px) {
    .admin-page-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 1.1rem;
    }

    .admin-page-title {
        font-size: 1.35rem;
    }

    .admin-page-hero .btn,
    .admin-page-action {
        width: 100%;
    }

    .admin-page-aside {
        justify-content: flex-start;
    }
}

/* ====================================================================
   EN-TÊTE STANDARD DES PAGES DE L'ESPACE ÉTUDIANT
   Référence : etudiant/mes-notes.php. Définition unique pour que toutes
   les pages partagent exactement la même boîte.

   <div class="cp-student-hero">
       <div>
           <span class="cp-student-eyebrow">Surtitre</span>
           <h1 class="cp-student-title"><i class="fas fa-…"></i> Titre</h1>
           <p class="cp-student-subtitle">Sous-titre</p>
       </div>
       <div class="cp-student-badges">…</div>   (facultatif)
   </div>
   ==================================================================== */
.cp-student-hero {
    align-items: center;
    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.16), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(139, 92, 246, 0.14), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 1rem 0 1.35rem;
    padding: 1.35rem 1.5rem;
}

.cp-student-hero > div:first-child {
    min-width: 0;
}

.cp-student-eyebrow {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.cp-student-title {
    align-items: center;
    color: #0f172a;
    display: flex;
    font-size: 1.7rem;
    font-weight: 850;
    gap: 0.65rem;
    letter-spacing: -0.035em;
    margin: 0;
}

.cp-student-title i {
    color: var(--cp-accent, #2563eb);
}

.cp-student-subtitle {
    color: #64748b;
    margin: 0.45rem 0 0;
}

.cp-student-badges {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .cp-student-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.1rem;
    }

    .cp-student-title {
        font-size: 1.35rem;
    }

    .cp-student-hero .btn {
        width: 100%;
    }
}
