/* 
 * Fichier : style.css
 * Description : Feuille de style principale pour le site CMF GROUP
 * Auteur : Votre Nom
 * Version : 1.0
 */

/* ===== VARIABLES ===== */
:root {
    /* Couleurs principales */
    --primary-color: #FF6B00;    /* Orange */
    --secondary-color: #4CAF50;  /* Vert */
    --dark-color: #333;
    --light-color: #f8f9fa;
    --white: #fff;
    --black: #000;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    
    /* Typographie */
    --font-primary: 'Roboto', sans-serif;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Bordures */
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ===== RÉINITIALISATION ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background-color: #e05d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

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

/* ===== EN-TÊTE ===== */
.header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-button {
    background-color: #25D366;
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.whatsapp-button:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

/* ===== BANNIÈRE HÉRO ===== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 12rem 0 8rem;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== SECTIONS ===== */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

/* ===== CATÉGORIES ===== */
.categories {
    padding: var(--spacing-xl) 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card h3 {
    padding: 0 var(--spacing-sm);
    margin-top: var(--spacing-sm);
    color: var(--primary-color);
}

.category-card p {
    padding: 0 var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    color: var(--gray);
}

.category-card .btn {
    margin: 0 var(--spacing-sm) var(--spacing-sm);
    display: inline-block;
}

/* ===== À PROPOS ===== */
.about-preview {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.about-text p {
    margin-bottom: var(--spacing-sm);
    color: var(--gray);
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* ===== BOUTON WHATSAPP FLOTTANT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* ===== PIED DE PAGE ===== */
.footer {
    background-color: var(--dark-color);
    color: var(--light-gray);
    padding: var(--spacing-xl) 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-logo img {
    height: 50px;
    margin-bottom: var(--spacing-sm);
}

.footer-logo p {
    color: var(--gray);
    margin-bottom: var(--spacing-sm);
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after,
.footer-contact h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
}

.footer-contact i {
    color: var(--primary-color);
    width: 20px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.legal-links {
    margin-top: var(--spacing-sm);
}

.legal-links a {
    color: var(--gray);
    margin: 0 0.5rem;
    font-size: 0.9rem;
}

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

/* ===== RÉACTIVITÉ ===== */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header-actions .whatsapp-button span {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}
