/* ===== VARIABLES & RESET ===== */
:root {
    --primary: #1a365d;
    --secondary: #2b6cb0;
    --accent: #e53e3e;
    --success: #38a169;
    --warning: #d69e2e;
    --dark: #1a202c;
    --light: #f7fafc;
    --gray: #718096;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding-top: 80px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== MEGA MENU ===== */
.navbar {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(43, 108, 176, 0.1);
    color: var(--secondary);
}

.nav-link i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.mega-menu {
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 10px 10px;
    min-width: 300px;
    display: none;
    z-index: 1000;
}

.nav-item:hover .mega-menu {
    display: block;
}

.mega-menu-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.mega-category h4 {
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary);
}

.mega-category a {
    display: block;
    padding: 8px 0;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.mega-category a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--light);
    padding: 8px 15px;
    border-radius: 25px;
    margin-left: 20px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 8px;
    width: 250px;
    outline: none;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon, .user-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.badge {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid var(--secondary);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ===== FILTRES ===== */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    min-width: 150px;
}

.search-advanced {
    display: flex;
    gap: 10px;
}

/* ===== PRODUITS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-image:hover .zoom-overlay {
    opacity: 1;
}

.product-content {
    padding: 20px;
}

.product-category {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.product-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
    height: 50px;
    overflow: hidden;
}

.product-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 15px;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.stock-available {
    color: var(--success);
}

.stock-low {
    color: var(--warning);
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart, .btn-quick-view {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart {
    background: var(--secondary);
    color: white;
}

.btn-add-cart:hover {
    background: var(--primary);
}

.btn-quick-view {
    background: var(--light);
    color: var(--primary);
    border: 1px solid #ddd;
}

.btn-quick-view:hover {
    background: #e2e8f0;
}

/* ===== FORMATIONS ===== */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.formation-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.formation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.formation-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 25px;
    text-align: center;
}

.formation-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.formation-certified {
    background: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

.formation-content {
    padding: 25px;
}

.formation-duration, .formation-level {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    margin-bottom: 10px;
}

.formation-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    margin: 20px 0;
    text-align: center;
}

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border-left: 5px solid var(--secondary);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

/* ===== COMMANDES ===== */
.commande-section {
    background: var(--light);
    padding: 50px;
    border-radius: 15px;
    margin-top: 50px;
}

.commande-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    background: var(--success);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    background: #2f855a;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-image img {
    width: 100%;
    border-radius: 10px;
}

/* ===== PANIER ===== */
.panier-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.panier-sidebar.active {
    right: 0;
}

.panier-header {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panier-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-fermer-panier {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.panier-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.panier-total {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 2px solid #eee;
}

.panier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.btn-panier {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: white;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
    z-index: 1001;
    font-weight: bold;
}

/* ===== WHATSAPP FIXED ===== */
.whatsapp-fixed {
    position: fixed;
    bottom: 120px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 1001;
    text-decoration: none;
}

/* ===== BOUTON PANIER DANS NAV ===== */
.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s;
}

.cart-icon:hover {
    background: rgba(43, 108, 176, 0.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ===== HEADER PAGE ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h1 {
    color: var(--primary);
    margin-bottom: 10px;
}

.page-header p {
    color: var(--gray);
}

/* ===== FOOTER STYLES ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer .footer-col {
    display: flex;
    flex-direction: column;
}

.footer .footer-col h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer .footer-col h3 i {
    color: var(--secondary);
}

.footer .footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer .footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary);
}

.footer .footer-col p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer .social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.footer .social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer .footer-links li {
    margin-bottom: 12px;
}

.footer .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer .footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer .footer-links li:not(a) {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer .footer-info {
    margin-bottom: 20px;
}

.footer .footer-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer .footer-info i {
    color: var(--secondary);
}

.footer .copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer .copyright p {
    margin-bottom: 5px;
}

.footer .copyright a {
    color: var(--secondary);
    text-decoration: none;
}

.footer .copyright a:hover {
    text-decoration: underline;
}

/* Responsive pour le footer */
@media (max-width: 992px) {
    .footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer .footer-col {
        text-align: center;
    }
    
    .footer .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer .footer-links a {
        justify-content: center;
    }
    
    .footer .footer-info p {
        justify-content: center;
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
    }
}














/* ===== FOOTER STYLES ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
    width: 100%;
}

.footer .footer-col {
    display: flex;
    flex-direction: column;
}

/* Colonne 1: Logo et description - Centrer le contenu */
.footer .footer-col:first-child {
    align-items: center;
    text-align: center;
}

.footer .footer-col:first-child h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.footer .footer-col:first-child h3 i {
    color: var(--accent);
}

.footer .footer-col:first-child span {
    color: var(--accent);
    font-weight: 800;
}

.footer .footer-col:first-child p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 0.95rem;
    text-align: center;
    max-width: 100%;
}

/* Centrer les titres de toutes les colonnes */
.footer .footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 700;
    text-align: center;
}

.footer .footer-col h4::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    transform: translateX(-50%);
}

/* Centrer les listes de liens */
.footer .footer-col {
    align-items: center;
    text-align: center;
}

.footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer .footer-links li {
    margin-bottom: 12px;
    width: 100%;
}

.footer .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    justify-content: center;
}

.footer .footer-links a:hover {
    color: var(--accent);
    padding-left: 0;
    transform: scale(1.05);
}

/* Social links - déjà centré */
.footer .social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    justify-content: center;
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.footer .social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* Section copyright - déjà centré */
.footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    width: 100%;
}

.footer .footer-info {
    margin-bottom: 20px;
}

.footer .footer-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    text-align: center;
}

.footer .footer-info i {
    color: var(--accent);
}

.footer .copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-align: center;
}

.footer .copyright p {
    margin-bottom: 5px;
}

.footer .copyright p:last-child {
    margin-top: 10px;
}

.footer .copyright a {
    color: var(--accent);
    text-decoration: none;
}

.footer .copyright a:hover {
    text-decoration: underline;
}

/* Responsive pour le footer */
@media (max-width: 992px) {
    .footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer .footer-col {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer .footer-col {
        text-align: center;
        align-items: center;
    }
    
    .footer .footer-links {
        align-items: center;
    }
    
    .footer .footer-links a {
        justify-content: center;
    }
    
    .footer .footer-info p {
        justify-content: center;
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
    }
}

/* ===== RESPONSIVE GENERAL ===== */
@media (max-width: 1200px) {
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    .search-box input {
        width: 200px;
    }
    .modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .filters {
        flex-direction: column;
        gap: 15px;
    }
    .filter-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    .panier-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .search-box {
        display: none;
    }
}