/* ============================================================
   CHARTE GRAPHIQUE TECHNICLEAN54 - VERSION FINALE INTEGRÉE
   ============================================================ */
:root {
    --bleu-logo: #0054A6;
    --bleu-sombre: #002D5A;
    --bleu-clair: #009ADE;
    --succes: #27ae60;
    --alerte: #e67e22;
    --danger: #e74c3c;
    --gris-fond: #f4f7f6;
    --gris-texte: #333;
    --blanc: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   RESET & BASES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--gris-texte);
    background-color: var(--gris-fond);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
header {
    background: var(--blanc);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--bleu-sombre);
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--bleu-logo);
}

.btn-cart {
    background: var(--bleu-logo);
    color: white !important;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-cart:hover {
    background: var(--bleu-sombre);
}

/* ============================================================
   SECTIONS & HERO
   ============================================================ */
.hero {
    background: linear-gradient(rgba(0, 45, 90, 0.8), rgba(0, 45, 90, 0.8)), 
                url('../img/hero-bg.jpg') center/cover no-repeat;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanc);
}

.hero h1 { font-size: 2.5rem; margin-bottom: 10px; }

.section-padding { padding: 60px 0; }

/* ============================================================
   BARRE DE RECHERCHE (ADAPTÉE)
   ============================================================ */
.search-container {
    max-width: 600px;
    margin: 0 auto 50px auto; /* Centrage horizontal et espace avec la grille */
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 20px;
    color: var(--bleu-logo);
    font-size: 1.1rem;
    pointer-events: none;
}

#shop-search {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e0e6ed;
    border-radius: 50px; /* Look moderne en pilule */
    font-size: 1rem;
    font-family: inherit;
    background: var(--blanc);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    outline: none;
}

#shop-search:focus {
    border-color: var(--bleu-logo);
    box-shadow: 0 6px 20px rgba(0, 84, 166, 0.12);
}

#shop-search::placeholder {
    color: #a0aec0;
}

/* ============================================================
   GRILLE PRODUITS & CARTES
   ============================================================ */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-img {
    width: 100%;
    height: 180px;
    background: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.product-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-ref {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    font-family: monospace;
    margin-bottom: 5px;
}

.stock-badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 10px 0;
    display: inline-block;
    font-weight: 600;
}

.stock-in { background: #d4edda; color: #155724; }
.stock-out { background: #fff3cd; color: #856404; }

.product-info h3 {
    font-size: 1.1rem;
    color: var(--bleu-sombre);
    margin-bottom: 15px;
    min-height: 50px;
}

.price-ht {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bleu-logo);
}

.price-ttc {
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
    margin-bottom: 15px;
}

.btn-add-cart {
    background: var(--bleu-sombre);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
    width: 100%;
    margin-top: auto;
}

.btn-add-cart:hover {
    background: var(--bleu-logo);
}

/* ============================================================
   MODAL PANIER & FORMULAIRE DE CONTACT
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background: var(--blanc);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 95%;
    max-width: 550px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 28px; cursor: pointer; color: #aaa;
}

#checkout-form {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f4f4f4;
}

#checkout-form h4 {
    margin-bottom: 15px;
    color: var(--bleu-sombre);
}

#checkout-form input, 
#checkout-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

#checkout-form input:focus, 
#checkout-form textarea:focus {
    border-color: var(--bleu-logo);
    outline: none;
    background: #fdfdfd;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.qty-controls {
    display: flex;
    align-items: center;
    background: #f1f1f1;
    border-radius: 6px;
    padding: 2px;
}

.qty-btn {
    background: var(--bleu-logo);
    color: white;
    border: none;
    width: 28px; height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.qty-btn:disabled { background: #ccc; cursor: not-allowed; }

.qty-val {
    padding: 0 12px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.cart-total {
    margin-top: 20px;
    text-align: right;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--bleu-logo);
}

/* LE BOUTON ENVOYER LA DEMANDE */
#checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--bleu-logo) 0%, var(--bleu-sombre) 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 84, 166, 0.3);
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 84, 166, 0.4);
    background: linear-gradient(135deg, var(--bleu-clair) 0%, var(--bleu-logo) 100%);
}

#checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   PAGE DE CONFIRMATION
   ============================================================ */
.confirmation-card {
    background: var(--blanc);
    padding: 50px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    border-top: 6px solid var(--bleu-logo);
}

.confirmation-card h1 {
    color: var(--bleu-sombre);
    margin: 20px 0 15px;
    font-size: 2.2rem;
}

.confirmation-card p {
    font-size: 1.1rem;
    color: var(--gris-texte);
    margin-bottom: 25px;
}

.recap-info {
    margin: 30px 0;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 12px;
    border-left: 5px solid var(--bleu-logo);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.recap-info i {
    color: var(--bleu-logo);
    font-size: 1.5rem;
}

.icon-success {
    font-size: 5rem;
    color: var(--succes);
    animation: pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ============================================================
   NOTIFICATIONS TOAST
   ============================================================ */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    color: var(--gris-texte);
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 5px solid var(--alerte);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.success { border-left-color: var(--succes); }
.toast.danger { border-left-color: var(--danger); }
.toast.show { transform: translateX(0); }

.toast-message { font-weight: 600; font-size: 0.95rem; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--bleu-sombre);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

footer p { font-size: 0.9rem; opacity: 0.8; }

.selection-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: -30px;
    margin-bottom: 20px;
}

/* Badge "Top Fiabilité" */
.badge-selection {
    display: inline-block;
    background: var(--bleu-clair);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Effet de mise en avant sur l'accueil */
.featured-card {
    border-top: 4px solid var(--bleu-logo);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.featured-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* ============================================================
   BOUTON CATALOGUE - STYLE CONTOUR BLANC
   ============================================================ */
.btn-main {
    display: inline-block;
    padding: 16px 35px;
    border: 2px solid var(--blanc); /* Contour blanc net */
    background: transparent;        /* Fond transparent */
    color: var(--blanc) !important; /* Écriture blanche */
    font-size: 1.2rem;              /* Taille visible */
    font-weight: 700;               /* Texte bien gras */
    text-transform: uppercase;      /* Majuscules pour l'impact */
    letter-spacing: 1px;            /* Espacement pro */
    border-radius: 50px;            /* Bords arrondis modernes */
    transition: all 0.3s ease;      /* Animation fluide */
    cursor: pointer;
}

.btn-main:hover {
    background: var(--blanc);       /* Le fond devient blanc au survol */
    color: var(--bleu-sombre) !important; /* L'écriture devient bleue */
    transform: scale(1.05);         /* Petit effet de zoom */
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.cta-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* Animation de filtrage */
.product-card {
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

/* Classe quand le produit est masqué par la recherche */
.product-hidden {
    opacity: 0;
    transform: scale(0.95);
    display: none !important; /* On garde le display none pour ne pas laisser de trous dans la grille */
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    background: var(--blanc);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--gris-fond);
    color: var(--bleu-logo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.2rem;
    border: 2px solid var(--bleu-clair);
}

.step h4 {
    color: var(--bleu-sombre);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.step p {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .steps-container { margin-top: 20px; }
}