/* 
 * Styles personnalisés pour IO-Cosmetic 
 * Application e-commerce de produits cosmétiques
 * Charte graphique inspirée de l'océan
 */

:root {
    /* Palette IO-Cosmetic - Inspirée de la mer et la nature */
    --primary-color: #0D7C8C;        /* Bleu océan profond */
    --primary-light: #4BA5B5;        /* Bleu océan clair */
    --primary-dark: #095964;         /* Bleu océan foncé */
    --secondary-color: #D4A574;      /* Sable doré */
    --secondary-light: #E6C39E;      /* Sable clair */
    --secondary-dark: #B88A5C;       /* Sable foncé */
    --accent-color: #5FA677;         /* Vert pin maritime */
    --accent-light: #88C5A0;         /* Vert clair */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #F5A623;        /* Ambre soleil couchant */
    --info-color: #4BA5B5;
    --light-color: #F8F9FA;
    --dark-color: #2C3E50;
    --white-color: #ffffff;
    --ocean-gradient: linear-gradient(135deg, #0D7C8C 0%, #4BA5B5 100%);
    --sand-gradient: linear-gradient(135deg, #D4A574 0%, #E6C39E 100%);
    --nature-gradient: linear-gradient(135deg, #5FA677 0%, #88C5A0 100%);
    --border-radius: 0.75rem;
    --box-shadow: 0 4px 12px rgba(13, 124, 140, 0.1);
    --box-shadow-hover: 0 8px 24px rgba(13, 124, 140, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    background-color: #FAFBFC;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page de connexion IØ-Cosmetic Factory™ Platform */
.auth-login-hero {
    min-height: calc(100vh - 140px);
    background: radial-gradient(circle at top left, rgba(13,124,140,0.12) 0, transparent 40%),
                radial-gradient(circle at bottom right, rgba(95,166,119,0.18) 0, transparent 45%),
                #FAFBFC;
    display: flex;
    align-items: center;
}

main {
    flex: 1;
}

/* Logo Styles */
.logo-img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
}

.logo-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-text-brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text-brand .logo-main {
    font-size: 1.5rem;
}

.logo-text-brand .logo-sub {
    font-size: 0.8rem;
    letter-spacing: 0;
}

.logo-footer {
    height: 40px;
    width: auto;
    opacity: 0.9;
}

/* Navbar */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 8px rgba(13, 124, 140, 0.08);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(13, 124, 140, 0.12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    opacity: 0.85;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--ocean-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Retirer tout fond actif côté site public pour nav-pills et active links */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.navbar .nav-link.active,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: transparent !important;
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(13, 124, 140, 0.06);
}

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

.card-img-top {
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.08);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

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

.btn-primary {
    background: var(--ocean-gradient);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #095964 0%, #0D7C8C 100%);
}

.btn-secondary {
    background: var(--sand-gradient);
    color: white;
}

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

.btn-success {
    background: var(--nature-gradient);
    color: white;
}

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

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

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #E6ECF0;
    padding: 0.875rem 1.25rem;
    transition: var(--transition);
    background-color: #F8F9FA;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 124, 140, 0.15);
    background-color: white;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Page profil compte (administrateur principal / client) */
.account-profile-page {
    /* pas de fond spécifique : on garde le fond global du site */
}

.account-profile-hero {
    border-bottom: 3px solid #0D7C8C;
}

.account-profile-body .card {
    border-radius: 1.2rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(95, 166, 119, 0.1);
    border-left-color: var(--accent-color);
    color: #2d5a3d;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background-color: rgba(245, 166, 35, 0.1);
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert i {
    margin-right: 0.75rem;
}

/* Hero Section */
.bg-primary {
    background: var(--ocean-gradient) !important;
}

.hero-section {
    background: var(--ocean-gradient);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 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.3;
}

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

.hero-image {
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
}

/* Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--sand-gradient);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background: var(--accent-color);
}

.product-badge.promo {
    background: var(--danger-color);
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.product-price-old {
    font-size: 1.25rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Footer */
.footer-olerone {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-olerone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ocean-gradient);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

footer h5,
footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

footer a:hover {
    color: white;
    transform: translateX(5px);
}

footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

/* Override Bootstrap's text-muted in footer */
footer .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

footer p {
    color: rgba(255, 255, 255, 0.85);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    letter-spacing: 0.3px;
}

.badge.bg-primary {
    background: var(--primary-color) !important;
}

.badge.bg-secondary {
    background: var(--secondary-color) !important;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(13, 124, 140, 0.06);
}

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

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

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

.table-hover tbody tr:hover {
    background-color: rgba(13, 124, 140, 0.05);
    transform: scale(1.01);
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--ocean-gradient);
    color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

.dashboard-card h3 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.dashboard-card p {
    opacity: 0.95;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.dashboard-card.sand {
    background: var(--sand-gradient);
}

.dashboard-card.nature {
    background: var(--nature-gradient);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Loading Spinner */
.spinner-overlay {
    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: 9999;
}

.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .hero-image {
        margin-top: 2rem;
        max-height: 300px;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
    }
    
    .footer-olerone {
        padding: 3rem 0 !important;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .nav-link::after {
        display: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .alert {
        display: none;
    }
    
    body {
        background-color: white;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #F8F9FA;
}

::-webkit-scrollbar-thumb {
    background: var(--ocean-gradient);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #095964 0%, #0D7C8C 100%);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-validee {
    background-color: rgba(95, 166, 119, 0.15);
    color: #2d5a3d;
    border: 2px solid var(--accent-color);
}

.status-en-cours {
    background-color: rgba(245, 166, 35, 0.15);
    color: #856404;
    border: 2px solid var(--warning-color);
}

.status-expediee {
    background-color: rgba(13, 124, 140, 0.15);
    color: #095964;
    border: 2px solid var(--primary-color);
}

.status-livree {
    background-color: rgba(75, 165, 181, 0.15);
    color: #095964;
    border: 2px solid var(--info-color);
}

.status-annulee {
    background-color: rgba(220, 53, 69, 0.15);
    color: #721c24;
    border: 2px solid var(--danger-color);
}

/* Image Placeholder */
.img-placeholder {
    background: var(--sand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-state i {
    font-size: 5rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.empty-state p {
    color: #999;
    font-size: 1.1rem;
}

/* Section Titles */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--ocean-gradient);
    border-radius: 2px;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Wave Divider */
.wave-divider {
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%230D7C8C' fill-opacity='0.1'/%3E%3C/svg%3E") no-repeat center;
    background-size: cover;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .dashboard-card h3 {
        font-size: 2rem;
    }
}