/* ===========================
   NEGOCIAN EXTEND - Custom Style
   Override Bootstrap avec un design moderne
   =========================== */

/* ===========================
   Variables CSS
   =========================== */
:root {
    /* Couleurs principales */
    --ne-primary: #1A3642;
    --ne-primary-dark: #0f2229;
    --ne-primary-light: #2a4d5e;
    --ne-secondary: #E6214E;
    --ne-secondary-dark: #c41a40;
    --ne-accent: #545bf5;

    /* Couleurs sémantiques */
    --ne-success: #10B981;
    --ne-warning: #F59E0B;
    --ne-danger: #EF4444;
    --ne-info: #3B82F6;

    /* Gris */
    --ne-gray-50: #F9FAFB;
    --ne-gray-100: #F3F4F6;
    --ne-gray-200: #E5E7EB;
    --ne-gray-300: #D1D5DB;
    --ne-gray-400: #9CA3AF;
    --ne-gray-500: #6B7280;
    --ne-gray-600: #4B5563;
    --ne-gray-700: #374151;
    --ne-gray-800: #1F2937;
    --ne-gray-900: #111827;

    /* Backgrounds */
    --ne-bg-light: #f8fafc;
    --ne-bg-white: #ffffff;

    /* Borders */
    --ne-border-color: #e2e8f0;
    --ne-border-radius-sm: 0.375rem;
    --ne-border-radius: 0.5rem;
    --ne-border-radius-lg: 0.75rem;
    --ne-border-radius-xl: 1rem;

    /* Shadows */
    --ne-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ne-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --ne-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ne-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --ne-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --ne-transition-fast: 150ms ease-in-out;
    --ne-transition: 200ms ease-in-out;
    --ne-transition-slow: 300ms ease-in-out;
}

/* ===========================
   Global Styles
   =========================== */
body {
    background-color: var(--ne-bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Buttons Override
   =========================== */
.btn {
    font-weight: 500;
    border-radius: var(--ne-border-radius);
    padding: 0.625rem 1.25rem;
    transition: all var(--ne-transition);
    border: none;
    box-shadow: var(--ne-shadow-sm);
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: var(--ne-shadow-sm);
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(26, 54, 66, 0.15);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--ne-primary) 0%, var(--ne-primary-light) 100%);
    border-color: var(--ne-primary);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--ne-primary-dark) 0%, var(--ne-primary) 100%);
    border-color: var(--ne-primary-dark);
    color: white;
}

.btn-primary:focus {
    background: linear-gradient(135deg, var(--ne-primary) 0%, var(--ne-primary-light) 100%);
    border-color: var(--ne-primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 66, 0.25);
}

/* Secondary Button */
.btn-secondary {
    background: var(--ne-gray-600);
    border-color: var(--ne-gray-600);
}

.btn-secondary:hover {
    background: var(--ne-gray-700);
    border-color: var(--ne-gray-700);
}

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

.btn-outline-primary:hover {
    background: var(--ne-primary);
    border-color: var(--ne-primary);
    color: white;
    box-shadow: var(--ne-shadow-md);
}

/* Outline Secondary */
.btn-outline-secondary {
    color: var(--ne-gray-600);
    border: 2px solid var(--ne-gray-300);
    background: transparent;
    box-shadow: none;
}

.btn-outline-secondary:hover {
    background: var(--ne-gray-100);
    border-color: var(--ne-gray-400);
    color: var(--ne-gray-700);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, var(--ne-success) 0%, #059669 100%);
    border-color: var(--ne-success);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--ne-danger) 0%, #DC2626 100%);
    border-color: var(--ne-danger);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    border-radius: var(--ne-border-radius-sm);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
    border-radius: var(--ne-border-radius-lg);
}

/* ===========================
   Cards Override
   =========================== */
.card {
    border: 1px solid var(--ne-border-color);
    border-radius: var(--ne-border-radius-lg);
    box-shadow: var(--ne-shadow);
    transition: all var(--ne-transition);
    overflow: hidden;
    background: var(--ne-bg-white);
}

.card:hover {
    box-shadow: var(--ne-shadow-lg);
}

.card-header {
    background: var(--ne-gray-50);
    border-bottom: 1px solid var(--ne-border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--ne-gray-50);
    border-top: 1px solid var(--ne-border-color);
    padding: 1rem 1.25rem;
}

/* App Cards (specific) */
.app-card {
    border-radius: var(--ne-border-radius-xl);
    border: 1px solid var(--ne-border-color);
    box-shadow: var(--ne-shadow);
    transition: all var(--ne-transition-slow);
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ne-shadow-xl);
    border-color: var(--ne-gray-300);
}

.app-card .card-img-top {
    border-radius: var(--ne-border-radius-lg) var(--ne-border-radius-lg) 0 0;
}

/* ===========================
   Form Controls Override
   =========================== */
.form-control {
    border: 2px solid var(--ne-border-color);
    border-radius: var(--ne-border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background-color: var(--ne-bg-white);
    transition: all var(--ne-transition);
}

.form-control:focus {
    border-color: var(--ne-primary);
    box-shadow: 0 0 0 4px rgba(26, 54, 66, 0.1);
    outline: none;
}

.form-control:hover:not(:focus):not(:disabled) {
    border-color: var(--ne-gray-400);
}

.form-control::placeholder {
    color: var(--ne-gray-400);
}

.form-control:disabled {
    background-color: var(--ne-gray-100);
    cursor: not-allowed;
}

.form-select {
    border: 2px solid var(--ne-border-color);
    border-radius: var(--ne-border-radius);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 1rem;
    background-color: var(--ne-bg-white);
    transition: all var(--ne-transition);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--ne-primary);
    box-shadow: 0 0 0 4px rgba(26, 54, 66, 0.1);
    outline: none;
}

.form-select:hover:not(:focus):not(:disabled) {
    border-color: var(--ne-gray-400);
}

.form-label {
    font-weight: 600;
    color: var(--ne-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Form Groups */
.mb-3:has(.form-control),
.mb-3:has(.form-select) {
    margin-bottom: 1.25rem !important;
}

/* Input Groups */
.input-group {
    border-radius: var(--ne-border-radius);
}

.input-group .form-control {
    border-radius: var(--ne-border-radius);
}

.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text {
    border: 2px solid var(--ne-border-color);
    background-color: var(--ne-gray-50);
    color: var(--ne-gray-600);
    padding: 0.75rem 1rem;
}

/* Checkboxes & Radios */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    border: 2px solid var(--ne-gray-300);
    transition: all var(--ne-transition-fast);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--ne-primary);
    border-color: var(--ne-primary);
}

.form-check-input:focus {
    border-color: var(--ne-primary);
    box-shadow: 0 0 0 4px rgba(26, 54, 66, 0.1);
}

.form-check-input:hover:not(:checked):not(:disabled) {
    border-color: var(--ne-gray-400);
}

.form-check-label {
    margin-left: 0.25rem;
    cursor: pointer;
    color: var(--ne-gray-700);
}

/* Form Switch */
.form-switch .form-check-input {
    width: 2.5rem;
    height: 1.35rem;
    border-radius: 1rem;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Form Text / Help Text */
.form-text {
    color: var(--ne-gray-500);
    font-size: 0.85rem;
    margin-top: 0.375rem;
}

/* Validation States */
.form-control.is-valid {
    border-color: var(--ne-success);
}

.form-control.is-valid:focus {
    border-color: var(--ne-success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-control.is-invalid {
    border-color: var(--ne-danger);
}

.form-control.is-invalid:focus {
    border-color: var(--ne-danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    color: var(--ne-danger);
    font-size: 0.85rem;
    margin-top: 0.375rem;
}

.valid-feedback {
    color: var(--ne-success);
    font-size: 0.85rem;
    margin-top: 0.375rem;
}

/* Login/Register Form Card */
.auth-card {
    max-width: 450px;
    margin: 2rem auto;
    border-radius: var(--ne-border-radius-xl);
    box-shadow: var(--ne-shadow-lg);
}

.auth-card .card-header {
    background: linear-gradient(135deg, var(--ne-primary) 0%, var(--ne-primary-light) 100%);
    color: white;
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--ne-border-radius-xl) var(--ne-border-radius-xl) 0 0;
}

.auth-card .card-body {
    padding: 2rem;
}

/* ===========================
   Badges Override
   =========================== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.75em;
    border-radius: var(--ne-border-radius-sm);
}

.badge-free,
.bg-success {
    background: linear-gradient(135deg, var(--ne-success) 0%, #059669 100%) !important;
}

.badge-premium,
.bg-warning {
    background: linear-gradient(135deg, var(--ne-warning) 0%, #D97706 100%) !important;
    color: white !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--ne-primary) 0%, var(--ne-primary-light) 100%) !important;
}

.bg-secondary {
    background: var(--ne-gray-500) !important;
}

.bg-danger {
    background: linear-gradient(135deg, var(--ne-danger) 0%, #DC2626 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, var(--ne-info) 0%, #2563EB 100%) !important;
}

/* ===========================
   Alerts Override
   =========================== */
.alert {
    border: none;
    border-radius: var(--ne-border-radius);
    border-left: 4px solid;
    box-shadow: var(--ne-shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-left-color: var(--ne-success);
    color: #065F46;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-left-color: var(--ne-danger);
    color: #991B1B;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left-color: var(--ne-warning);
    color: #92400E;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left-color: var(--ne-info);
    color: #1E40AF;
}

/* ===========================
   Navbar Override
   =========================== */
.navbar {
    background: var(--ne-bg-white) !important;
    box-shadow: var(--ne-shadow);
    border-bottom: 1px solid var(--ne-border-color);
}

.navbar .nav-link {
    color: var(--ne-gray-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--ne-border-radius);
    transition: all var(--ne-transition-fast);
}

.navbar .nav-link:hover {
    color: var(--ne-primary);
    background: var(--ne-gray-100);
}

.navbar .nav-link.active {
    color: var(--ne-primary);
}

/* ===========================
   Dropdown Override
   =========================== */
.dropdown-menu {
    border: 1px solid var(--ne-border-color);
    border-radius: var(--ne-border-radius);
    box-shadow: var(--ne-shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--ne-border-radius-sm);
    padding: 0.5rem 0.75rem;
    transition: all var(--ne-transition-fast);
}

.dropdown-item:hover {
    background: var(--ne-gray-100);
}

.dropdown-item:active {
    background: var(--ne-primary);
    color: white;
}

.dropdown-divider {
    border-color: var(--ne-border-color);
    margin: 0.5rem 0;
}

/* ===========================
   Hero Section Enhancement
   =========================== */
.hero-section {
    background: linear-gradient(135deg, var(--ne-primary) 0%, var(--ne-primary-light) 50%, var(--ne-accent) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

/* ===========================
   Footer Enhancement
   =========================== */
footer {
    background: linear-gradient(135deg, var(--ne-gray-800) 0%, var(--ne-gray-900) 100%);
    border-top: 1px solid var(--ne-gray-700);
}

footer a {
    transition: all var(--ne-transition-fast);
}

footer a:hover {
    color: white !important;
    padding-left: 4px;
}

/* ===========================
   Category Cards (Catalog)
   =========================== */
.category-card {
    background: var(--ne-bg-white);
    border: 1px solid var(--ne-border-color);
    border-radius: var(--ne-border-radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--ne-transition);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--ne-primary);
    background: linear-gradient(135deg, var(--ne-gray-50) 0%, var(--ne-bg-white) 100%);
    transform: translateY(-2px);
    box-shadow: var(--ne-shadow-md);
}

.category-card.active {
    border-color: var(--ne-primary);
    background: linear-gradient(135deg, rgba(26, 54, 66, 0.05) 0%, var(--ne-bg-white) 100%);
}

.category-card i {
    font-size: 1.5rem;
    color: var(--ne-primary);
    margin-bottom: 0.5rem;
}

/* ===========================
   Pagination Override
   =========================== */
.pagination .page-link {
    border: 1px solid var(--ne-border-color);
    color: var(--ne-gray-600);
    border-radius: var(--ne-border-radius-sm);
    margin: 0 0.125rem;
    transition: all var(--ne-transition-fast);
}

.pagination .page-link:hover {
    background: var(--ne-gray-100);
    border-color: var(--ne-gray-300);
    color: var(--ne-primary);
}

.pagination .page-item.active .page-link {
    background: var(--ne-primary);
    border-color: var(--ne-primary);
}

/* ===========================
   Breadcrumb Override
   =========================== */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--ne-gray-500);
    transition: color var(--ne-transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--ne-primary);
}

.breadcrumb-item.active {
    color: var(--ne-gray-700);
}

/* ===========================
   List Group Override
   =========================== */
.list-group-item {
    border: 1px solid var(--ne-border-color);
    padding: 0.875rem 1.25rem;
    transition: all var(--ne-transition-fast);
}

.list-group-item:first-child {
    border-radius: var(--ne-border-radius) var(--ne-border-radius) 0 0;
}

.list-group-item:last-child {
    border-radius: 0 0 var(--ne-border-radius) var(--ne-border-radius);
}

.list-group-item:hover {
    background: var(--ne-gray-50);
}

.list-group-item.active {
    background: var(--ne-primary);
    border-color: var(--ne-primary);
}

/* ===========================
   Modal Override
   =========================== */
.modal-content {
    border: none;
    border-radius: var(--ne-border-radius-xl);
    box-shadow: var(--ne-shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--ne-border-color);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--ne-border-color);
    padding: 1rem 1.5rem;
}

/* ===========================
   Table Override
   =========================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--ne-gray-50);
    border-bottom: 2px solid var(--ne-border-color);
    font-weight: 600;
    color: var(--ne-gray-700);
    padding: 0.875rem 1rem;
}

.table td {
    border-bottom: 1px solid var(--ne-border-color);
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--ne-gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--ne-gray-50);
}

/* ===========================
   Rating Stars
   =========================== */
.rating {
    color: var(--ne-warning);
}

.rating .bi-star-fill,
.rating .bi-star-half,
.rating .bi-star {
    transition: transform var(--ne-transition-fast);
}

.rating:hover .bi-star-fill,
.rating:hover .bi-star-half {
    transform: scale(1.1);
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ne-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--ne-gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ne-gray-400);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ne-gray-300) var(--ne-gray-100);
}

/* ===========================
   Utility Classes
   =========================== */
.shadow-hover {
    transition: box-shadow var(--ne-transition);
}

.shadow-hover:hover {
    box-shadow: var(--ne-shadow-lg) !important;
}

.lift-hover {
    transition: transform var(--ne-transition);
}

.lift-hover:hover {
    transform: translateY(-4px);
}

.border-primary {
    border-color: var(--ne-primary) !important;
}

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

.bg-light {
    background-color: var(--ne-bg-light) !important;
}
