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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
}

.app {
    min-height: 100vh;
    background-color: #fff;
}

/* Header */
.header {
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.header-logo {
    max-height: 60px;
    width: auto;
    margin-bottom: 0;
}

/* Liens d'administration */
.admin-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.admin-link:hover {
    color: #000;
    border-color: #000;
    background-color: #f9fafb;
}

.admin-link.logout {
    color: #dc2626;
    border-color: #fecaca;
}

.admin-link.logout:hover {
    color: #991b1b;
    border-color: #dc2626;
    background-color: #fef2f2;
}

/* Bouton ajouter un produit */
.add-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.add-product-btn:hover {
    background-color: #333;
}

/* Barre de recherche */
.search-container {
    max-width: 24rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #000;
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Navigation */
.nav {
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-tabs {
    display: flex;
    gap: 3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tab {
    background: none;
    border: none;
    padding: 1.5rem 0;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.nav-tab:hover {
    color: #000;
}

.nav-tab.active {
    color: #000;
    border-bottom-color: #000;
}

/* Contenu principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.products-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes par défaut (mobile) */
}

/* Desktop: 4 colonnes */
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablette: 3 colonnes */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Carte produit */
.product-card {
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.product-image {
    width: 100%;
    height: 20rem; /* h-80 équivalent */
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.product-card:hover .product-image {
    background-color: #f3f4f6;
}

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

.product-placeholder {
    color: #9ca3af;
    font-weight: 300;
    font-size: 1rem;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.025em;
    color: #000;
    line-height: 1.4;
}

.product-price {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
}

/* Page produit */
.product-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: #000;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: #6b7280;
}

.back-arrow {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.product-layout {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.product-image-large {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #000;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 1.5rem;
}

.product-description {
    color: #374151;
    line-height: 1.625;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.product-specs {
    margin-bottom: 2rem;
}

.specs-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #000;
}

.specs-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.specs-list li {
    color: #6b7280;
    font-size: 1rem;
}

.specs-list li:before {
    content: "• ";
    color: #6b7280;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.whatsapp-button {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.whatsapp-button:hover {
    background: #374151;
}

.cart-button {
    width: 100%;
    background: #fff;
    color: #000;
    border: 1px solid #d1d5db;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-button:hover {
    background: #f9fafb;
    border-color: #000;
}

.cart-button.added {
    background: #000;
    color: #fff;
    border-color: #000;
}

.cart-button.added:hover {
    background: #374151;
}

/* Bouton flottant du panier */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #000;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 0.5rem;
    max-width: 280px;
    text-align: center;
}

.floating-cart:hover {
    background: #374151;
}

.floating-cart.show {
    display: flex;
    animation: slideInUp 0.5s ease-out;
}

.cart-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Modal du panier */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cart-modal.show {
    display: flex;
}

.cart-modal-content {
    background: #fff;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.cart-modal-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #000;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
}

.cart-close:hover {
    color: #000;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #f0f0f0;
    background: #fafafa;
}

.cart-item-image {
    width: 60px;
    height: 80px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #000;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 0.875rem;
    color: #6b7280;
}

.cart-item-remove {
    background: none;
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.cart-item-remove:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.cart-send-whatsapp {
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cart-send-whatsapp:hover {
    background: #374151;
}

.cart-clear {
    background: #fff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-clear:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.cart-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

/* Footer */
.footer {
    border-top: 1px solid #f0f0f0;
    margin-top: 5rem;
    background-color: #fff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section h4 {
    font-weight: 500;
    margin-bottom: 1rem;
    color: #000;
}

.footer-section p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-icon {
    font-size: 1rem;
    color: #6b7280;
}

/* Loading et états */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #6b7280;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    background-color: #f9fafb;
    margin: 1rem;
}

/* Animations simples */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Styles */
.add-product-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.add-product-btn:hover {
    background: #374151;
}

.dashboard-stats {
    background: #f9fafb;
    border-bottom: 1px solid #f0f0f0;
    padding: 2rem 0;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 300;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #6b7280;
    font-size: 1rem;
}

.dashboard-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.dashboard-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.product-image-small {
    width: 120px;
    height: 150px;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details-dashboard {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-main-info {
    flex: 1;
}

.product-name-dashboard {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #000;
}

.product-category-badge {
    display: inline-block;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-price-dashboard {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.view-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.edit-btn:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #3b82f6;
}

.delete-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

/* Modal de suppression */
.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.delete-modal.show {
    display: flex;
}

.delete-modal-content {
    background: #fff;
    max-width: 400px;
    width: 100%;
    padding: 2rem;
}

.delete-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #000;
}

.delete-modal-body p {
    margin-bottom: 1rem;
    color: #6b7280;
}

.product-to-delete {
    font-weight: 500;
    color: #000;
}

.delete-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.cancel-btn {
    background: #fff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #f9fafb;
}

.confirm-delete-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.confirm-delete-btn:hover {
    background: #dc2626;
}

/* Formulaires */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.form-wrapper {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 2rem;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 2rem;
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #000;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #fff;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #000;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.spec-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.spec-input {
    flex: 1;
}

.remove-spec-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background-color 0.3s ease;
}

.remove-spec-btn:hover {
    background: #dc2626;
}

.add-spec-btn {
    background: #fff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.add-spec-btn:hover {
    background: #f9fafb;
    border-color: #000;
    color: #000;
}

.image-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #f0f0f0;
    background: #f9fafb;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.submit-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background: #374151;
}

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

/* Responsive */
@media (max-width: 767px) {
    .header-content {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .nav-tabs {
        gap: 2rem;
    }
    
    .nav-tab {
        padding: 1rem 0;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .product-detail {
        padding: 2rem 1rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-price-large {
        font-size: 1.5rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .dashboard-product-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-details-dashboard {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
