/* ============================================
   PARAPHARMACIE MAROC - Styles Principaux
   ============================================ */

/* Variables CSS */
:root {
    --primary-color:#6C5CE7;/*#2E7D32;*/
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary-color: #81C784;
    --accent-color: #FF9800;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FFC107;
    --info-color: #2196F3;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* ============================================
   HEADER ET NAVIGATION
   ============================================ */

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    
	background:var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
	background-color: #fff; /* blanc */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* petite ombre élégante */
    padding: 10px 0;
   
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 32px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-dark);
    font-size: 12px;
    position: relative;
}

.header-action i {
    font-size: 22px;
    color: var(--primary-color);
}

.header-action:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Navigation */
.nav-menu {
    background: var(--primary-color);
    padding: 0;
}

.nav-menu .container {
    display: flex;
    justify-content: center;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu a {
    color: white;
    padding: 12px 20px;
    display: block;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-dark);
}

/* ============================================
   CONTENEUR
   ============================================ */

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background: rgba(2,0,0,0.1);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
}

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

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

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

.btn-secondary:hover {
    background: #E68900;
    transform: translateY(-2px);
}

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

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

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #D32F2F;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 35px;
    font-size: 16px;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-light);
}

/* ============================================
   CATÉGORIES
   ============================================ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.category-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 14px;
    color: var(--text-dark);
}

/* ============================================
   PRODUITS
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}

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

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

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-actions button:hover {
    background: var(--primary-color);
    color: white;
}

.product-info {
    padding: 15px;
}

.product-brand {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-name {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.price-current {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.price-old {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.product-rating i {
    color: var(--accent-color);
}

/* ============================================
   PAGE PRODUIT DÉTAIL
   ============================================ */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-detail-image {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}

.product-detail-image img {
    max-height: 400px;
    object-fit: contain;
}

.product-detail-info h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-detail-info .brand {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.product-detail-info .price {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-detail-info .description {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.quantity-selector button {
    width: 35px;
    height: 35px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--bg-light);
}

.quantity-selector input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* ============================================
   PANIER
   ============================================ */

.cart-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 1fr 1fr 50px;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
}

.cart-item-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.cart-item-price {
    font-weight: bold;
    color: var(--primary-color);
}

.cart-item-total {
    font-weight: bold;
    font-size: 16px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

/* ============================================
   FORMULAIRES
   ============================================ */

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.auth-container {
    max-width: 450px;
    margin: 50px auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: var(--primary-color);
}

/* ============================================
   ALERTES
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #E8F5E9;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-danger {
    background: #FFEBEE;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-warning {
    background: #FFF8E1;
    color: #F57C00;
    border: 1px solid var(--warning-color);
}

.alert-info {
    background: #E3F2FD;
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

/* ============================================
   TABLEAU DE BORD ADMIN
   ============================================ */

.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 200px);
}

.admin-sidebar {
    background: var(--primary-color);
    color: white;
    padding: 30px 0;
}

.admin-sidebar .logo {
    color: white;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar a {
    display: block;
    padding: 15px 20px;
    color: white;
    transition: var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--primary-dark);
}

.admin-sidebar i {
    margin-right: 10px;
    width: 20px;
}

.admin-content {
    padding: 30px;
    background: var(--bg-light);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 28px;
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--text-muted);
}

/* Tableaux */
.data-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.data-table tr:hover {
    background: var(--bg-light);
}

.data-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions button,
.table-actions a {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: var(--info-color);
    color: white;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #aaa;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .admin-container {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-main .container {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .cart-item-price,
    .cart-item-total {
        text-align: right;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

/* Loading spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
}






