/* ==========================================================================
   TechNova — feuille de style principale (Bootstrap 5.3 + surcouche maison)
   ========================================================================== */

:root {
    --ink: #0b1b3a;
    --ink-2: #13274f;
    --primary: #2155f5;
    --primary-dark: #1741c4;
    --primary-soft: #e8eeff;
    --accent: #00b8d9;
    --promo: #ff6b2c;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #e11d48;
    --indigo: #6366f1;
    --teal: #0d9488;
    --surface: #f4f6fb;
    --card: #ffffff;
    --border: #e4e8f0;
    --muted: #64748b;
    --text: #1e293b;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);

    --bs-primary: #2155f5;
    --bs-primary-rgb: 33, 85, 245;
    --bs-link-color: #2155f5;
    --bs-link-color-rgb: 33, 85, 245;
    --bs-link-hover-color: #1741c4;
    --bs-link-hover-color-rgb: 23, 65, 196;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: #1e293b;
    --bs-body-bg: #f4f6fb;
    --bs-border-color: #e4e8f0;
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 14px;
}

body {
    font-family: var(--bs-body-font-family);
    background: var(--surface);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: "Sora", "Inter", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
}

a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }
.small-caps { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.fw-800 { font-weight: 800; }
.min-w-0 { min-width: 0; }

/* ---- Boutons ------------------------------------------------------------ */
.btn { font-weight: 600; border-radius: 10px; padding: .55rem 1.05rem; }
.btn-sm { padding: .35rem .75rem; border-radius: 8px; }
.btn-lg { padding: .8rem 1.4rem; border-radius: 12px; }

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}
.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-color: #fff;
}
.btn-promo { background: var(--promo); border-color: var(--promo); color: #fff !important; }
.btn-promo:hover { background: #e85a1d; border-color: #e85a1d; color: #fff !important; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff !important; }
.btn-ink:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff !important; }
.btn-soft { background: var(--primary-soft); color: var(--primary) !important; border: 0; }
.btn-soft:hover { background: #d8e2ff; color: var(--primary-dark) !important; }
.btn-light-border { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-light-border:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark { color: #fff !important; }
.btn-success:hover, .btn-danger:hover, .btn-warning:hover, .btn-info:hover, .btn-dark:hover { color: #fff !important; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #fff !important; }
.btn-whatsapp:hover { background: #1ebe5a; border-color: #1ebe5a; color: #fff !important; }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Formulaires -------------------------------------------------------- */
.form-control, .form-select { border-radius: 10px; border-color: var(--border); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: #9db4fb; box-shadow: 0 0 0 .2rem rgba(33, 85, 245, .12); }
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: .35rem; }
.form-text { color: var(--muted); }
.input-group-text { background: #f8fafc; border-color: var(--border); }

/* ---- Cartes ------------------------------------------------------------- */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--card); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1rem; margin-bottom: .25rem; }

/* ---- Badges "soft" (y compris indigo / teal absents de Bootstrap) ---- */
.badge { font-weight: 600; letter-spacing: .01em; }
.badge-soft { padding: .38em .7em; border-radius: 999px; font-size: .74rem; display: inline-flex; align-items: center; gap: .3rem; }
.badge-soft-primary { background: #e8eeff; color: #1741c4; }
.badge-soft-secondary { background: #eef1f6; color: #475569; }
.badge-soft-success { background: #dcfce7; color: #15803d; }
.badge-soft-danger { background: #ffe4e9; color: #be123c; }
.badge-soft-warning { background: #fef3c7; color: #b45309; }
.badge-soft-info { background: #dff6fb; color: #0e7490; }
.badge-soft-indigo { background: #e7e8ff; color: #4f46e5; }
.badge-soft-teal { background: #d5f5f0; color: #0f766e; }
.badge-soft-dark { background: #e2e8f0; color: #0f172a; }
.text-bg-indigo { background: var(--indigo) !important; color: #fff !important; }
.text-bg-teal { background: var(--teal) !important; color: #fff !important; }
.text-indigo { color: var(--indigo) !important; }
.text-teal { color: var(--teal) !important; }
.bg-indigo { background-color: var(--indigo) !important; }
.bg-teal { background-color: var(--teal) !important; }

/* ---- Barre d'annonce + navigation -------------------------------------- */
.announce-bar { background: var(--ink); color: #cbd5e1; font-size: .82rem; padding: .45rem 0; }
.announce-bar a { color: #fff; }
.announce-bar .sep { opacity: .35; margin: 0 .6rem; }

.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding: .7rem 0; }
.brand-logo { display: inline-flex; align-items: center; gap: .55rem; font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.brand-logo:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.brand-logo img { max-height: 40px; }

.header-search { position: relative; flex: 1; max-width: 520px; }
.header-search .form-control { border-radius: 999px; padding-left: 2.6rem; background: var(--surface); border-color: transparent; }
.header-search .form-control:focus { background: #fff; border-color: #9db4fb; }
.header-search .bi-search { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.header-action { position: relative; display: inline-flex; flex-direction: column; align-items: center; color: var(--ink); font-size: .72rem; font-weight: 600; gap: 2px; padding: .2rem .55rem; border-radius: 10px; }
.header-action i { font-size: 1.3rem; line-height: 1; }
.header-action:hover { background: var(--surface); color: var(--primary); }
.header-action .count { position: absolute; top: -2px; right: 2px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--promo); color: #fff; font-size: .68rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

.cat-nav { background: #fff; border-bottom: 1px solid var(--border); }
.cat-nav .nav-link { color: var(--text); font-weight: 600; font-size: .9rem; padding: .8rem .9rem; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.cat-nav .nav-link:hover, .cat-nav .nav-link.active { color: var(--primary); }
.cat-nav .nav-scroller { overflow-x: auto; scrollbar-width: none; }
.cat-nav .nav-scroller::-webkit-scrollbar { display: none; }

.dropdown-menu { border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-size: .9rem; }
.dropdown-item:active { background: var(--primary); }

/* Notifications */
.notif-menu { width: 340px; max-height: 440px; overflow-y: auto; }
.notif-item { display: flex; gap: .7rem; padding: .6rem; border-radius: 10px; color: var(--text); white-space: normal; }
.notif-item:hover { background: var(--surface); }
.notif-item.unread { background: #f3f6ff; }
.notif-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Hero / bannières --------------------------------------------------- */
.hero-slide { border-radius: 22px; overflow: hidden; min-height: 340px; position: relative; display: flex; align-items: center; color: #fff; }
.hero-slide.theme-blue { background: radial-gradient(1200px 400px at 90% 10%, rgba(0, 184, 217, .45), transparent 60%), linear-gradient(120deg, #1741c4, #2155f5 55%, #3b82f6); }
.hero-slide.theme-dark { background: radial-gradient(900px 380px at 85% 20%, rgba(33, 85, 245, .55), transparent 60%), linear-gradient(120deg, #07122a, #0b1b3a 60%, #13274f); }
.hero-slide.theme-orange { background: radial-gradient(900px 380px at 85% 20%, rgba(255, 196, 0, .45), transparent 60%), linear-gradient(120deg, #e8431a, #ff6b2c 60%, #ff8c42); }
.hero-slide.theme-teal { background: radial-gradient(900px 380px at 85% 20%, rgba(99, 102, 241, .35), transparent 60%), linear-gradient(120deg, #0f766e, #0d9488 60%, #14b8a6); }
.hero-slide .hero-content { position: relative; z-index: 2; padding: 3rem; max-width: 620px; }
.hero-slide h1, .hero-slide h2 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.15; }
.hero-slide p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }
.hero-slide .hero-visual { position: absolute; right: 0; top: 0; bottom: 0; width: 45%; z-index: 1; display: flex; align-items: center; justify-content: center; }
.hero-slide .hero-visual img { max-height: 300px; max-width: 90%; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .3)); }
.hero-slide .hero-visual .hero-icon { font-size: 11rem; opacity: .18; }
.hero-slide .btn-light { color: var(--ink); }
@media (max-width: 767.98px) {
    .hero-slide .hero-visual { display: none; }
    .hero-slide .hero-content { padding: 2rem 1.5rem; }
    .hero-slide { min-height: 280px; }
}

/* Carrousel d'accueil : fondu enchaîné et hauteur identique pour toutes les bannières */
.hero-carousel .carousel-item { transition: opacity .8s ease-in-out; }
.hero-carousel .hero-slide { height: 380px; min-height: 0; }
.hero-carousel .hero-slide .hero-content { max-height: 100%; }
.hero-carousel .hero-slide h1, .hero-carousel .hero-slide h2 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-carousel .hero-slide p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-carousel .hero-slide .hero-visual img { max-height: 300px; }
.hero-carousel .carousel-indicators { margin-bottom: 1rem; }
.hero-carousel .carousel-indicators [data-bs-target] { width: 26px; height: 5px; border-radius: 999px; border: 0; }
@media (max-width: 767.98px) {
    .hero-carousel .hero-slide { height: 320px; }
    .hero-carousel .hero-slide p { -webkit-line-clamp: 2; }
}

.trust-strip .trust-item { display: flex; gap: .8rem; align-items: center; padding: 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); height: 100%; }
.trust-item .ti-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.trust-item strong { display: block; font-size: .92rem; color: var(--ink); }
.trust-item span { font-size: .8rem; color: var(--muted); }

.section { padding: 2.2rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.section-head h2 { font-size: 1.45rem; margin: 0; }
.section-head p { margin: .2rem 0 0; color: var(--muted); }

/* ---- Tuiles catégories -------------------------------------------------- */
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6rem; padding: 1.2rem .6rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); height: 100%; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c7d5fd; color: var(--primary); }
.cat-tile .ct-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--primary); }
.cat-tile span { font-weight: 600; font-size: .88rem; }

/* ---- Carte produit ------------------------------------------------------ */
.product-card { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s, transform .18s, border-color .18s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d3dcf0; }
.product-card .pc-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #f8fafc, #eef2f8); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .pc-media img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; transition: transform .3s; }
.product-card:hover .pc-media img { transform: scale(1.04); }
.product-card .pc-badges { position: absolute; top: .7rem; left: .7rem; display: flex; flex-direction: column; gap: .3rem; z-index: 2; }
.product-card .pc-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.product-card .pc-brand { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.product-card .pc-title { font-family: "Inter", sans-serif; font-weight: 600; font-size: .95rem; line-height: 1.35; color: var(--ink); margin: .25rem 0 .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.product-card .pc-title a { color: inherit; }
.product-card .pc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-card .pc-foot { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: .5rem; }
.product-card .pc-foot .btn { position: relative; z-index: 3; }
.price { font-family: "Sora", sans-serif; font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .82rem; font-weight: 500; }
.badge-promo { background: var(--promo); color: #fff; border-radius: 8px; font-size: .72rem; padding: .3em .55em; font-weight: 700; }
.badge-soft-type { background: rgba(11, 27, 58, .85); color: #fff; border-radius: 8px; font-size: .7rem; padding: .3em .55em; }

.media-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #9aaccc; font-size: 3.4rem; background: linear-gradient(135deg, #eef2fb 0%, #e3e9f7 100%); }
.media-placeholder.sm { font-size: 1.4rem; }

.stock-dot { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; }
.stock-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---- Boutique : filtres -------------------------------------------------- */
.filter-card .filter-title { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .6rem; }
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list li + li { margin-top: .15rem; }
.filter-pill { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .45rem .6rem; border-radius: 8px; color: var(--text); font-size: .9rem; border: 0; background: transparent; text-align: left; }
.filter-pill:hover { background: var(--surface); }
.filter-pill.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.filter-pill .count { font-size: .75rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: .82rem; color: var(--text); }
.chip button { border: 0; background: transparent; padding: 0; color: var(--muted); line-height: 1; }

/* ---- Fiche produit ------------------------------------------------------ */
.gallery-main { aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 1.5rem; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.gallery-thumbs button { width: 72px; height: 72px; border-radius: 10px; border: 2px solid var(--border); background: #fff; padding: 4px; overflow: hidden; }
.gallery-thumbs button.active { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 600; background: #f8fafc; }
.buy-box { position: sticky; top: 110px; }
.qty-input { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.qty-input button { border: 0; background: transparent; width: 36px; height: 38px; color: var(--ink); }
.qty-input button:hover { background: var(--surface); }
.qty-input input { width: 48px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty-input input::-webkit-outer-spin-button, .qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.perk { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; }
.perk i { color: var(--primary); font-size: 1.1rem; }

/* ---- Panier / commande -------------------------------------------------- */
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb { width: 84px; height: 84px; border-radius: 12px; background: var(--surface); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.summary-total { border-top: 1px dashed var(--border); margin-top: .5rem; padding-top: .8rem; font-size: 1.15rem; font-weight: 800; font-family: "Sora", sans-serif; color: var(--ink); }

.option-card { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; height: 100%; }
.option-card:hover { border-color: #b8c8fb; }
.option-card.selected { border-color: var(--primary); background: #f5f8ff; }
.option-card .oc-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.option-card input[type=radio] { margin-top: .25rem; }

/* ---- Frise de suivi (commande / maintenance) ---------------------------- */
.stepper { display: flex; justify-content: space-between; position: relative; gap: .25rem; }
.stepper::before { content: ""; position: absolute; left: 6%; right: 6%; top: 19px; height: 3px; background: var(--border); z-index: 0; }
.stepper .step { position: relative; z-index: 1; flex: 1; text-align: center; font-size: .75rem; color: var(--muted); font-weight: 600; }
.stepper .step .dot { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto .4rem; display: flex; align-items: center; justify-content: center; background: #fff; border: 3px solid var(--border); color: var(--muted); font-size: 1rem; }
.stepper .step.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.stepper .step.current .dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px rgba(33, 85, 245, .15); }
.stepper .step.done, .stepper .step.current { color: var(--ink); }
@media (max-width: 575.98px) { .stepper .step span { display: none; } .stepper .step .dot { width: 32px; height: 32px; font-size: .85rem; } .stepper::before { top: 15px; } }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding-left: 44px; padding-bottom: 1.1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .tl-dot { position: absolute; left: 4px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; font-size: .7rem; color: var(--primary); }
.timeline .tl-dot.internal { border-color: var(--warning); color: var(--warning); }
.timeline .tl-meta { font-size: .78rem; color: var(--muted); }
.timeline .tl-internal { background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 10px; padding: .5rem .75rem; }

/* ---- Fil de discussion (support) ---------------------------------------- */
.thread { display: flex; flex-direction: column; gap: 1rem; }
.msg { display: flex; gap: .7rem; max-width: 86%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .75rem 1rem; font-size: .93rem; word-wrap: break-word; }
.msg .bubble .text { white-space: pre-line; }
.msg.mine .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.msg.mine .bubble a { color: #fff; text-decoration: underline; }
.msg.internal .bubble { background: #fffbeb; border: 1px dashed #fcd34d; color: var(--text); }
.msg .meta { font-size: .74rem; color: var(--muted); margin-top: .25rem; }
.msg.mine .meta { text-align: right; }
.msg .attach-img { max-width: 240px; border-radius: 10px; margin-top: .5rem; display: block; }

.avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.4rem; }
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: .7rem; }
.avatar.staff { background: linear-gradient(135deg, var(--ink), var(--indigo)); }

/* ---- Espace client ------------------------------------------------------ */
.account-nav .list-group-item { border: 0; border-radius: 10px !important; padding: .65rem .9rem; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: .65rem; }
.account-nav .list-group-item i { font-size: 1.05rem; color: var(--muted); }
.account-nav .list-group-item:hover { background: var(--surface); }
.account-nav .list-group-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.account-nav .list-group-item.active i { color: var(--primary); }
.page-hero { background: linear-gradient(120deg, var(--ink), var(--ink-2)); color: #fff; padding: 2.2rem 0; }
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.page-hero p { color: #b6c2da; margin: .4rem 0 0; }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: #7c8db0; margin-bottom: .6rem; font-size: .85rem; }
.page-hero .breadcrumb a { color: #b6c2da; }
.page-hero .breadcrumb-item.active { color: #fff; }

/* ---- Tuiles statistiques ------------------------------------------------ */
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; gap: 1rem; align-items: center; height: 100%; box-shadow: var(--shadow-sm); color: inherit; }
a.stat-card:hover { border-color: #c7d5fd; box-shadow: var(--shadow); }
.stat-card .sc-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.stat-card .sc-value { font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.45rem; color: var(--ink); line-height: 1.1; }
.stat-card .sc-label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.sc-primary { background: var(--primary-soft); color: var(--primary); }
.sc-success { background: #dcfce7; color: var(--success); }
.sc-warning { background: #fef3c7; color: #d97706; }
.sc-danger { background: #ffe4e9; color: var(--danger); }
.sc-indigo { background: #e7e8ff; color: var(--indigo); }
.sc-teal { background: #d5f5f0; color: var(--teal); }

/* ---- Tableaux ----------------------------------------------------------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; border-bottom-color: var(--border); }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: #f8fafc; white-space: nowrap; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f8faff; }
.table .thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--surface); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.table .thumb img { width: 100%; height: 100%; object-fit: contain; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.8rem; color: #c3cde0; display: block; margin-bottom: .6rem; }
.empty-state h3, .empty-state h5 { color: var(--ink); font-size: 1.05rem; }

.pagination { --bs-pagination-border-radius: 10px; --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); margin-bottom: 0; }

/* ---- Articles (actualités) ---------------------------------------------- */
.post-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: inherit; transition: box-shadow .18s, transform .18s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: inherit; }
.post-card .post-cover { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--ink), var(--primary)); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .35); font-size: 3rem; }
.post-card .post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .post-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.05rem; line-height: 1.35; margin: .4rem 0; }
.post-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.prose { font-size: 1.02rem; line-height: 1.75; color: #334155; }
.prose h2, .prose h3 { margin-top: 1.8rem; margin-bottom: .8rem; }
.prose img { max-width: 100%; border-radius: 12px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose blockquote { border-left: 4px solid var(--primary); padding: .4rem 1rem; background: var(--primary-soft); border-radius: 0 10px 10px 0; color: var(--ink); }

/* ---- Maintenance (page publique) ---------------------------------------- */
.service-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; height: 100%; display: flex; flex-direction: column; transition: box-shadow .18s, border-color .18s; }
.service-card:hover { box-shadow: var(--shadow); border-color: #c7d5fd; }
.service-card .sv-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: .9rem; }
.how-step { text-align: center; padding: 1rem; }
.how-step .num { width: 54px; height: 54px; margin: 0 auto .8rem; border-radius: 50%; background: #fff; color: var(--primary); font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(255, 255, 255, .15); }
.maint-hero { background: radial-gradient(900px 380px at 85% 10%, rgba(0, 184, 217, .35), transparent 60%), linear-gradient(120deg, #07122a, #0b1b3a 55%, #13274f); color: #fff; padding: 3.5rem 0; }
.maint-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.maint-hero p { color: #b6c2da; }

/* Téléversement de photos */
.upload-zone { border: 2px dashed #c3cde0; border-radius: 14px; padding: 1.4rem; text-align: center; background: #fafbff; color: var(--muted); cursor: pointer; display: block; }
.upload-zone:hover { border-color: var(--primary); color: var(--primary); }
.upload-previews { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.upload-previews .up-item { position: relative; width: 86px; height: 86px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.upload-previews .up-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-previews .up-item button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .75); color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.photo-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.photo-grid a { width: 90px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); display: block; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

.rating-stars { display: inline-flex; gap: .2rem; }
.rating-stars button { border: 0; background: transparent; font-size: 1.6rem; color: #cbd5e1; padding: 0 .1rem; line-height: 1; }
.rating-stars button.on { color: #f59e0b; }

/* ---- Pied de page ------------------------------------------------------- */
.site-footer { background: var(--ink); color: #94a3c3; padding: 3.2rem 0 1.4rem; margin-top: 3rem; font-size: .9rem; }
.site-footer h6 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer a { color: #b6c2da; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: .45rem; }
.site-footer .brand-logo { color: #fff; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2.2rem; padding-top: 1.2rem; font-size: .82rem; }
.social-btn { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .07); display: inline-flex; align-items: center; justify-content: center; color: #fff !important; }
.social-btn:hover { background: var(--primary); }
.pay-logos span { display: inline-block; background: rgba(255, 255, 255, .07); border-radius: 8px; padding: .25rem .55rem; font-size: .72rem; color: #cbd5e1; margin: 0 .25rem .3rem 0; }

.whatsapp-float { position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff !important; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 10px 25px rgba(37, 211, 102, .4); z-index: 1040; }

/* ---- Authentification ---------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - 140px); display: flex; align-items: center; padding: 3rem 0; }
.auth-card { max-width: 460px; width: 100%; margin: 0 auto; }
.auth-card .card-body { padding: 2rem; }
.demo-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: .8rem 1rem; font-size: .82rem; }

/* ---- Toasts -------------------------------------------------------------- */
.toast-stack { position: fixed; top: 84px; right: 18px; z-index: 1090; display: flex; flex-direction: column; gap: .6rem; }
.app-toast { min-width: 280px; max-width: 380px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; box-shadow: var(--shadow); padding: .8rem 1rem; display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; animation: toast-in .25s ease-out; }
.app-toast.success { border-left-color: var(--success); }
.app-toast.error { border-left-color: var(--danger); }
.app-toast.warning { border-left-color: var(--warning); }
.app-toast i { font-size: 1.15rem; }
.app-toast.success i { color: var(--success); }
.app-toast.error i { color: var(--danger); }
.app-toast.warning i { color: var(--warning); }
.app-toast .btn-close { margin-left: auto; font-size: .65rem; }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Indicateur de chargement Livewire */
.loading-veil { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* ==========================================================================
   ADMINISTRATION / ESPACE MAINTENANCIER
   ========================================================================== */
.admin-body { background: #f3f5fa; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 264px; flex: 0 0 264px; background: var(--ink); color: #b6c2da; display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.sb-menu .sb-brand { padding: 1.2rem 1.3rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sb-menu .sb-brand .brand-logo { color: #fff; font-size: 1.1rem; }
.sb-menu .sb-section { padding: 1.1rem 1.3rem .35rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #60739b; font-weight: 700; }
.sb-menu .sb-link { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; margin: 1px .6rem; border-radius: 10px; color: #b6c2da; font-size: .9rem; font-weight: 500; }
.sb-menu .sb-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sb-menu .sb-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-menu .sb-link.active { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(33, 85, 245, .7); }
.sb-menu .sb-link .sb-count { margin-left: auto; background: var(--promo); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: .1rem .45rem; }
.sb-menu .sb-foot { margin-top: auto; padding: 1rem 1.3rem; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .82rem; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: .75rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.admin-topbar .page-title { font-size: 1.1rem; margin: 0; }
.admin-content { padding: 1.5rem; flex: 1; }
.admin-page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.admin-page-head h1 { font-size: 1.4rem; margin: 0; }
.admin-page-head p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.toolbar .form-control, .toolbar .form-select { min-width: 160px; width: auto; }
.toolbar .search-input { min-width: 240px; }
@media (max-width: 991.98px) {
    .admin-sidebar { display: none; }
    .admin-content { padding: 1rem; }
}
/* Menu mobile de l'administration : réutilise le style de la barre latérale */
.offcanvas.admin-offcanvas { background: var(--ink); color: #b6c2da; width: 280px; }
.offcanvas.admin-offcanvas .btn-close { filter: invert(1); }

.status-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.status-tabs button { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: .35rem .85rem; font-size: .82rem; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.status-tabs button .n { background: var(--surface); border-radius: 999px; padding: 0 .45rem; font-size: .72rem; color: var(--muted); }
.status-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-tabs button.active .n { background: rgba(255, 255, 255, .15); color: #fff; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .4rem; } }

.spec-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: .5rem; margin-bottom: .5rem; }
.img-tile { position: relative; width: 110px; height: 110px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: #fff; }
.img-tile img { width: 100%; height: 100%; object-fit: contain; }
.img-tile .img-actions { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(15, 23, 42, .7)); }
.img-tile .img-actions button { border: 0; background: rgba(255, 255, 255, .92); border-radius: 6px; font-size: .7rem; padding: .15rem .35rem; }
.img-tile .main-flag { position: absolute; top: 5px; left: 5px; font-size: .65rem; }

.chart-box { position: relative; height: 280px; }
.mini-list .item { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.mini-list .item:last-child { border-bottom: 0; }

.settings-nav .nav-link { color: var(--text); border-radius: 10px; font-weight: 500; padding: .55rem .85rem; text-align: left; }
.settings-nav .nav-link.active { background: var(--primary-soft); color: var(--primary); }

.color-swatch { width: 26px; height: 26px; border-radius: 8px; display: inline-block; vertical-align: middle; }
.swatch-blue { background: linear-gradient(120deg, #1741c4, #3b82f6); }
.swatch-dark { background: linear-gradient(120deg, #07122a, #13274f); }
.swatch-orange { background: linear-gradient(120deg, #e8431a, #ff8c42); }
.swatch-teal { background: linear-gradient(120deg, #0f766e, #14b8a6); }

[wire\:loading], [wire\:loading\.delay], [wire\:loading\.inline-block], [wire\:loading\.inline], [wire\:loading\.block], [wire\:loading\.flex], [wire\:loading\.table], [wire\:loading\.grid], [wire\:loading\.inline-flex] { display: none; }
