* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6; 
    color: #333; 
    background: #f8f9fa;
}

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

/* ==================== NAVBAR ==================== */
.navbar { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; 
    padding: 1rem 0; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.navbar a { 
    color: white; 
    text-decoration: none; 
    margin: 0 15px; 
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
}

.navbar a:hover { 
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 8px 12px;
}

.navbar .logo { 
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin: 0;
}

.nav-links { 
    display: flex; 
    align-items: center;
    gap: 10px;
}

/* ==================== LOGO ==================== */
.navbar .logo .site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    border-radius: 8px;
}

.navbar .logo .site-logo:hover {
    transform: rotate(360deg);
}

.navbar .logo .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

/* ==================== SEARCH BAR CLIQUABLE ==================== */
.search-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.search-toggle {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.search-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.search-form {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-form.active {
    width: 320px;
    opacity: 1;
    visibility: visible;
}

.search-form-inner {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 75px 10px 40px;
    border: none;
    border-radius: 25px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    outline: none;
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.search-input:focus {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.1rem;
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.search-desktop {
    display: block;
}

.search-mobile {
    display: none;
}

/* ==================== SEARCH RESULTS ==================== */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 380px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

.search-result-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 3px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-price {
    color: #667eea;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.no-results {
    padding: 30px;
    text-align: center;
    color: #999;
    font-size: 0.875rem;
}

/* ==================== CART BADGE ==================== */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ==================== BURGER MENU ==================== */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    transition: background 0.3s;
}

.burger-menu:hover {
    background: rgba(255,255,255,0.2);
}

.burger-menu span {
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-15px);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== LANGUAGE DROPDOWN ==================== */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
}

.lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.lang-menu.show {
    display: block;
}

.lang-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    font-size: 0.875rem;
    margin: 0;
}

.lang-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ==================== HERO ==================== */
.hero { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 80px 20px; 
    text-align: center; 
}

.hero h1 { 
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
    font-weight: 700;
    animation: fadeInUp 1s ease;
}

.hero p { 
    font-size: 1.2rem; 
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

/* ==================== BUTTONS ==================== */
.btn { 
    display: inline-block; 
    padding: 12px 30px; 
    background: #3498db; 
    color: white; 
    text-decoration: none; 
    border-radius: 5px; 
    margin: 10px 5px; 
    transition: all 0.3s; 
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover { 
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary { 
    background: #e74c3c; 
}

.btn-primary:hover { 
    background: #c0392b;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ==================== SECTIONS ==================== */
section { 
    padding: 60px 20px; 
}

section h2 { 
    font-size: 2rem; 
    margin-bottom: 30px; 
    text-align: center; 
    color: #2c3e50; 
}

/* ==================== PRODUCTS GRID ==================== */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px; 
    margin: 20px 0; 
}

.product-card { 
    border: 1px solid #e0e0e0; 
    padding: 20px; 
    border-radius: 10px; 
    transition: all 0.3s; 
    background: white;
}

.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.product-card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 15px; 
}

.product-card h3 { 
    margin-bottom: 10px; 
    color: #2c3e50; 
    font-size: 1.2rem; 
}

.product-card .price { 
    font-size: 1.5rem; 
    color: #e74c3c; 
    font-weight: bold; 
    margin: 15px 0; 
}

/* ==================== FOOTER ==================== */
footer { 
    background: #2c3e50; 
    color: white; 
    padding: 60px 20px 20px; 
    margin-top: 80px; 
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #3498db !important;
}

footer h3, footer h4 {
    color: white;
    margin-bottom: 20px;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 12px;
}

footer p { 
    font-size: 0.9rem; 
}

/* ==================== FORMS ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==================== PAGE PRODUIT ==================== */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* ==================== PAGE PANIER ==================== */
.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ==================== MENU MOBILE OVERLAY ==================== */
body.menu-open {
    overflow: hidden;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 98;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== RESPONSIVE TABLET ==================== */
@media (max-width: 1100px) {
    .search-form.active {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .hero h1 { 
        font-size: 2rem; 
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .products-grid { 
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .navbar .container {
        padding: 0 20px;
    }
    
    .burger-menu {
        display: flex;
    }
    
    /* AFFICHE le texte du logo sur mobile */
    .navbar .logo .logo-text {
        display: inline !important;
        font-size: 1rem !important;
    }
    
    .navbar .logo .site-logo {
        height: 35px;
    }
    
    /* Cache la barre de recherche desktop sur mobile */
    .search-desktop {
        display: none !important;
    }
    
    /* Menu mobile */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 70px 20px 20px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 99;
        gap: 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        margin: 0;
        padding: 15px 10px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
        color: #333 !important;
        border-radius: 0 !important;
    }
    
    .nav-links a:hover {
        background: #f8f9fa !important;
        color: #667eea !important;
    }
    
    .cart-badge {
        top: 5px;
        right: 10px;
    }
    
    /* Barre de recherche mobile */
    .search-mobile {
        display: block !important;
        max-width: 100%;
        margin: 0 0 20px 0;
        order: -1;
    }
    
    .search-mobile .search-toggle {
        display: none;
    }
    
    .search-mobile .search-form {
        position: static;
        transform: none;
        width: 100%;
        opacity: 1;
        visibility: visible;
    }
    
    .search-mobile .search-input {
        width: 100%;
        padding: 12px 80px 12px 40px;
        font-size: 0.95rem;
    }
    
    .search-mobile .search-btn {
        font-size: 0.85rem;
        padding: 7px 16px;
    }
    
    .search-mobile .search-icon {
        font-size: 1.1rem;
    }
    
    .lang-dropdown {
        margin: 20px 0;
        width: 100%;
        border-top: 1px solid #f0f0f0;
        padding-top: 15px;
    }
    
    .lang-btn {
        width: 100%;
        justify-content: center;
        background: #f8f9fa;
        border-color: #e0e0e0;
        color: #333;
        padding: 12px 14px;
        text-align: left;
    }
    
    .lang-btn:hover {
        background: #e9ecef;
    }
    
    .lang-menu {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }
    
    /* Page produit responsive */
    .product-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .product-layout img,
    .product-layout > div > div {
        width: 100% !important;
        height: auto !important;
        max-height: 300px;
    }
    
    .price {
        font-size: 2rem !important;
    }
    
    .product-layout > div > div[style*="display: flex"] {
        flex-direction: column !important;
    }
    
    .product-layout .btn {
        width: 100% !important;
        margin: 5px 0 !important;
    }
    
    /* Page panier responsive */
    .cart-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    .cart-item > div:first-child {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .cart-item img,
    .cart-item > div:first-child > div {
        width: 150px !important;
        height: 150px !important;
    }
    
    .cart-item > div:nth-child(2) {
        width: 100%;
        text-align: center;
    }
    
    .cart-item form {
        width: 100%;
    }
    
    .cart-item form button {
        width: 100%;
        padding: 12px 20px !important;
    }
    
    .cart-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .cart-actions a {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Footer responsive */
    footer {
        padding: 40px 15px 15px !important;
    }
    
    footer > .container > div:first-child {
        grid-template-columns: 1fr !important;
    }
    
    footer h3, footer h4 {
        font-size: 1.1rem !important;
    }
    
    footer > .container > div:last-child > div {
        flex-direction: column !important;
        text-align: center;
    }
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 480px) {
    .navbar a {
        font-size: 0.95rem;
    }
    
    .hero {
        padding: 50px 20px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    section {
        padding: 40px 15px;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .navbar .logo .site-logo {
        height: 32px;
    }
    
    /* Garde le texte visible sur très petit écran aussi */
    .navbar .logo .logo-text {
        display: inline !important;
        font-size: 0.9rem !important;
    }
    
    .nav-links {
        width: 90%;
    }
}

/* ==================== EXTRA SMALL DEVICES ==================== */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-card h3 {
        font-size: 1.1rem;
    }
    
    .navbar .logo .logo-text {
        font-size: 0.85rem !important;
    }
}