/* Variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #777;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset et styles de 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-color);
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

.devis-btn {
    background-color: var(--secondary-color);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.devis-btn:hover {
    background-color: #2980b9;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Section Hero */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/background.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--text-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-price {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Contact Rapide */
.quick-contact {
    background-color: var(--primary-color);
    color: var(--white);
}

.quick-contact-content {
    text-align: center;
}

.quick-contact-content h2 {
    margin-bottom: 1rem;
}

.quick-contact-content p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

/* Pied de page */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--light-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-info i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.5s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Page Produits */
.filter-section {
    margin-bottom: 2rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background-color: var(--light-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Page À Propos */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Page Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.map-container {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Page Devis */
.devis-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Styles pour les nouvelles pages */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Page Produits */
.products-section {
    padding: 4rem 0;
}

.filter-section {
    margin-bottom: 3rem;
}

.filter-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    background-color: var(--light-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Page À Propos */
.about-section {
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

.about-text h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text ul {
    list-style: none;
    padding-left: 0;
}

.about-text li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Page Contact */
.contact-section {
    padding: 4rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.btn-block {
    width: 100%;
}

/* Form rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-options {
        justify-content: flex-start;
    }
}

/* États de chargement */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Image par défaut pour les produits */
.product-image {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Message d'erreur */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    grid-column: 1 / -1;
}

/* Produits d'exemple */
.example-products-notice {
    text-align: center;
    padding: 1rem;
    background: #d1ecf1;
    color: #0c5460;
    border-radius: 4px;
    margin-bottom: 1rem;
    grid-column: 1 / -1;
}

/*logo css */
.logo img {
    width: 80px;
    height: auto;
    display: block;
}
.navbar {
    display: flex;
    justify-self: space-between;
    align-items: center;
    padding: 10px 40px;
    background-color: #fff;
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
}
.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}
.nav-link:hover {
    color: #0099cc;
}

/* États de chargement et erreurs */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.api-warning {
    grid-column: 1 / -1;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.api-warning p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

.api-warning small {
    color: #b08c2d;
}

/* Amélioration des cartes produits */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-category {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-price {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.1rem;
}

/* Debug info */
.debug-info {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Messages d'alerte */
.alert-message {
    margin-bottom: 2rem;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.alert-text {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Erreurs de champ */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.field-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: block;
}

/* État de chargement */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Amélioration du formulaire */
.contact-form {
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .alert-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .alert-close {
        align-self: flex-end;
    }
}


/* Ajout de nouvelles catégories */
/* Animation pour le filtrage */
.product-card {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

/* Couleurs pour les nouvelles catégories */
.product-card[data-category="chirurgie"] .product-category {
    background: #e74c3c;
    color: white;
}

.product-card[data-category="militaires"] .product-category {
    background: #2c3e50;
    color: white;
}

.product-card[data-category="autres"] .product-category {
    background: #7f8c8d;
    color: white;
}

/* Responsive pour les nombreux filtres */
@media (max-width: 768px) {
    .filter-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* Fin des ajouts */
/* Actions produit avec deux boutons */
.product-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.product-actions .btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.product-actions .btn-outline:hover {
    background: #3498db;
    color: white;
}

/* Description preview */
.product-description-preview {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    min-height: 40px;
}

/* Responsive pour les boutons */
@media (max-width: 480px) {
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        min-width: auto;
    }
}
