/* ============================================
   STYLES PERSONNALISÉS
   ============================================
   Styles qui n'existent pas dans Bootstrap et sont
   spécifiques à votre application
   ============================================ */

/* ============================================
   1. VARIABLES CSS PERSONNALISÉES
   ============================================ */
:root {
    --gray: #3a393b;
    --body-bg: #16191c;
    --violet: #ff5f17;
    --fanta: #ff8016;
    --fanta2: #ff5f17;
    --bs-white: #ffffff;

    /* Couleurs des boutons d'action principale */
    --btn-edit-primary: #ffc107;           /* Orange/Jaune Bootstrap warning - pour modifier/éditer */
    --btn-edit-primary-hover: #e0a800;     /* Orange plus foncé au survol */
    --btn-add-primary: #0d6efd;            /* Bleu Bootstrap primary - pour ajouter */
    --btn-confirm: #28a745;                /* Vert - pour confirmer/valider */
    --btn-cancel: #6c757d;                 /* Gris - pour annuler */
    --btn-danger-action: #dc3545;          /* Rouge - pour supprimer/retirer */
}

/* ============================================
   ICÔNES FONTAWESOME
   ============================================ */
.fa {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   TITRES (HEADINGS)
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   MODAL PERSONNALISÉ (Bar désactivé)
   ============================================ */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.custom-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2a2d35 0%, #1f2228 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    color: #ffffff;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
}

.custom-modal-title {
    margin: 0;
    font-size: 1.3rem;
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.custom-modal-close:hover {
    opacity: 1;
}

.custom-modal-body {
    padding: 2rem 1.5rem;
}

.custom-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.custom-modal-btn {
    background-color: var(--btn-cancel);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-modal-btn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   2. LAYOUT
   ============================================ */

/* Wrapper avec gradient personnalisé */
.wrapper {
    position: relative;
    /*background: radial-gradient(ellipse at bottom, hsla(212, 20%, 45%, 0.75) 0%, hsla(212, 20%, 13%, 0.9) 100%);*/
    background-attachment: fixed;
    text-align: start;
    color: hsla(212, 20%, 95%, 1);
    min-height: 100vh;
}

/* Corps de la page avec marges */
.corp {
    --margin-tb: 4rem;
    margin-top: var(--margin-tb);
    margin-bottom: var(--margin-tb);
    overflow-x: hidden;
}

/* Empêche le défilement horizontal sur toute l'application */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Sticky navigation */
.sticky {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sticky + .content {
    padding-top: 60px;
}

/* Container de login */
.login-box {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
}

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

.login-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.input-with-icon {
    position: relative;
}

.input-with-icon .form-control {
    transition: all 0.3s ease;
}

.input-with-icon .form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 135, 245, 0.2);
}

/* Fix input-group alignment dans login-box */
.login-box .input-group {
    align-items: center;
}

.login-box .input-group-text {
    height: auto;
}

.login-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5) !important;
}

/* Animation pour les labels */
.form-label {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Titre de la page d'accueil */
.home-title {
    font-size: calc(2.275rem + 0.6vw);
    color: var(--bs-white);
    text-align: center;
}

/* ============================================
   3. COMPOSANTS RÉUTILISABLES
   ============================================ */

/* Classes utilitaires pour boutons d'action */
.btn-edit-action {
    background: var(--btn-edit-primary) !important;
    border-color: var(--btn-edit-primary) !important;
    color: #000 !important;
}

.btn-edit-action:hover {
    background: var(--btn-edit-primary-hover) !important;
    border-color: var(--btn-edit-primary-hover) !important;
}

.btn-add-action {
    background: var(--btn-add-primary) !important;
    border-color: var(--btn-add-primary) !important;
    color: #fff !important;
}

.btn-confirm-action {
    background: var(--btn-confirm) !important;
    border-color: var(--btn-confirm) !important;
    color: #fff !important;
}

.btn-cancel-action {
    background: var(--btn-cancel) !important;
    border-color: var(--btn-cancel) !important;
    color: #fff !important;
}

.btn-danger-action {
    background: var(--btn-danger-action) !important;
    border-color: var(--btn-danger-action) !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Liste sans style (Bootstrap override) */
.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.list-unstyled li {
    text-align: left;
}

/* Texte justifié */
.text-justify {
    text-align: justify !important;
}

/* Alignement à gauche */
.text-left {
    text-align: left !important;
}

/* Effet hover pour les cards cliquables */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

/* Effet hover-shadow pour les cartes produits */
.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Couleurs personnalisées pour icônes */
.text-purple {
    color: #6f42c1 !important;
}

.text-amber {
    color: #ffa500 !important;
}

.text-brown {
    color: #8b4513 !important;
}

/* Bannière d'installation PWA */
.pwa-install-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    overflow: hidden;
}

.pwa-install-banner .card-body {
    position: relative;
}

.pwa-install-banner h5 {
    color: white;
    font-weight: 600;
}

.pwa-install-banner .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.pwa-install-banner .btn-close {
    filter: invert(1) brightness(2);
    opacity: 0.7;
}

.pwa-install-banner .btn-close:hover {
    opacity: 1;
}

.pwa-icon-container {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-icon-container i {
    color: white !important;
}

.pwa-install-banner .btn-primary {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.pwa-install-banner .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.pwa-install-banner .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.pwa-install-banner .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

.pwa-install-banner .border-top {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Animation d'apparition */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Pop-up incitatif d'abonnement aux notifications push */
.push-prompt-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 80px; /* au-dessus de la barre de navigation fixe */
    z-index: 1080;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    pointer-events: none; /* laisse cliquer à travers l'espace vide */
}

.push-prompt-card {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    overflow: hidden;
    animation: pushPromptIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.push-prompt-overlay.is-hiding .push-prompt-card {
    animation: pushPromptOut 0.3s ease forwards;
}

@keyframes pushPromptOut {
    to {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }
}

.push-prompt-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.push-prompt-close:hover {
    color: #fff;
}

.push-prompt-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pushBellRing 2.8s ease-in-out infinite;
    transform-origin: top center;
}

.push-prompt-bell {
    color: #fff;
}

@keyframes pushBellRing {
    0%, 65%, 100% { transform: rotate(0); }
    70% { transform: rotate(14deg); }
    76% { transform: rotate(-12deg); }
    82% { transform: rotate(9deg); }
    88% { transform: rotate(-6deg); }
    94% { transform: rotate(3deg); }
}

.push-prompt-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 8px;
}

.push-prompt-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 18px;
}

.push-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.push-prompt-card .btn-primary {
    width: 100%;
    background: #fff;
    color: #667eea;
    border: none;
    font-weight: 600;
    border-radius: 50px;
    padding: 11px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.push-prompt-card .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.push-prompt-card .btn-primary:disabled {
    opacity: 0.7;
    transform: none;
}

.push-prompt-later {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: none;
}

.push-prompt-later:hover {
    color: #fff;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .push-prompt-card,
    .push-prompt-icon {
        animation: none;
    }
}

/* ============================================
   4. SCROLLBAR PERSONNALISÉE
   ============================================ */

/* Cache toutes les scrollbars de l'application */
* {
    -ms-overflow-style: none;  /* IE et Edge */
    scrollbar-width: none;     /* Firefox */
}

*::-webkit-scrollbar {
    display: none;             /* Chrome, Safari, Opera */
}

/* Cache la scrollbar pour le body */
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-y: auto;
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    display: none;
}

/* Cache la scrollbar pour les éléments avec la classe hide-scrollbar */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   5. AVATAR (Composant custom)
   ============================================ */

.avatar {
    position: relative;
    display: flex;
    height: 44px;
    width: 44px;
}

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

.avatar,
.avatar .avatar-img,
.avatar .avatar-text {
    border-radius: 50%;
}

.avatar .avatar-text {
    background: #2787F5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    line-height: 0;
    height: 100%;
    width: 100%;
    font-size: 15px;
}

.avatar:hover .avatar-text {
    background: #1d82f5;
}

.avatar-group .avatar + .avatar {
    margin-left: -17.6px;
}

/* ============================================
   6. MODAL PERSONNALISÉ
   ============================================ */

.modal {
    background-color: rgba(0, 0, 0, 0.75);
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    display: flex;
}

.modal-content {
    max-width: 90vw;
    margin: auto;
    flex: 1;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    /* Padding bottom pour éviter que la navbar fixe cache les boutons */
    padding-bottom: 20px;
}

/* Modal de confirmation centré */
#confirmModal {
    display: flex;
    align-items: center;
    justify-content: center;
}

#confirmModal .modal-dialog {
    margin: 0;
    max-width: 500px;
    width: 90%;
}

#confirmModal .modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

#confirmModal .modal-content {
    width: 100%;
    margin: 0;
    flex: none;
    background: #16191c;
    border: 2px solid rgba(116, 81, 235, 0.3);
    border-radius: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#confirmModal .modal-header {
    border-bottom: 1px solid rgba(116, 81, 235, 0.2);
    padding: 1.25rem;
}

#confirmModal .modal-body {
    padding: 1.5rem;
    color: var(--bs-white);
}

#confirmModal .modal-footer {
    border-top: 1px solid rgba(116, 81, 235, 0.2);
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Styles pour les modals de sélection d'équipe */
#teamSelectionModal,
#newOrderModal,
#addCollaboratorModal,
#onboardingModal {
    display: flex;
    align-items: center;
    justify-content: center;
}

#teamSelectionModal .modal-dialog,
#newOrderModal .modal-dialog,
#addCollaboratorModal .modal-dialog,
#onboardingModal .modal-dialog {
    margin: 0;
    max-width: 500px;
    width: 90%;
}

#teamSelectionModal .modal-dialog-centered,
#newOrderModal .modal-dialog-centered,
#addCollaboratorModal .modal-dialog-centered,
#onboardingModal .modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

#teamSelectionModal .modal-content,
#newOrderModal .modal-content,
#addCollaboratorModal .modal-content,
#onboardingModal .modal-content {
    width: 100%;
    margin: 0;
    flex: none;
    background-color: var(--bs-dark);
    color: var(--bs-white);
    border: 1px solid rgba(116, 81, 235, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#teamSelectionModal .modal-header,
#newOrderModal .modal-header,
#addCollaboratorModal .modal-header,
#onboardingModal .modal-header {
    border-bottom: 1px solid rgba(116, 81, 235, 0.2);
    padding: 1.25rem;
}

#teamSelectionModal .modal-body,
#newOrderModal .modal-body,
#addCollaboratorModal .modal-body,
#onboardingModal .modal-body {
    padding: 1.5rem;
    color: var(--bs-white);
}

#teamSelectionModal .modal-footer,
#newOrderModal .modal-footer,
#addCollaboratorModal .modal-footer,
#onboardingModal .modal-footer {
    border-top: 1px solid rgba(116, 81, 235, 0.2);
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Styles pour les checkboxes et radio buttons dans les modals */
#teamSelectionModal .form-check-input,
#addCollaboratorModal .form-check-input,
#newOrderModal .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(116, 81, 235, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

#teamSelectionModal .form-check-input:hover,
#addCollaboratorModal .form-check-input:hover,
#newOrderModal .form-check-input:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(116, 81, 235, 0.7);
}

#teamSelectionModal .form-check-input:focus,
#addCollaboratorModal .form-check-input:focus,
#newOrderModal .form-check-input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 0.25rem rgba(116, 81, 235, 0.25);
}

#teamSelectionModal .form-check-input:checked,
#addCollaboratorModal .form-check-input:checked,
#newOrderModal .form-check-input:checked {
    background-color: var(--violet);
    border-color: var(--violet);
}

#teamSelectionModal .form-check-input:disabled,
#addCollaboratorModal .form-check-input:disabled,
#newOrderModal .form-check-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#addCollaboratorModal .form-select,
#newOrderModal .form-select {
    background-color: var(--bs-gray-dark);
    border-color: rgba(116, 81, 235, 0.3);
    color: var(--bs-white);
}

#teamSelectionModal .form-check-label,
#addCollaboratorModal label,
#newOrderModal label {
    color: var(--bs-white);
}

#addCollaboratorModal .form-select option,
#newOrderModal .form-select option {
    background-color: var(--bs-dark);
    color: var(--bs-white);
}

/* ============================================
   7. UTILITAIRES
   ============================================ */

/* Messages Notyf cachés */
#notyf-message {
    display: none;
}

/* HR personnalisé */
hr {
    margin: 1rem 0;
    color: #1e2126;
    border: 0;
    border-top: 2px solid;
    opacity: 1;
}

/* Form z-index */
form {
    z-index: 1000;
}

/* Flexbox - Alignement vertical */
.align-items-center {
    align-items: center !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.align-items-end {
    align-items: flex-end !important;
}

/* Flexbox - Alignement horizontal */
.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-around {
    justify-content: space-around !important;
}

.justify-content-start {
    justify-content: flex-start !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

/* Display utilities */
.d-none {
    display: none !important;
}

.d-inline {
    display: inline !important;
}

.d-inline-block {
    display: inline-block !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

/* Background colors (Bootstrap) */
.bg-primary {
    background-color: #0d6efd !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-white {
    background-color: #f8f9fa !important;
}

.bg-dark {
    background-color: #343a40 !important;
}

/* Text colors (Bootstrap) */
.text-primary {
    color: #0d6efd !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-light {
    color: #f8f9fa !important;
}

.text-dark {
    color: #343a40 !important;
}

.text-white {
    color: #ffffff !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Text alignment */
.text-start {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-end {
    text-align: right !important;
}

/* Flexbox utilities */
.flex-grow-0 {
    flex-grow: 0 !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.flex-shrink-1 {
    flex-shrink: 1 !important;
}

/* Margin utilities */
.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.me-3 {
    margin-right: 1rem !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.ms-3 {
    margin-left: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* ============================================
   8. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* Overlay responsive */
    div[style*="absolute"] {
        width: 100%;
        height: auto;
    }

    div[style*="absolute"] p {
        font-size: calc(0.9em + 0.5vw);
    }

    div[style*="absolute"] a {
        font-size: calc(0.9em + 0.5vw);
        padding: 10px 15px;
    }
}

/* ============================================
   9. PRODUCTS LIST - CSS ONLY ENHANCEMENTS
   ============================================ */

/* Amélioration de la carte produit */
.produit {
    background: #16191c;
    border-radius: 0.8rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #1e2126;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.produit:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--violet);
}

/* Amélioration du conteneur d'image */
.produit .d-flex.justify-content-center {
    position: relative;
    background: rgba(30, 33, 38, 0.5);
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produit .d-flex.justify-incremente {
    position: relative;
    background: rgba(30, 33, 38, 0.5);
    padding: 1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produit img.avatar {
    border-radius: 0.6rem;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.produit:hover img.avatar {
    transform: scale(1.02);
}

/* Amélioration du corps de la carte */
.produit .card-body {
    padding: 1.5rem;
}

.produit .card-title {
    color: var(--bs-white);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Amélioration des informations de prix et stock */
.produit .card-text {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(30, 33, 38, 0.5);
    margin-bottom: 0.75rem !important;
}

.produit .card-text:first-of-type {
    color: var(--violet);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Badge visuel pour le stock */
.produit .text-danger {
    background: rgba(220, 53, 69, 0.15);
    border-left: 3px solid var(--bs-danger-rgb);
}

.produit .text-success {
    background: rgba(40, 167, 69, 0.15);
    border-left: 3px solid #28a745;
}

/* Amélioration du formulaire de modification */
.produit form[id^="updateForm_"] {
    background: rgba(30, 33, 38, 0.7);
    padding: 1.25rem;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(116, 81, 235, 0.3);
    animation: slideDown 0.3s ease;
}

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

.produit form[id^="updateForm_"] .form-control {
    background: #1e2126;
    border: 2px solid #2a2d32;
    color: var(--bs-white);
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.produit form[id^="updateForm_"] .form-control:focus {
    border-color: var(--violet);
    background: #16191c;
    box-shadow: 0 0 0 3px rgba(116, 81, 235, 0.1);
}

/* Amélioration des boutons d'action */
.produit .btn {
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.produit .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.produit .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Boutons spécifiques */
.produit .btn-warning {
    background: linear-gradient(135deg, var(--fanta2) 0%, var(--fanta) 100%);
    border: none;
}

.produit .btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--fanta) 0%, var(--fanta2) 100%);
}

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

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

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

.produit .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.produit .btn-info {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
}

.produit .btn-info:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
}

/* Conteneur des boutons */
.produit .d-flex.justify-content-between {
    gap: 0.75rem;
    margin-top: 1rem;
}

.produit .d-flex.justify-content-between .btn {
    flex: 1;
}

/* Amélioration de l'accordéon des catégories */
.accordion-header {
    background: rgba(30, 33, 38, 0.6);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-size: 1.1rem;
    scroll-margin-top: 120px; /* Offset pour ne pas cacher sous la navbar */
}

.accordion-item {
    scroll-margin-top: 120px; /* Offset pour les items d'accordéon */
}

.accordion-header:hover {
    background: rgba(30, 33, 38, 0.8);
    transform: translateX(4px);
}

.accordion-body {
    background: transparent;
    padding: 1.5rem 0;
}

/* Grille responsive pour les produits */
.accordion-body .row {
    gap: 1.5rem;
}

.accordion-body .card.col-md-6 {
    flex: 1 1 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
}

/* Support pour col-md-4 (3 colonnes par ligne) */
.col-md-4,
.card.col-md-4 {
    flex: 1 1 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
}

.row .col-md-4 {
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .accordion-body .card.col-md-6 {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* Responsive pour col-md-4 sur mobile */
    .col-md-4,
    .card.col-md-4 {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .produit .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* ============================================
   10. ADD PRODUCTS PAGE - CSS ONLY ENHANCEMENTS
   ============================================ */

/* Formulaire d'ajout de produit */
form.product {
    background: #16191c;
    border-radius: 0.8rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #1e2126;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

form.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--violet);
}

/* Conteneur d'image pour les produits à ajouter */
form.product .d-flex.justify-content-center:first-of-type {
    position: relative;
    background: rgba(30, 33, 38, 0.5);
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

form.product img.avatar {
    border-radius: 0.6rem;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

form.product:hover img.avatar {
    transform: scale(1.02);
}

/* Titre du produit à ajouter */
form.product .d-flex.justify-content-center h3 {
    color: var(--bs-white);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 1rem 0;
    line-height: 1.4;
    text-align: center;
}

/* Input de prix */
form.product input[type="number"] {
    background: #1e2126;
    border: 2px solid #2a2d32;
    color: var(--bs-white);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.6rem;
    transition: all 0.3s ease;
}

form.product input[type="number"]:focus {
    border-color: var(--violet);
    background: #16191c;
    box-shadow: 0 0 0 3px rgba(116, 81, 235, 0.1);
    outline: none;
}

form.product input[type="number"]::placeholder {
    color: #a7a6a8;
    opacity: 0.8;
}

/* Bouton d'ajout */
form.product .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
}

form.product .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

form.product .btn-success:active:not(:disabled) {
    transform: translateY(0);
}

form.product .btn-success:disabled,
form.product[disabled] .btn-success {
    opacity: 0.5;
    cursor: not-allowed;
}

/* État désactivé pour le formulaire complet */
form.product[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

/* Card body pour l'ajout de produits */
form.product .card-body {
    padding: 1.5rem;
}

/* Message vide */
form.product ~ em {
    display: block;
    text-align: center;
    padding: 3rem 1rem;
    color: #a7a6a8;
    font-style: normal;
    background: rgba(30, 33, 38, 0.5);
    border-radius: 0.8rem;
    border: 2px dashed #2a2d32;
}

/* Responsive pour la grille des produits à ajouter */
@media (max-width: 768px) {
    form.product .btn-success {
        font-size: 0.875rem;
        padding: 0.6rem 1rem;
    }
}

/* ============================================
   11. DELIVERY PAGE - CSS ONLY ENHANCEMENTS
   ============================================ */

/* Informations CA et quantités dans les livraisons */
.produit h4 {
    color: var(--bs-white);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(30, 33, 38, 0.5);
    margin-bottom: 0.75rem;
}

.produit h4 span {
    color: var(--violet);
    font-weight: 700;
}

/* Formulaire d'ajout dans les livraisons */
.produit form[id^="updateForm_"] .form-control {
    margin-bottom: 1rem;
}

.produit form[id^="updateForm_"] input[type="number"]::placeholder {
    font-size: 0.9rem;
}

/* Bouton principal de livraison */
.produit button[id^="livraison_"].btn-primary {
    background: linear-gradient(135deg, var(--violet) 0%, #5f3cbe 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.produit button[id^="livraison_"].btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5f3cbe 0%, #4e32a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 81, 235, 0.4);
}

.produit button[id^="livraison_"].btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Total CA dans livraison */
#ca {
    color: var(--violet);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    background: rgba(116, 81, 235, 0.1);
    border-radius: 0.8rem;
    border: 2px solid rgba(116, 81, 235, 0.3);
    margin-bottom: 1.5rem;
}

/* Formulaire de total facture */
#totalFacture {
    background: rgba(30, 33, 38, 0.5);
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 2px solid #1e2126;
}

#totalFacture .input-group {
    background: transparent;
}

#totalFacture input[type="integer"],
#totalFacture input.form-control {
    background: #1e2126;
    border: 2px solid #2a2d32;
    color: var(--bs-white);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#totalFacture input:focus {
    border-color: var(--fanta);
    background: #16191c;
    box-shadow: 0 0 0 3px rgba(255, 128, 22, 0.1);
    outline: none;
}

#totalFacture .btn-dark {
    background: linear-gradient(135deg, var(--fanta2) 0%, var(--fanta) 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

#totalFacture .btn-dark:hover {
    background: linear-gradient(135deg, var(--fanta) 0%, var(--fanta2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 128, 22, 0.4);
}

/* Formulaire d'image de facture */
#factureImg {
    background: rgba(30, 33, 38, 0.5);
    padding: 1.5rem;
    border-radius: 0.8rem;
    border: 2px solid #1e2126;
}

#factureImg input[type="file"] {
    background: #1e2126;
    border: 2px solid #2a2d32;
    color: var(--bs-white);
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    transition: all 0.3s ease;
}

#factureImg input[type="file"]:focus {
    border-color: var(--violet);
    background: #16191c;
    outline: none;
}

#factureImg .btn-dark {
    background: linear-gradient(135deg, var(--violet) 0%, #5f3cbe 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

#factureImg .btn-dark:hover {
    background: linear-gradient(135deg, #5f3cbe 0%, #4e32a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 81, 235, 0.4);
}

/* Boutons d'action de livraison - Cloturer et Annuler */
.d-flex.justify-content-between form .btn-success,
.d-flex.justify-content-between form .btn-info {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.d-flex.justify-content-between form .btn-info {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.d-flex.justify-content-between form .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.d-flex.justify-content-between form .btn-info:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* Séparateurs */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(116, 81, 235, 0.3), transparent);
    margin: 2rem 0;
}

/* Responsive pour les livraisons */
@media (max-width: 768px) {
    #ca {
        font-size: 1.1rem;
        padding: 0.75rem;
    }

    #totalFacture,
    #factureImg {
        padding: 1rem;
    }

    .d-flex.justify-content-between form .btn-success,
    .d-flex.justify-content-between form .btn-info {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* ============================================
   12. DELIVERY VIEW PAGE - CSS ENHANCEMENTS
   ============================================ */

/* Statistiques principales en haut */
body > .container h2.bg-light.rounded.text-center,
#body h2.bg-light.rounded.text-center,
h2.bg-light.rounded.text-center {
    background: linear-gradient(135deg, rgba(116, 81, 235, 0.7) 0%, rgba(116, 81, 235, 0.7) 100%) !important;
    border: 2px solid rgba(116, 81, 235, 0.3);
    padding: 1.25rem 1.5rem;
    border-radius: 0.8rem !important;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bs-white);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

h2.bg-light.rounded.text-center:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(116, 81, 235, 0.3);
}

/* Style spécifique pour le CA ajouté (si role boss) */
h2.bg-light.rounded.text-center:first-of-type {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.05) 100%) !important;
    border-color: rgba(40, 167, 69, 0.4);
}

h2.bg-light.rounded.text-center:first-of-type:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

/* Bénéfice total (deuxième h2) */
h2.text-center:not(.bg-light):not(.rounded) {
    background: linear-gradient(135deg, rgba(255, 128, 22) 0%, rgba(255, 128, 22, 0.7) 100%);
    border: 2px solid rgba(255, 128, 22, 0.3);
    padding: 1.25rem 1.5rem;
    border-radius: 0.8rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bs-white);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

h2.text-center:not(.bg-light):not(.rounded):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 128, 22, 0.3);
}

/* Bénéfice dans les cartes produits */
.produit .bg-info.rounded {
    background: linear-gradient(135deg, rgba(255, 128, 22, 0.2) 0%, rgba(255, 95, 23, 0.1) 100%) !important;
    border: 2px solid rgba(255, 128, 22, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 0.6rem !important;
    font-weight: 600;
    color: var(--fanta);
    margin-bottom: 1rem !important;
    text-align: center;
}

/* CA dans les cartes produits */
.produit .bg-success.rounded {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(33, 136, 56, 0.1) 100%) !important;
    border: 2px solid rgba(40, 167, 69, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 0.6rem !important;
    font-weight: 700;
    color: #28a745;
    text-align: center;
}

/* Lien de téléchargement de facture */
a[download] {
    display: block;
    text-align: center;
    padding: 1.5rem;
    background: rgba(30, 33, 38, 0.5);
    border: 2px solid #1e2126;
    border-radius: 0.8rem;
    color: var(--violet);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

a[download]:hover {
    background: rgba(116, 81, 235, 0.1);
    border-color: var(--violet);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 81, 235, 0.3);
    color: var(--violet);
}

a[download] img.avatar {
    display: block;
    margin: 1rem auto 0;
    max-width: 300px;
    border-radius: 0.8rem;
    border: 3px solid var(--violet);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

a[download]:hover img.avatar {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(116, 81, 235, 0.4);
}

/* Message sans facture */
body > .container > *:last-child:not(a),
#body > *:last-child:not(a) {
    color: #a7a6a8;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: rgba(30, 33, 38, 0.5);
    border-radius: 0.8rem;
    margin-top: 2rem;
}

/* Responsive pour la page de visualisation */
@media (max-width: 768px) {
    h2.bg-light.rounded.text-center,
    h2.text-center:not(.bg-light):not(.rounded) {
        font-size: 1.1rem;
        padding: 1rem;
    }

    a[download] {
        font-size: 1rem;
        padding: 1rem;
    }

    a[download] img.avatar {
        max-width: 100%;
    }
}

/* ============================================
   13. CASH OPERATIONS LIST - CARDS MOBILE-FRIENDLY
   ============================================ */

.cash-operations-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cash-operation-card {
    background: #16191c;
    border: 2px solid #1e2126;
    border-radius: 0.8rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cash-operation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(116, 81, 235, 0.5);
}

.cash-operation-card .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

.cash-operation-card small {
    font-size: 0.875rem;
}

.cash-operation-card strong {
    font-weight: 700;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .cash-operation-card {
        padding: 1rem;
    }

    .cash-operation-card .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cash-operation-card strong {
        font-size: 1rem !important;
    }
}

/* ============================================
   PASSWORD TOGGLE BUTTON
   ============================================ */
[data-controller="password-toggle"] button {
    transition: color 0.2s ease, transform 0.1s ease;
}

[data-controller="password-toggle"] button:hover {
    color: var(--violet) !important;
    transform: translateY(-50%) scale(1.1);
}

[data-controller="password-toggle"] button:active {
    transform: translateY(-50%) scale(0.95);
}

[data-controller="password-toggle"] button:focus {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
    border-radius: 4px;
}
