:root {
    --primary-color: #FF8C00;
    --secondary-color: #3d1c00;
    --accent-color: #FFA500;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --text-color: #333;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.role-admin {
    background: #e1bee7;
    color: #6a1b9a;
}

.role-employe {
    background: #bbdefb;
    color: #1565c0;
}

.stock-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.stock-critique {
    background: #ffdde1;
    color: #ee0979;
}

.stock-faible {
    background: #fff3cd;
    color: #856404;
}

.stock-correct {
    background: #d4edda;
    color: #155724;
}

/* Modal and Professional UI Improvements */
.swal2-popup {
    font-family: 'Poppins', sans-serif !important;
}

.pro-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--light-bg);
    overflow-x: hidden;
}

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

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

/* Login Page Stylée */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

.login-box h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 28px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.input-modern {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.input-modern:focus {
    border-color: var(--primary-color);
}

.profile-details {
    display: flex;
    align-items: center;
    background: #F5F6FA;
    border: 2px solid #EFEEF1;
    border-radius: 6px;
    height: 50px;
    min-width: 190px;
    padding: 0 15px 0 2px;
}

.user-info {
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.admin_name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: #666;
}

.profile-details i {
    font-size: 24px;
    color: var(--primary-color);
}

/* Footer stylé */
.app-footer {
    padding: 20px;
    background: var(--white);
    margin: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
}

.footer-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.footer-contact {
    display: flex;
    gap: 20px;
}

/* Modern Animated Footer */
.pro-footer {
  background: var(--white);
  border-top: 1px solid #dee2e6;
  padding: 2rem 0;
  width: 100%;
  margin-top: 50px;
  animation: fadeIn 0.8s ease-out;
}

.footer-programmer-name {
  font-weight: 800;
  text-transform: uppercase;
  animation: colorChange 5s infinite linear;
  display: inline-block;
}

@keyframes colorChange {
  0% { color: #0d6efd; }
  25% { color: #6610f2; }
  50% { color: #d63384; }
  75% { color: #fd7e14; }
  100% { color: #0d6efd; }
}

.footer-photo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  padding: 2px;
  cursor: pointer;
  transition: transform 0.2s;
}

.footer-photo:hover {
  transform: scale(1.1);
}

.footer-skill-badge {
  font-size: 0.7rem;
  background: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.footer-link {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-contact-item {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
}

.contact-item i {
    font-size: 20px;
    color: var(--accent-color);
}

/* Badges pour les rôles */
.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.role-admin {
    background: #FFD700;
    color: #856404;
}

.role-employe {
    background: #D1ECF1;
    color: #0C5460;
}

button[type="submit"], .cta-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

button[type="submit"]:hover {
    background: var(--accent-color);
}

/* Dashboard Enhancements */
.home-content {
    padding: 20px;
    animation: fadeIn 0.5s ease-in;
}

/* Fixed overlap issue on small screens */
@media (max-width: 768px) {
    .home-content {
        padding-top: 80px !important;
    }
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .overview-boxes .box {
        margin: 5px 0 !important;
    }
}

.overview-boxes .box {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 5px solid var(--primary-color);
}

.overview-boxes .box:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Table Enhancements */
.mtable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.mtable th {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    text-align: left;
}

.mtable tr {
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.mtable tr:hover {
    transform: scale(1.01);
}

/* Fix pour l'affichage de l'image de profil et du nom */
.profile-details i.bxl-medium-old {
    font-size: 32px;
}

/* Alertes stylées */
.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-out;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Correction de l'espacement global */
.home-content {
    padding: 20px;
}

/* Ajustement pour les petits écrans */
@media (max-width: 1000px) {
    .overview-boxes .box {
        width: calc(100% / 2 - 15px);
        margin-bottom: 15px;
    }
}

@media (max-width: 700px) {
    .overview-boxes .box {
        width: 100%;
    }
    .sales-boxes .recent-sales {
        width: 100%;
    }
}

.mtable td {
    padding: 15px;
}

/* Sidebar Modernization */
.sidebar {
    background: var(--secondary-color);
}

.sidebar .nav-links li a:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 10px;
}

.sidebar .nav-links li a.active {
    background: var(--primary-color);
    border-right: 4px solid var(--accent-color);
}

/* Page d'accueil (Landing) */
.landing-hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../img/DCG_bg.png') no-repeat center center;
    background-size: contain;
    position: relative;
    background-color: transparent;
    mix-blend-mode: multiply;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(to bottom, #FF8C00, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.cta-btn {
    padding: 15px 40px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.cta-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}
