:root{--gap:16px;--radius:14px;--bg:#f7f9fb;--text:#1f2937;--muted:#64748b;--brand:#8B0000;--brand-dark:#680000;--card:#ffffff;--border:#e5e7eb;--ring:#bae6fd}
*{box-sizing:border-box}
html,body{margin:0;padding:0;color:#000E38}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;color:var(--text);background:var(--bg)}
img{max-width:100%;height:auto;display:block}
h1{margin:0}
.container{max-width:1200px;margin:0 auto;padding:24px}
.site-header{padding:14px 20px;border-bottom:1px solid var(--border);background:#fff;position:sticky;top:0;z-index:10}
.brand{display:flex;gap:14px;align-items:center;max-width:1200px;margin:0 auto}
.brand div{text-align:right;width:100%}
.logo{width:156px;object-fit:contain;margin-right:20px}
.topnav{margin-top:8px;display:flex;gap:12px;flex-wrap:wrap;text-align: center;justify-content: center;}
.topnav a{text-decoration:none;color:var(--brand-dark);font-weight:600}
.site-footer{padding:30px 20px;color:var(--muted);text-align:center}
.stepper{background:#fff;border-bottom:1px solid var(--border)}
.stepper-inner{max-width:1200px;margin:0 auto;display:flex;gap:24px;padding:12px 20px;align-items:center;justify-content:center}
.stepper-item{display:flex;align-items:center;gap:8px;color:var(--muted);font-weight:600}
.stepper-item .badge{width:28px;height:28px;border-radius:999px;display:inline-grid;place-items:center;border:2px solid var(--border);background:#fff}
.stepper-item.is-active{color:var(--brand-dark)}
.stepper-item.is-active .badge{border-color:var(--brand);background: #000E38;color:white}
.checkout{display:grid;gap:var(--gap);align-items:start}
.checkout.grid-3{grid-template-columns:1.1fr 0.9fr 1fr}
@media (max-width:1100px){.checkout.grid-3{grid-template-columns:1fr}}
.step{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:18px}
.step-title{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:1.15rem}
.step-title span:first-child{width:34px;height:34px;border-radius:999px;display:inline-grid;place-items:center;background:var(--brand);color:#fff;font-weight:800}
.category{margin-bottom:18px}
.cat-title{margin:0 0 10px;color:#0f172a}
.products{display:flex;flex-direction:column;gap:12px}
.products.as-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.product{display:flex;gap:12px;border:1px solid var(--border);border-radius:12px;padding:10px;align-items:flex-start;background:#fff}
.product img{width:96px;border-radius:10px;border:1px solid #eef2f7}
.product-body{display:grid;gap:6px;flex:1}
.desc{color:var(--muted);margin:0}
.price{font-weight:700}
.muted{color:var(--muted)}
.small{font-size:0.9rem}
.qty{display:flex;align-items:center;gap:6px;text-align:center;max-width:50px}
.qty .btn{width:34px;height:34px}
.btn{background:#f3f4f6;border:1px solid var(--border);padding:9px 14px;border-radius:12px;cursor:pointer;font-weight:600}
.btn:hover{background:#e6f6fb;border-color:#d0eef7}
.btn-primary{background:var(--brand);color:#fff;border-color:transparent}
.btn-primary:hover{background:var(--brand-dark)}
.card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:800px){.row2{grid-template-columns:1fr}}
.table{width:100%;border-collapse:collapse;background:#fff}
.table th,.table td{border:1px solid var(--border);padding:8px;text-align:left}
.history{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.history li{display:flex;justify-content:space-between;gap:8px;border-bottom:1px dashed var(--border);padding:6px 0}
.cart #cart-contents{border:1px dashed var(--border);padding:10px;border-radius:10px;background:#fcfdff;margin-bottom:8px}
.cart .line{display:grid;grid-template-columns:1fr 90px 80px 30px;gap:8px;align-items:center;padding:6px 0;border-bottom:1px dotted var(--border)}
.cart .line:last-child{border-bottom:none}
.cart .title{font-weight:600;font-size:0.8rem;line-height:1rem}
.cart .remove{border:none;background:#fee2e2;border-radius:8px;cursor:pointer;height:30px}
.pay-methods{display:flex;flex-wrap:wrap;gap:12px;border:1px dashed var(--border);padding:10px;border-radius:10px;background:#fafcff}
.pm{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--border);padding:6px 10px;border-radius:10px}
.stripe-box{border:1px solid var(--ring);background:#f0f9ff;padding:10px;border-radius:12px;margin:8px 0}
.error{color:#dc2626;margin-top:6px}
/* --- Grid bon de commande 2/3 + 1/3 --- */
.checkout.grid-bon{display:grid;grid-template-columns:2fr 1fr;gap:16px;align-items:start}
.checkout.grid-bon .col-left,.checkout.grid-bon .col-right{display:block}
.checkout.grid-bon .col-right{display:grid;gap:16px}
@media (max-width:1100px){.checkout.grid-bon{grid-template-columns:1fr}}
/* --- Étapes & cartes serrées --- */
.step{padding:14px}
.card.tight{padding:12px}
.step-title{margin-bottom:10px}
.step-title span:first-child{width:28px;height:28px;font-size:.95rem}
/* --- Liste produits très compacte --- */
.products.products-condensed{display:flex;flex-direction:column;gap:8px}
.product-compact{display:grid;grid-template-columns:72px 1fr;gap:10px;padding:8px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.product-compact img{width:72px;height:72px;object-fit:cover;border-radius:8px;border:1px solid #eef2f7}
.product-compact .product-body{display:grid;gap:4px}
.product-compact h4{margin:0;font-size:0.98rem;line-height:1.2}
.product-compact .desc{margin:0;font-size:0.9rem;color:#64748b;line-height:1.2}
/* Clamp max lignes (titre 1 ligne, desc 2 lignes) */
.clamp-1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* Ligne d’actions très serrée */
.actions-row{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:8px}
.price{font-weight:700;white-space:nowrap}
.qty-inline{display:flex;align-items:center;gap:6px}
.qty-inline .qty-inp{width:54px;height:30px;padding:2px 6px;border:1px solid #e5e7eb;border-radius:8px}
/* Boutons XS */
.btn.xs{padding:6px 10px;border-radius:8px;font-size:0.9rem;line-height:1}
.btn.xs.minus,.btn.xs.plus{width:30px;height:30px}
/* Panier compact */
.cart .line{grid-template-columns:1fr 70px 70px 26px;gap:6px}
.cart #cart-contents{padding:8px}
/* Méthodes de paiement compactes */
.pay-methods.compact{gap:8px;padding:8px}
.pm{padding:4px 8px;border-radius:8px}
/* Champs form plus denses (colonne droite) */
.step-shipping .card.tight select,.step-shipping .card.tight input,.step-shipping .card.tight textarea{width:100%;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}
/* Petites utilitaires */
.muted{color:#64748b}
.small{font-size:0.9rem}
.history.compact li{padding:4px 0}
/* ========= LIGNE PRODUIT — VERSION FLEX COHÉRENTE ========= */
/* Structure générale : image | bloc texte extensible | bloc actions à droite */
.row-product{display:flex;align-items:center;gap:12px}
.row-product > img{width:72px;height:72px;object-fit:cover;border-radius:8px;border:1px solid #eef2f7}
/* Le texte prend toute la place restante */
.row-product .product-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.row-product .product-info h4,.row-product .product-info .desc{overflow:hidden}
/* Bloc actions fixé à droite */
.row-product .product-actions{flex:0 0 auto;margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:150px}
.row-product .price{font-weight:600;white-space:nowrap}
/* Quantité compacte */
.qty-inline{display:flex;align-items:center;gap:4px}
.qty-inp{width:42px;height:28px;padding:2px 4px;text-align:center;border:1px solid #e5e7eb;border-radius:6px;font-size:14px}
/* Boutons +/− XS */
.row-product .btn.xs{padding:4px 8px;height:28px;font-size:0.78rem}
.row-product .btn.xs.minus,.row-product .btn.xs.plus{width:28px}
/* Responsive : actions sous le texte */
@media (max-width:720px){.row-product{flex-wrap:wrap}.row-product .product-actions{width:100%;flex-direction:row;justify-content:space-between;align-items:center;margin-left:0;margin-top:8px}}
/* Input number : sans flèches */
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Tabs auth */
.auth-tabs .tabs-head{ display:flex; gap:8px; margin-bottom:10px }
.auth-tabs .tab-btn{ flex:1; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; background:#f8fafc; cursor:pointer; font-weight:600 }
.auth-tabs .tab-btn.active{ background:#680000; color:#fff; border-color:#680000 }
.auth-tabs .tabs-body{ padding-top:4px }
.auth-tabs .tab-pane{ display:none }
.auth-tabs .tab-pane.active{ display:block }
.form-row{ display:flex; flex-direction:column; gap:6px; margin-bottom:10px }
.form-msg{ margin-top:6px; font-size:.95rem }
.form-msg.ok{ color:#16a34a }
.form-msg.err{ color:#b91c1c }

/* Toast */
.toast{
  position:fixed; right:16px; bottom:16px; background:#680000; color:#fff;
  padding:12px 14px; border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.15);
  opacity:0; pointer-events:none; transform:translateY(10px); transition:.2s ease;
  z-index:9999;
}
.toast.show{ opacity:1; transform:translateY(0) }


/* Toggles & pills */
.btn-group{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px }
.btn-group.toggle .btn-toggle{
  flex:1; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; background:#f8fafc;
  font-weight:600; cursor:pointer;
}
.btn-group.toggle .btn-toggle.active{ background:#680000; color:#fff; border-color:#680000 }

.btn-group.pills button{
  padding:8px 12px; border:1px solid #e5e7eb; border-radius:999px; background:#fff; cursor:pointer;
}
.btn-group.pills button.active{ background:#680000; color:#fff; border-color:#680000 }


/* Modal */
.modal{position:fixed;inset:0;display:none}
.modal.show{display:block}
.modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.35)}
.modal__dialog{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border-radius:14px;min-width:320px;max-width:720px;width:92vw;box-shadow:0 20px 80px rgba(0,0,0,.25);padding:18px}
.modal__close{position:absolute;right:10px;top:8px;border:0;background:#f1f5f9;border-radius:10px;width:32px;height:32px;cursor:pointer}
.modal table{width:100%;border-collapse:collapse;margin-top:8px}
.modal th,.modal td{padding:8px 6px;border-bottom:1px solid #eee;text-align:left}
.modal tfoot td{font-weight:700}

/* Backoffice */
.admin .page{max-width:1100px;margin:20px auto;padding:0 14px}
.admin h1{font-size:1.6rem;margin:10px 0 16px}
.table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,.06)}
.table th,.table td{padding:10px 12px;border-bottom:1px solid #eef2f7}
.table th{background:#f8fafc;text-transform:uppercase;letter-spacing:.03em;font-size:.85rem;color:#64748b}
.actions .btn{margin-right:6px}



.site-header{background:#fff;border-bottom:1px solid #e5e5e5;}
.header-container{display:flex;align-items:stretch;justify-content:space-between;gap:25px;padding:20px 5%;flex-wrap:wrap;max-width:1200px;margin:0 auto}
.header-center{text-align:center}
.header-left{flex:0 0 260px;display:flex;flex-direction:column;gap:10px;align-items:flex-start;}
.header-logo{width:100px;height:auto;display:block;margin-bottom:8px;}
.company-meta{display:flex;flex-direction:column;gap:4px;font-size:0.95rem;}
.company-meta .meta-line{color:#444;}
.company-meta a{color:#680000;text-decoration:none;}
.company-meta a:hover{text-decoration:underline;}
.header-center{flex:1 1 280px;min-width:260px;display:flex;flex-direction:column;justify-content:center;}
.company-name{margin:0 0 4px;font-size:1.8rem;font-weight:700;color:#222;}
.company-desc{color:#680000;font-size:1.3rem;margin:5px 0 0 0;}
.header-right{flex:0 0 320px;min-width:260px;display:flex;align-items:center;}
.header-slider{position:relative;width:100%;height:200px;overflow:hidden;border-radius:14px;border:1px solid #e5e5e5;background:#000;}
.header-slide{position:absolute;inset:0;opacity:0;transition:opacity .6s ease;}
.header-slide.is-active{opacity:1;}
.header-slide img{width:100%;height:100%;object-fit:cover;display:block;}
@media (max-width:900px){.header-container{flex-direction:column;align-items:center;text-align:center;padding:15px;} .header-left,.header-center,.header-right{flex:0 0 100%;} .header-left{align-items:center;} .company-meta{text-align:center;} .header-slider{height:220px;}}


/* ===== GALERIE ===== */
.header-gallery{position:relative;width:100%;overflow:hidden;border-top:1px solid #eaeaea;}
.gallery-track{display:flex;animation:slideGallery 18s infinite;}
.gallery-slide{flex:0 0 100%;}
.gallery-slide img{width:100%;height:340px;object-fit:cover;display:block;}
@keyframes slideGallery{
  0%,25%{transform:translateX(0);}
  33%,58%{transform:translateX(-100%);}
  66%,91%{transform:translateX(-200%);}
  100%{transform:translateX(0);}
}

/* ===== RESPONSIVE ===== */
@media (max-width:768px){
  .header-container{flex-direction:column;align-items:center;text-align:center;padding:15px;}
  .header-logo{width:100px;margin-bottom:10px;}
  .company-name{font-size:1.4rem;}
  .gallery-slide img{height:220px;}
  .site-header{position: relative}
}


.order-modal{position:fixed;inset:0;display:none;z-index:1000;font-family:inherit;}
.order-modal.show{display:block;}
.order-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,0.45);}
.order-modal-dialog{position:relative;max-width:640px;margin:40px auto;background:#fff;border-radius:16px;box-shadow:0 25px 60px rgba(15,23,42,0.35);padding:24px 24px 20px;animation:modalIn .18s ease-out;}
.order-modal-close{position:absolute;top:10px;right:12px;border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:#64748b;}
.order-modal-header h3{margin:0 0 4px;font-size:20px;font-weight:600;}
.order-modal-header .muted{margin:0;font-size:13px;color:#6b7280;}
.order-modal-meta{margin:12px 0 14px;font-size:13px;color:#4b5563;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:4px 12px;}
.order-modal-table{width:100%;border-collapse:collapse;font-size:14px;margin-top:4px;}
.order-modal-table th,.order-modal-table td{padding:6px 4px;}
.order-modal-table thead th{border-bottom:1px solid #e5e7eb;font-weight:500;color:#4b5563;}
.order-modal-table tbody tr.order-separator td{padding:4px 0;border-bottom:1px dashed #e5e7eb;}
.order-modal-table .col-center{text-align:center;}
.order-modal-table .col-right{text-align:right;}
.order-modal-table .label{font-size:13px;color:#6b7280;}
.order-total-row td{border-top:1px solid #e5e7eb;font-size:15px;}
@keyframes modalIn{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}

.header-center p{margin-bottom:0}

.checkout{max-width:1200px;margin:20px auto;padding:0 15px 40px;}
.checkout.grid-bon{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.1fr);gap:24px;align-items:flex-start;}
@media(max-width:900px){.checkout.grid-bon{display:block;}.checkout .col-left,.checkout .col-right{width:100%;margin:0 0 20px 0;}}

.slide{position:absolute;inset:0;opacity:0;transition:opacity .6s ease;}
.slide-active{opacity:1;position:relative;}

.bouton1 { padding:10px 20px;border:none;background:#680000;color:#fff;border-radius:6px;cursor:pointer;font-size:16px; }
.popup { display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6);backdrop-filter:blur(3px);justify-content:center;align-items:center;padding:20px;z-index:9999; }
.popup-content { background:#fff;width:100%;max-width:500px;border-radius:10px;padding:25px;box-shadow:0 5px 20px rgba(0,0,0,0.2);position:relative;animation:fadeIn .3s ease; }
.close { position:absolute;top:15px;right:20px;font-size:22px;cursor:pointer;color:#666; }
.popup h2 { margin-top:0;font-size:1.1rem;color:#333;text-align:center; }
.bloc { margin-bottom:18px;background:#f7f8fc;padding:12px 15px;border-radius:6px;border-left:4px solid #680000; }
.popup h3 { margin:0 0 8px 0;font-size:18px;color:#222; }
.popup p { margin:0 0 10px 0;font-size:15px;color:#555; }
.popup hr { border:none;border-top:1px solid #ddd;margin:20px 0; }
@keyframes fadeIn { from {opacity:0;transform:translateY(20px);} to {opacity:1;transform:translateY(0);} }
