:root {
    --brand-color: #1E8E89;
    --bg-main: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-orange: #eab308;
    --blue-night: #1e293b;
    --success-color: #10b981;
}

/* Menu fixe - Correction superposition */
html {
    scroll-padding-top: 110px; 
    scroll-behavior: smooth;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background-color: var(--brand-color); color: var(--text-dark); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* HEADER */
header { background-color: var(--brand-color); padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border-bottom: 4px solid var(--blue-night);}
.logo img { height: 45px; cursor: pointer; }
nav { display: flex; gap: 25px; align-items: center;}
nav a { text-decoration: none; font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.85); transition: color 0.2s, text-shadow 0.2s; cursor: pointer;}
nav a:hover, nav a.active { color: white; text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }

/* Bouton Wishlist & Animation */
.btn-cart { background: transparent; color: rgba(255, 255, 255, 0.85); padding: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; border: none; font-size: 0.95rem; transition: color 0.2s, text-shadow 0.2s, transform 0.2s;}
.btn-cart:hover { color: white; text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
.btn-cart.pulse {
    animation: pulse-animation 0.4s ease-out;
    color: var(--accent-orange);
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}
@keyframes pulse-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; flex-grow: 1; width: 100%;}

/* SECTION HERO */
.hero-section { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-bottom: 15px; padding: 0 0 10px 0; width: 100%; }
.hero-logo { height: 230px; width: auto; object-fit: contain; flex-shrink: 0; }
.hero-images-strip { display: flex; gap: 6px; background-color: white; padding: 6px; height: 230px; flex-grow: 1; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); overflow: hidden; }

/* Correction du comportement des images de la bande */
.hero-images-strip img { 
    flex: 1; 
    width: 100%; /* Force la largeur équitable */
    min-width: 0;
    height: 100%; 
    object-fit: cover; 
    object-position: center; /* Centre le contenu proprement */
}

/* Astuce CSS pour "rogner" visuellement la 3ème image (fûts bleus) */
.hero-images-strip img:nth-child(3) {
    transform: scale(1.08); /* Zoom légèrement pour pousser le gris hors du cadre */
    clip-path: inset(4%); /* Coupe les bords qui dépassent pour ne pas mordre sur le blanc */
}

/* Intro Section */
.intro-section { background: white; padding: 40px; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 40px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.intro-section h1 { color: var(--brand-color); font-size: 2rem; margin-bottom: 20px; }
.intro-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-top: 30px; } 
.intro-box h2 { font-size: 1.3rem; margin-bottom: 15px; color: var(--text-dark); border-bottom: 2px solid var(--brand-color); padding-bottom: 5px; display: inline-block; }
.intro-box ul { padding-left: 20px; margin-bottom: 20px; color: #000; } 
.intro-box ul li { margin-bottom: 8px; }
.link-action { color: var(--brand-color); font-weight: bold; text-decoration: underline; cursor: pointer; }

.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 20px; color: white; display: flex; justify-content: space-between; align-items: center; }

/* Product Filters */
.product-filters { display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap; }
.product-filters input, .product-filters select { padding: 12px; border: none; border-radius: 6px; font-size: 0.95rem; outline: none; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.product-filters select { min-width: 220px; cursor: pointer; }
.product-filters input:focus, .product-filters select:focus { box-shadow: 0 0 0 2px var(--blue-night); }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; position: relative; min-height: 200px;}
.product-card { background: white; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.03); position: relative; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px rgba(0,0,0,0.2); }

.tile-checkbox { position: absolute; top: 15px; left: 15px; width: 22px; height: 22px; z-index: 20; cursor: pointer; accent-color: var(--brand-color); box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

.product-img { background-color: white; height: 220px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border-color); position: relative; padding: 10px;}
.sold-out-badge { position: absolute; top: 15px; right: -35px; background-color: #dc2626; color: white; padding: 5px 40px; font-weight: bold; font-size: 0.9rem; transform: rotate(45deg); box-shadow: 0 2px 4px rgba(0,0,0,0.2); letter-spacing: 1px; z-index: 10;}

.product-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.product-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 15px; color: var(--text-dark); text-transform: uppercase; text-align: center;}

.tech-list { list-style: none; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }
.tech-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.tech-list li span:first-child { font-weight: 600; color: #475569; white-space: nowrap; margin-right: 10px;}
.tech-list li span:last-child { text-align: right; word-break: break-word;}
.tech-comments { flex-direction: column !important; align-items: flex-start !important; background-color: #f8fafc; padding: 10px !important; border-radius: 4px; margin-top: 5px; }

.grid-action-row { display: flex; gap: 10px; align-items: center; width: 100%; }
.btn-add { background-color: var(--brand-color); color: white; border: none; padding: 10px; border-radius: 4px; font-weight: 600; cursor: pointer; font-size: 0.95rem; text-align: center; transition: all 0.2s; flex-grow: 1; height: 38px;}
.btn-add:hover { opacity: 0.9; }
.btn-sold-out { background-color: #f1f5f9; color: #94a3b8; border: 1px solid #cbd5e1; cursor: not-allowed; padding: 10px; border-radius: 4px; font-weight: 600; font-size: 0.95rem; text-align: center; width: 100%; display: block; height: 38px;}
.btn-add-selected { background-color: var(--blue-night); color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; font-size: 0.95rem; }
.btn-add-selected:hover { opacity: 0.9; }

/* Message No Results */
#no-results-msg {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.3);
    font-size: 1.1rem;
}

/* CART LAYOUT */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.cart-items-list { display: flex; flex-direction: column; gap: 20px; }
.cart-row { background: white; border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; display: flex; gap: 20px; position: relative; }
.cart-row-img { width: 100px; height: 100px; border: 1px solid #f1f5f9; border-radius: 4px; display: flex; align-items: center; justify-content: center; padding: 5px; background: white;}
.cart-row-details { flex-grow: 1; }
.cart-row-title { font-weight: 700; margin-bottom: 5px; color: var(--text-dark);}
.cart-row-meta { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.cart-row-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; }

.qty-picker { display: flex; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; background: white;}
.qty-picker button { background: #f8fafc; border: none; width: 30px; height: 100%; font-weight: bold; cursor: pointer; color: var(--text-dark); font-size: 1rem;}
.qty-picker button:hover { background: #cbd5e1; }
.qty-picker input[type=number]::-webkit-inner-spin-button, .qty-picker input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-picker input[type=number] { -moz-appearance: textfield; width: 50px; text-align: center; border: none; border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); font-weight: 600; color: var(--text-dark); height: 100%; font-size: 0.95rem; outline: none; }
.qty-picker input[type=number]:focus { border: 1px solid var(--brand-color); }

.btn-delete { background: none; border: none; color: #ef4444; cursor: pointer; position: absolute; top: 20px; right: 20px; font-size: 1.2rem; }

.order-summary { background: white; border: 1px solid var(--border-color); border-radius: 8px; padding: 25px; position: sticky; top: 110px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.summary-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; color: var(--text-dark);}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; color: var(--text-muted); }
.summary-row.total { border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 15px; color: var(--text-dark); font-weight: 700; font-size: 1.1rem; }

.btn-checkout { background-color: var(--blue-night); color: white; border: none; width: 100%; padding: 14px; border-radius: 4px; font-weight: 700; font-size: 1rem; margin-top: 20px; cursor: pointer; transition: opacity 0.2s;}
.btn-checkout:hover { opacity: 0.9; }

.btn-excel { background-color: var(--success-color); color: white; border: none; width: 100%; padding: 10px; border-radius: 4px; font-weight: 700; font-size: 0.95rem; margin-top: 10px; cursor: pointer; transition: opacity 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;}
.btn-excel:hover { opacity: 0.9; }

/* Contact Form */
.contact-section { background: white; padding: 50px; border-radius: 8px; border: 1px solid var(--border-color); margin-top: 60px; box-shadow: 0 4px 6px rgba(0,0,0,0.02);}
.contact-desc { color: var(--text-muted); margin-bottom: 30px; font-size: 1.05rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #334155; font-size: 0.95rem;}
.form-group label span { color: #ef4444; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 1rem; outline: none; transition: border-color 0.2s;}
.form-group textarea { resize: none; height: 220px; overflow-y: auto; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand-color); }
.btn-submit { background-color: var(--brand-color); color: white; width: 100%; padding: 15px; border: none; font-weight: bold; cursor: pointer; } 
.btn-submit:hover { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* FOOTER */
footer { background-color: var(--brand-color); text-align: center; padding: 40px 20px; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; margin-top: auto; border-top: 4px solid var(--blue-night);}
footer a { color: white; text-decoration: underline; font-weight: 500; }
footer a:hover { color: var(--accent-orange); }

.hidden { display: none !important; }

/* TOAST NOTIFICATION */
#toast { visibility: hidden; min-width: 300px; background-color: var(--blue-night); color: #fff; text-align: center; border-radius: 8px; padding: 16px 20px; position: fixed; z-index: 1000; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 1rem; font-weight: 600; box-shadow: 0 10px 25px rgba(0,0,0,0.15); opacity: 0; transition: opacity 0.4s ease, bottom 0.4s ease; }
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    html { scroll-padding-top: 160px; }
    header { flex-direction: column; gap: 15px; padding-bottom: 20px; }
    nav { flex-wrap: wrap; justify-content: center; }
    .hero-section { flex-direction: column; gap: 15px; }
    .hero-logo { height: auto; max-width: 100%; }
    .hero-images-strip { height: 100px; width: 100%; }
    .intro-grid { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .section-title { flex-direction: column; align-items: flex-start; gap: 15px; }
}

/* --- STYLE DE L'AUTOCOMPLÉTION --- */
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.autocomplete-items {
    position: absolute;
    border: 1px solid var(--border-color);
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
}
.autocomplete-items div {
    padding: 10px 15px;
    cursor: pointer;
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: background-color 0.2s;
}
.autocomplete-items div:hover {
    background-color: #f0fdfa; /* Fond bleu/vert très clair */
    color: #1E8E89; /* Couleur MatCab */
}
.autocomplete-items strong {
    color: #1E8E89; /* Met en surbrillance les lettres tapées */
}