/*
 * CSS principal pour le portail CSE
 * Design Nidaplast - Rouge et Or
 * Version 2.0 - Refonte 2026
 */

/* --- VARIABLES CSS - Palette Nidaplast --- */
:root {
    /* Couleurs principales Nidaplast */
    --primary-color: #C41E3A;
    --primary-dark: #8B0000;
    --primary-light: #E63950;

    --secondary-color: #F5A623;
    --secondary-dark: #D4920E;
    --secondary-light: #FFD54F;

    /* Couleurs fonctionnelles */
    --success-color: #28a745;
    --warning-color: #F5A623;
    --danger-color: #C41E3A;
    --info-color: #17a2b8;

    /* Neutres */
    --light-color: #f8f9fa;
    --dark-color: #2d2d2d;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-500: #9e9e9e;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    --gradient-secondary: linear-gradient(135deg, #FFD54F 0%, #F5A623 100%);
    --gradient-header: linear-gradient(135deg, #C41E3A 0%, #A52A2A 100%);
    --background-gradient: linear-gradient(135deg, #fef9f9 0%, #fff5e6 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-primary: 0 4px 14px rgba(196, 30, 58, 0.25);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

html, body {
    height: 100%;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark-color);
}

body {
    background: var(--background-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2e5298;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- LAYOUT --- */
.header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--gradient-header);
    color: white;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

.back-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}

.content-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.page h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page h2::before {
    content: '';
    width: 5px;
    height: 28px;
    background: var(--gradient-header);
    border-radius: 3px;
}

/* --- NAVIGATION --- */

/* Menu toggle hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 1001;
    transition: background var(--transition-fast);
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu desktop horizontal */
.main-menu.desktop-menu {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    background-color: white;
    padding: 12px 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    border-radius: var(--radius-md);
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--dark-color);
    transition: all var(--transition-normal);
}

.menu-item:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(245, 166, 35, 0.1) 100%);
    color: var(--primary-color);
    font-weight: 500;
}

.menu-item.active .menu-icon {
    color: var(--primary-color);
}

.menu-icon {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--gray-500);
    transition: color var(--transition-fast);
}

.menu-item:hover .menu-icon {
    color: var(--primary-color);
}

.menu-label {
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
}

/* Sidebar mobile coulissante */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: left var(--transition-normal);
    overflow-y: auto;
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--gradient-header);
    color: white;
}

.sidebar-logo {
    height: 50px;
    width: auto;
}

.sidebar-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar-close:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--gray-100);
    color: var(--primary-color);
    border-left-color: var(--secondary-color);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(196, 30, 58, 0.1) 0%, transparent 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

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

.sidebar-link-danger {
    color: var(--danger-color);
}

.sidebar-link-danger:hover {
    background: rgba(196, 30, 58, 0.1);
    color: var(--primary-dark);
}

.sidebar-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 10px 20px;
}

/* Overlay sidebar */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    transition: all var(--transition-normal);
}

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

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-menu.desktop-menu {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-sidebar,
    .sidebar-overlay {
        display: none !important;
    }
}

.user-menu-toggle {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    display: none;
    z-index: 100;
}

.user-menu-toggle:hover .user-menu {
    display: block;
}

.user-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    transition: background-color 0.3s;
}

.user-menu a:hover {
    background-color: #f5f5f5;
}

.login-link {
    color: white;
    font-size: 0.75rem;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:hover {
    border-color: var(--secondary-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
    background: white;
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-error::before {
    content: '⚠';
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--gradient-header);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

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

.btn-primary {
    background: var(--gradient-header);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e8941f 100%);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e8941f 0%, var(--secondary-color) 100%);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 1.1rem;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #28a745 100%);
}

/* --- ALERTS --- */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.alert::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1rem;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #fff 100%);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-danger::before {
    content: '\f071';
    color: #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #fff 100%);
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-success::before {
    content: '\f00c';
    color: #28a745;
}

.alert-info {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.15) 0%, #fff 100%);
    border-left: 4px solid var(--secondary-color);
    color: #856404;
}

.alert-info::before {
    content: '\f05a';
    color: var(--secondary-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fff 100%);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-warning::before {
    content: '\f06a';
    color: #ffc107;
}

/* --- LOGIN PAGE --- */
#login-page {
    max-width: 450px;
    margin: 0 auto;
    background: white;
    padding: 35px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--primary-color);
}

#login-page h2::before {
    display: none;
}

#login-page h2 {
    justify-content: center;
    text-align: center;
}

.login-form {
    margin-bottom: 25px;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-help {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    padding-top: 20px;
    border-top: 2px solid var(--secondary-color);
    margin-top: 20px;
}

/* --- MODAL --- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-weight: 500;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

.btn-confirm {
    padding: 10px 20px;
    background-color: #3c67b5;
    color: white;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-confirm:hover {
    background-color: #2e5298;
}

/* Modal responsive pour mobile */
@media (max-width: 480px) {
    .modal-content {
        width: calc(100% - 20px);
        margin: 10px;
        border-radius: 8px;
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer .btn-cancel,
    .modal-footer .btn-confirm {
        width: 100%;
        text-align: center;
        padding: 12px 15px;
    }
}

/* --- PDF VIEWER --- */
.selector {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.selector select {
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: var(--radius-md);
    background-color: white;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.selector select:hover {
    border-color: var(--secondary-color);
}

.selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.pdf-container {
    position: relative;
    height: 70vh;
    border: 2px solid #e8e8e8;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.pdf-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.pdf-control-group {
    display: flex;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.pdf-control-group button {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pdf-control-group button:hover {
    background-color: #f0f0f0;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
}

.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 5;
}

.no-document {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: #6c757d;
    text-align: center;
}

.no-document i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* --- HOME PAGE --- */
.welcome-banner {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
    background-image: linear-gradient(135deg, var(--primary-color), #2e5298);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-banner.show {
    opacity: 1;
    transform: translateY(0);
}

.welcome-content h1 {
    margin-bottom: 10px;
    font-weight: 300;
    font-size: 2rem;
}

.welcome-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.home-sections {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Style spécifique pour que welcome-cse prenne toute la largeur */
.home-sections .welcome-cse {
    grid-column: 1 / -1;
}

.home-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    transition-delay: calc(var(--order, 0) * 0.1s);
}

.home-section.show {
    opacity: 1;
    transform: translateY(0);
}

.home-section h2 {
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.documents-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.document-card {
    display: flex;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #e8e8e8;
    position: relative;
    overflow: hidden;
}

.document-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #fff 0%, rgba(196, 30, 58, 0.03) 100%);
}

.document-card:hover::before {
    transform: scaleY(1);
}

.document-card.empty {
    opacity: 0.6;
    filter: grayscale(30%);
}

.document-icon {
    font-size: 2.2rem;
    margin-right: 15px;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.document-card:hover .document-icon {
    transform: scale(1.1);
    color: var(--primary-dark);
}

.document-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.document-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.no-doc {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.items-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.activity-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(196, 30, 58, 0.2);
    border-color: var(--primary-color);
}

.activity-date {
    background: var(--gradient-header);
    color: white;
    padding: 15px 10px;
    text-align: center;
    position: relative;
}

.activity-date::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary-dark);
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.date-month {
    font-size: 0.85rem;
    text-transform: uppercase;
}

.activity-info {
    padding: 15px;
}

.activity-info h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.activity-location, .activity-time {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.activity-description {
    font-size: 0.9rem;
    margin-top: 10px;
}

.btn-more {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e8941f 100%);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: auto;
}

.btn-more:hover {
    background: linear-gradient(135deg, #e8941f 0%, var(--secondary-color) 100%);
    color: white;
}

.section-footer {
    text-align: center;
    margin-top: 25px;
}

.btn-view-all {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--gradient-header);
    color: white;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.subsidies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.subsidy-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #fef8f0 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0e6d8;
    position: relative;
    overflow: hidden;
}

.subsidy-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, rgba(245, 166, 35, 0.15) 50%);
    border-radius: 0 var(--radius-lg) 0 0;
}

.subsidy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.25);
    border-color: var(--secondary-color);
}

.subsidy-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.subsidy-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.subsidy-price {
    margin-bottom: 10px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 8px;
}

.original-price {
    font-size: 0.95rem;
    text-decoration: line-through;
    color: #999;
    position: relative;
}

.original-price::before {
    content: 'au lieu de ';
    font-size: 0.75rem;
    text-decoration: none;
}

.subsidy-availability {
    font-size: 0.85rem;
    color: #6c757d;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    padding: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary-color);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.news-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.news-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.news-content {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.news-author {
    color: #6c757d;
}

.btn-read-more {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-read-more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.profile-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fff 0%, rgba(196, 30, 58, 0.02) 100%);
    border: 1px solid rgba(196, 30, 58, 0.1);
}

.profile-summary {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    font-size: 4.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(245, 166, 35, 0.1) 100%);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-info h3 {
    margin-bottom: 5px;
}

.profile-role {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.user-activities, .user-subsidies {
    margin-bottom: 15px;
}

.user-activities h4, .user-subsidies h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-activities h4::before, .user-subsidies h4::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.user-activities ul, .user-subsidies ul {
    list-style: none;
}

.user-activities li, .user-subsidies li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.activity-name, .subsidy-name {
    font-weight: 500;
}

.activity-date, .subsidy-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.btn-profile, .btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--gradient-header);
    color: white;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-profile:hover, .btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-admin {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e8941f 100%);
}

.btn-admin:hover {
    background: linear-gradient(135deg, #e8941f 0%, var(--secondary-color) 100%);
}

.no-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    color: #999;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: var(--radius-md);
    border: 2px dashed #ddd;
}

.no-items i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--secondary-color);
    opacity: 0.5;
}

.no-items p {
    font-size: 0.95rem;
    margin: 0;
}

/* --- ACTIVITIES PAGE --- */
.calendar-container {
    margin-bottom: 30px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.calendar-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
}

.day-header {
    background: var(--gradient-header);
    color: white;
    font-weight: 600;
    border: none;
}

.calendar-day.empty {
    background-color: transparent;
    border: none;
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.15) 0%, rgba(245, 166, 35, 0.05) 100%);
    border: 2px solid var(--secondary-color);
    font-weight: 700;
}

.calendar-day.has-event {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(196, 30, 58, 0.05) 100%);
    border-color: var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.calendar-day.has-event:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.2);
    z-index: 5;
}

.event-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
}

.event-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
}

.activity-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 20px;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.activity-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.activity-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.pdf-status {
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
}

/* --- SUBSIDIES PAGE --- */
.subvention-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.subvention-item {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.subvention-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.subvention-item.unavailable {
    opacity: 0.6;
}

.subvention-details {
    flex: 1;
}

.subvention-details h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.price-info {
    margin-top: 10px;
}

.price-badge {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.original-price {
    margin-left: 10px;
    text-decoration: line-through;
    color: #6c757d;
}

.subvention-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    min-width: 150px;
}

.limit-badge, .quota-info, .sold-out-badge, .available-badge {
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #6c757d;
}

.sold-out-badge {
    background-color: #dc3545;
    color: white;
}

.available-badge {
    background-color: #28a745;
    color: white;
}

.login-prompt {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.cart-summary {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 90;
}

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

#cart-count {
    font-size: 0.85rem;
    color: #6c757d;
}

#cart-total {
    font-weight: 700;
    color: #28a745;
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 95;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    max-width: 300px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification.success i {
    color: #28a745;
}

.notification.info i {
    color: #17a2b8;
}

.notification.error i {
    color: #dc3545;
}

.close-notification {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #6c757d;
}

.quantity-selector {
    margin: 20px 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    width: 120px;
    margin-top: 5px;
}

.btn-quantity {
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    font-weight: bold;
    cursor: pointer;
}

.quantity-controls input {
    width: 60px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
}

.total-info {
    font-weight: bold;
    margin-top: 15px;
}

/* --- SALES PAGE --- */
.sales-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sales-left, .sales-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 0;
    font-weight: 500;
    color: #2c3e50;
}

.card-body {
    padding: 15px;
}

.beneficiary-selector {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    margin-top: 10px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.search-result-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.no-results {
    padding: 10px;
    color: #6c757d;
    font-style: italic;
}

.beneficiary-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.beneficiary-details h4 {
    margin: 0;
    font-weight: 500;
}

.beneficiary-details p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.products-container {
    max-height: 400px;
    overflow-y: auto;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-info h5 {
    margin: 0 0 5px;
    font-weight: 500;
}

.product-price {
    font-size: 0.9rem;
}

.price {
    font-weight: 700;
    color: #28a745;
}

.original-price {
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 5px;
}

.btn-add-product {
    width: 30px;
    height: 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.btn-add-product:hover {
    background-color: #218838;
}

.cart-container {
    min-height: 200px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #6c757d;
}

.empty-cart i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.3;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.item-info {
    flex: 1;
}

.item-title {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-qty {
    width: 24px;
    height: 24px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
}

.cart-summary {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.recent-orders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.order-info h5 {
    margin: 0 0 5px;
    font-weight: 500;
}

.order-date, .order-customer {
    font-size: 0.85rem;
    color: #6c757d;
}

.order-customer {
    margin-left: 10px;
}

.order-amount {
    text-align: right;
}

.status-badge {
    display: block;
    font-size: 0.8rem;
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 5px;
    text-align: center;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-processing {
    background-color: #17a2b8;
    color: white;
}

.status-completed {
    background-color: #28a745;
    color: white;
}

.status-cancelled {
    background-color: #dc3545;
    color: white;
}

.order-actions {
    display: flex;
    gap: 5px;
}

.checkout-customer-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.checkout-items {
    margin-bottom: 15px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.total-row {
    font-weight: 700;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.payment-method, .additional-notes {
    margin-top: 20px;
}

.radio-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.radio-label {
    margin-left: 10px;
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.2rem;
    }
    
    .content-container {
        padding: 10px;
    }
    
    .page {
        padding: 15px;
    }
    
    .menu-icon {
        font-size: 1.2rem;
    }
    
    .menu-label {
        font-size: 0.8rem;
    }
    
    .home-sections {
        grid-template-columns: 1fr;
    }
    
    .home-sections .welcome-cse {
        grid-column: 1 / -1;
    }
    
    .profile-summary {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .subvention-item {
        flex-direction: column;
    }
    
    .subvention-status {
        margin-top: 15px;
        align-items: flex-start;
    }
    
    .sales-layout {
        grid-template-columns: 1fr;
    }
}

/* --- PORTRAIT MODE --- */
.portrait-mode .main-menu {
    flex-wrap: wrap;
}

.portrait-mode .menu-item {
    width: 33.33%;
}

.portrait-mode .pdf-container {
    height: 80vh;
}

.portrait-mode .documents-container,
.portrait-mode .items-carousel,
.portrait-mode .subsidies-grid {
    grid-template-columns: 1fr;
}

.portrait-mode .subvention-item {
    flex-direction: column;
}

.portrait-mode .subvention-status {
    margin-top: 15px;
    align-items: flex-start;
}

/* --- PROFILE IMPROVED STYLES --- */

/* Structure des onglets */
.profile-tabs {
    margin-top: 20px;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0 15px;
    margin: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 2px solid var(--primary-color);
    gap: 5px;
}

.nav-item {
    margin-bottom: -2px;
}

.nav-link {
    display: block;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    color: #666;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover:not(.active) {
    background-color: rgba(196, 30, 58, 0.05);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: #fff;
    border-color: var(--primary-color) var(--primary-color) #fff;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-color);
}

.tab-content {
    padding: 25px;
    background-color: #fff;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.tab-pane {
    display: none;
}

.tab-pane.show.active {
    display: block;
}

/* Styles pour l'avatar */
.profile-avatar {
    position: relative;
    margin-right: 25px;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 110px;
    height: 110px;
    min-width: 110px;
    min-height: 110px;
    max-width: 110px;
    max-height: 110px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.2);
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1;
    display: block;
}

.profile-avatar:hover .profile-avatar-img {
    transform: scale(1.05);
}

.avatar-change-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-header);
    color: white;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.avatar-change-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Bouton discret quand photo existe */
.avatar-change-btn.has-photo {
    width: 28px;
    height: 28px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.profile-avatar:hover .avatar-change-btn.has-photo {
    opacity: 1;
}

/* Bouton Demander une modification - Style Nidaplast */
.btn-modification-request {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--secondary-color, #F5A623) 0%, #e09000 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(245, 166, 35, 0.3);
}

.btn-modification-request:hover {
    background: linear-gradient(135deg, #e09000 0%, #c87f00 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 166, 35, 0.4);
    transform: translateY(-2px);
}

.btn-modification-request i {
    font-size: 0.9rem;
}

/* Documents à jour - Success Box */
.documents-success-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    margin-bottom: 20px;
}

.documents-success-box .success-icon {
    font-size: 3rem;
    color: #28a745;
    flex-shrink: 0;
}

.documents-success-box .success-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.documents-success-box .success-text strong {
    font-size: 1.2rem;
    color: #155724;
}

.documents-success-box .success-text span {
    font-size: 0.95rem;
    color: #1e7e34;
}

/* Améliorations du profil */
.profile-container {
    background-color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.05) 0%, rgba(245, 166, 35, 0.05) 100%);
    border-bottom: 2px solid var(--secondary-color);
}

.profile-title {
    flex: 1;
}

.profile-title h3 {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.4rem;
}

.profile-role {
    font-size: 0.95rem;
    color: #666;
    font-style: normal;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e8941f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 500;
}

/* Sections du profil */
.profile-section, .security-section, .activity-section, .form-section {
    margin-bottom: 30px;
}

.profile-section h4, .security-section h4, .activity-section h4, .form-section h4 {
    margin-bottom: 18px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section h4::before, .security-section h4::before, .activity-section h4::before, .form-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gradient-header);
    border-radius: 2px;
}

/* Informations profil */
.profile-info .info-row {
    display: flex;
    margin-bottom: 12px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.profile-info .info-row:hover {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.02) 0%, rgba(245, 166, 35, 0.02) 100%);
    transform: translateX(3px);
}

.info-label {
    width: 160px;
    font-weight: 600;
    color: var(--primary-color);
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: #444;
}

/* Contacts d'urgence */
.emergency-contact-card {
    margin-bottom: 18px;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.emergency-contact-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.emergency-contact-card .card-header {
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.05) 0%, #fff 100%);
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emergency-contact-card .card-header h5 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 600;
}

.emergency-contact-card .card-body {
    padding: 18px;
}

.badge {
    display: inline-block;
    padding: 0.35em 0.6em;
    font-size: 75%;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-sm);
}

.badge-primary {
    color: #fff;
    background: var(--gradient-header);
}

/* Indicateurs de statut */
.activity-status, .purchase-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-confirmed {
    background-color: #28a745;
    color: white;
}

.status-cancelled {
    background-color: #dc3545;
    color: white;
}

.status-unknown {
    background-color: #6c757d;
    color: white;
}

/* Tableaux */
.purchases-table {
    width: 100%;
    border-collapse: collapse;
}

.purchases-table th, .purchases-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.purchases-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Sécurité améliorée */
.login-history {
    margin-top: 20px;
}

.login-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.login-ip {
    color: #6c757d;
}

.password-strength {
    margin-top: 5px;
    font-size: 0.8rem;
    height: 20px;
}

.password-strength.weak {
    color: #dc3545;
}

.password-strength.medium {
    color: #ffc107;
}

.password-strength.strong {
    color: #28a745;
}

/* Aperçu d'avatar */
.avatar-preview-container {
    margin-top: 15px;
    text-align: center;
}

#avatar-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.25rem;
}

/* Lorsqu'il n'y a pas de données */
.no-data {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

/* Styles additionnels pour le responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .col-md-6, .col-md-4, .col-md-8 {
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-item {
        width: 50%;
        text-align: center;
    }
    
    .profile-info .info-row {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .activity-item {
        flex-direction: column;
    }
}

/* === STYLES POUR LA SECTION DE BIENVENUE CSE === */
.welcome-cse {
    background: linear-gradient(135deg, #ffffff 0%, rgba(196, 30, 58, 0.02) 50%, rgba(245, 166, 35, 0.03) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 50px;
    margin: 40px 0;
    box-shadow: 0 10px 40px rgba(196, 30, 58, 0.12);
    min-height: 600px;
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
}

.welcome-cse::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, transparent 50%, rgba(245, 166, 35, 0.08) 50%);
    pointer-events: none;
}

.cse-welcome-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.cse-welcome-header i {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: block;
}

.cse-welcome-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
}

.welcome-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.welcome-message p {
    margin-bottom: 20px;
    font-size: 1.2rem;
    line-height: 1.7;
}

.benefits-list {
    margin-top: 25px;
}

.benefits-list .benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.03) 0%, rgba(245, 166, 35, 0.03) 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.benefits-list .benefit-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
    border-left-color: var(--secondary-color);
}

.benefits-list .benefit-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
    min-width: 24px;
}

.benefits-list .benefit-item h4 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.benefits-list .benefit-item p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.4;
}

.login-guide {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.login-guide h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.login-guide h3 i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.login-steps {
    margin-bottom: 25px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 10px 0;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.step p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 2px;
}

.help-info {
    background: rgba(231, 126, 34, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 25px;
}

.help-info i {
    color: var(--secondary-color);
    margin-right: 8px;
}

.help-info p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.login-action {
    text-align: center;
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.3);
    transition: all 0.3s ease;
    background: var(--gradient-header);
    border: none;
    color: white;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.4);
    color: white;
}

.btn-large i {
    margin-right: 10px;
    font-size: 1rem;
}

/* Responsive pour la section de bienvenue */
@media (max-width: 768px) {
    .welcome-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .welcome-cse {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .cse-welcome-header h2 {
        font-size: 1.5rem;
    }
    
    .cse-welcome-header i {
        font-size: 2.5rem;
    }
    
    .benefits-list .benefit-item {
        flex-direction: column;
        text-align: center;
    }
    
    .benefits-list .benefit-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .login-guide {
        padding: 20px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 10px;
    }
}