body {
    background-color: #f7f9f7;
    padding-top: 76px;
}

.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* Les menus déroulants flottent au-dessus du contenu sans jamais
   modifier la taille, la couleur ou la position de la navbar.
   Positionnement statique (sans Popper.js) pour éviter tout décalage
   dans une navbar en position fixed : voir data-bs-display="static". */
.icon-navbar .dropdown {
    position: relative;
}

.icon-navbar .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: #fff;
    color: #212529;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    z-index: 1031;
    min-width: 230px;
}

.icon-navbar .dropdown-menu-end {
    left: auto;
    right: 0;
}

.icon-navbar .dropdown-menu .dropdown-item {
    color: #212529;
}

/* Ouverture automatique au survol de la souris (sans clic) */
@media (hover: hover) {
    .icon-navbar .dropdown:hover > .dropdown-menu {
        display: block;
    }
}

.icon-navbar .dropdown-menu .dropdown-header {
    color: #6c757d;
}

.navbar-brand {
    font-size: 1.4rem;
}

.card {
    border-radius: 0.75rem;
}

.post-card, .product-card, .shop-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ===== Navbar icônes ===== */
.icon-navbar {
    padding: 0.5rem 0;
}

/* Spécificité renforcée pour battre la règle Bootstrap ".navbar > .container"
   (display:flex; flex-wrap:wrap) qui provoquait le retour à la ligne du profil. */
.navbar.icon-navbar > .icon-navbar-inner {
    display: grid !important;
    flex-wrap: nowrap !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.navbar-brand-logo img {
    height: 46px;
    width: 46px;
    display: block;
    border-radius: 50%;
    /* contain = logo entier visible, sans zoom ni recadrage */
    object-fit: contain;
    background: #fff;
    padding: 3px;
    /* Agrandi sans augmenter la hauteur de la navbar : les marges négatives
       absorbent le surplus dans le padding vertical existant de la navbar. */
    margin: -10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.18s;
}
.navbar-brand-logo:hover img { transform: scale(1.06); }

.navbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    max-width: 280px;
    flex: 1;
}

.navbar-search i {
    color: #fff;
    font-size: 0.9rem;
}

.navbar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
}

.navbar-search input::placeholder {
    color: rgba(255,255,255,0.8);
}

.navbar-center {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    justify-content: center;
    min-width: 0;
}

.icon-navbar .nav-icon-link {
    position: relative;
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
}

.icon-navbar .nav-icon-link:hover {
    background: rgba(255,255,255,0.15);
}

/* Pastilles de notification sur les icônes de la navbar */
.nav-icon-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #dc3545;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #198754;
}

.jm-badge-pop { animation: jmBadgePop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
@keyframes jmBadgePop { 0% { transform: scale(0.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }

.nav-icon-badge-warning {
    background: #ffc107;
    color: #212529;
}

.dropdown-item-badge {
    float: right;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

.dropdown-item-badge-warning {
    background: #ffc107;
    color: #212529;
}

.navbar-right {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.nav-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 0.25rem 0.7rem 0.25rem 0.25rem;
}

.nav-profile-link:hover {
    background: rgba(255,255,255,0.22);
}

.nav-profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.nav-create-btn {
    background: rgba(255,255,255,0.2);
}

.nav-create-btn:hover {
    background: rgba(255,255,255,0.32) !important;
}

.client-mode-banner {
    background: #ffc107;
    color: #212529;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    position: sticky;
    top: 68px;
    z-index: 1020;
}

@media (max-width: 991px) {
    .icon-navbar-inner {
        grid-template-columns: auto auto;
        justify-content: space-between;
    }
    .navbar-search {
        display: none;
    }
    .navbar-center {
        display: none;
    }
}

/* ===== Layout global avec sidebar persistante (client) ===== */
/* Conteneur large : les 2 sidebars vont vers les bords, le centre s'étire */
.fb-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

.fb-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
}

@media (max-width: 1400px) {
    .fb-page { padding-left: 18px; padding-right: 18px; }
}

.fb-shell-content {
    min-width: 0;
}

@media (max-width: 992px) {
    .fb-shell {
        grid-template-columns: 1fr;
    }
    .fb-left {
        display: none;
    }
}

/* ===== Facebook-like feed ===== */
/* La colonne centrale s'étire pour occuper toute la largeur disponible,
   la colonne droite reste fixe : le centre a ainsi la même hauteur/portée que les sidebars. */
.feed-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 992px) {
    .feed-columns {
        grid-template-columns: 1fr;
    }
    .fb-right {
        display: none;
    }
}

.fb-col {
    position: sticky;
    top: 88px;
}

.fb-center {
    position: static;
}

.fb-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    margin-bottom: 0.75rem;
    padding: 0.8rem 1rem;
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Colonne gauche */
.fb-user-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #050505;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fb-user-card:hover {
    color: #198754;
}

.fb-mini-stats {
    display: flex;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow: hidden;
}

.fb-mini-stat {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.3rem;
    text-decoration: none;
    color: #050505;
    border-right: 1px solid #f0f2f5;
}

.fb-mini-stat:last-child {
    border-right: none;
}

.fb-mini-stat strong {
    display: block;
    font-size: 1.05rem;
    color: #198754;
}

.fb-mini-stat span {
    font-size: 0.68rem;
    color: #65676b;
}

.fb-nav {
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fb-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: #050505;
    text-decoration: none;
    font-size: 0.92rem;
}

.fb-nav-item i {
    font-size: 1.2rem;
    color: #198754;
    width: 22px;
    text-align: center;
}

.fb-nav-item:hover, .fb-nav-item.active {
    background: #e9f7ef;
}

.fb-nav-item-highlight {
    background: linear-gradient(90deg, #e9f7ef, #fff);
    font-weight: 600;
    border: 1px dashed #198754;
}

.fb-nav-section {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #8a8d91;
    padding: 0.7rem 0.75rem 0.3rem;
}

.fb-nav-section:first-child {
    padding-top: 0.3rem;
}

.fb-nav-divider {
    border: none;
    border-top: 1px solid #e4e6eb;
    margin: 0.5rem 0.75rem;
}

.fb-nav-item.fb-nav-static {
    cursor: default;
    font-size: 0.85rem;
}

.fb-nav-item.fb-nav-static:hover {
    background: transparent;
}

.fb-nav-badge {
    margin-left: auto;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

.merchant-recent-clients {
    margin-top: 0.6rem;
}

/* Stories */
.fb-stories {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.fb-stories form {
    display: contents;
}

.fb-story {
    position: relative;
    flex-shrink: 0;
    width: 110px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    background: #ddd;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.fb-story img,
.fb-story video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fb-story-avatar {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #198754;
    overflow: hidden;
}

.fb-story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-story-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.fb-story-create {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: #fff;
}

.fb-story-create img {
    height: 65%;
    border-bottom: 1px solid #eee;
}

.fb-story-add {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #198754;
    font-size: 1.8rem;
    background: #fff;
    border-radius: 50%;
}

.fb-story-create .fb-story-label {
    position: static;
    color: #050505;
    text-align: center;
    text-shadow: none;
    padding: 0.4rem 0;
}

/* Composer */
.fb-composer-input {
    flex: 1;
    border: none;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 0.55rem 1rem;
    outline: none;
    font-size: 0.9rem;
}

.fb-media-btn {
    cursor: pointer;
    font-size: 0.88rem;
    color: #65676b;
    font-weight: 600;
}

.fb-composer-actions {
    display: flex;
    align-items: stretch;
}

.fb-composer-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.4rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #65676b;
    text-align: center;
}

.fb-composer-action i {
    font-size: 1.15rem;
}

.fb-composer-action:hover {
    background: #f0f2f5;
}

.fb-composer-action:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.fb-composer-action:disabled:hover {
    background: none;
}

.fb-composer-action + .fb-composer-action {
    border-left: 1px solid #e4e6eb;
}

.fb-composer-trigger {
    text-align: left;
    color: #65676b;
    cursor: pointer;
    font-family: inherit;
}

/* ===== Fenêtre "Créer une publication" façon Facebook ===== */
.post-modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.post-modal-header {
    border-bottom: 1px solid #e4e6eb;
    padding: 0.85rem 1rem;
    position: relative;
}

.post-modal-header .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.post-modal-header .btn-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.post-modal-audience {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f0f2f5;
    border-radius: 4px;
    padding: 0.1rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #050505;
}

.post-modal-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 1.3rem;
    min-height: 120px;
    margin-bottom: 0.75rem;
}

.post-modal-textarea::placeholder {
    color: #90949c;
}

.post-modal-attach {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ced0d4;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
}

.post-modal-attach-icons {
    display: flex;
    gap: 0.35rem;
}

.post-modal-icon-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}

.post-modal-icon-btn:hover {
    background: #f0f2f5;
}

.post-modal-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.post-modal-icon-btn:disabled:hover {
    background: none;
}

.composer-emoji-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    padding: 0.5rem;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.15rem;
    width: 260px;
    z-index: 20;
}

.composer-emoji-option {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
}

.composer-emoji-option:hover {
    background: #f0f2f5;
}

/* Post */
.fb-post-announcement {
    border: 1px solid #ffc107;
    background: #fffdf5;
}

.fb-post-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.fb-post-user {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.fb-username {
    font-weight: 600;
    font-size: 0.92rem;
    color: #050505;
}

.fb-time {
    font-size: 0.75rem;
    color: #65676b;
}

.fb-post-content {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    white-space: pre-line;
}

.fb-post-media img,
.fb-post-media video {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 0.5rem;
    background: #000;
}

.fb-post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #65676b;
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
}

/* ===== Fiche produit intégrée à une publication (marketplace) ===== */
.fb-product-card {
    border: 1px solid #e4e6eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.fb-product-image img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.fb-product-info {
    padding: 0.75rem 0.9rem 0.4rem;
}

.fb-product-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #050505;
    text-decoration: none;
}

.fb-product-name:hover {
    text-decoration: underline;
}

.fb-product-price {
    color: #198754;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0.15rem 0;
}

.fb-product-desc {
    font-size: 0.85rem;
    color: #65676b;
    margin-bottom: 0.4rem;
}

.fb-product-shop {
    display: inline-block;
    font-size: 0.8rem;
    color: #65676b;
    text-decoration: none;
}

.fb-product-shop:hover {
    color: #198754;
}

.fb-product-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem 0.75rem;
}

.fb-buy-now-btn {
    flex: 1;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(25,135,84,0.35);
}

.fb-product-actions-secondary {
    display: flex;
    gap: 0.35rem;
}

.fb-post-actions {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 0.3rem 0;
    margin-bottom: 0.5rem;
}

.fb-action-form {
    margin: 0;
    flex: 1;
}

.fb-action-btn {
    width: 100%;
    background: none;
    border: none;
    color: #65676b;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.4rem;
    border-radius: 6px;
}

.fb-action-btn:hover {
    background: #f0f2f5;
}

.fb-action-btn.active {
    color: #0d6efd;
}

.fb-action-btn.active-love {
    color: #ed4956;
}

.fb-post-menu-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 1.1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.fb-follow-btn {
    font-size: 0.78rem;
    padding: 0.15rem 0.6rem;
    white-space: nowrap;
}

.fb-post-menu-btn:hover {
    background: #f0f2f5;
}

.fb-edit-form textarea {
    font-size: 0.9rem;
}

.fb-comment {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.fb-comment-bubble {
    background: #f0f2f5;
    border-radius: 14px;
    padding: 0.4rem 0.75rem;
}

.fb-comment-bubble p {
    margin: 0;
    font-size: 0.85rem;
}

.fb-comment-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fb-comment-form input {
    flex: 1;
    background: #f0f2f5;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    outline: none;
}

/* Colonne droite */
.fb-right-title {
    color: #65676b;
    font-weight: 600;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

.fb-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #050505;
    font-size: 0.88rem;
}

.fb-contact:hover {
    background: #f0f2f5;
}

/* ===== Sidebar gauche commerçant ===== */
.merchant-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    text-decoration: none;
    color: #050505;
}

.merchant-contact:hover {
    background: #f0f2f5;
    border-radius: 8px;
}

/* ===== Messagerie façon réseau social ===== */
.conversation-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: #050505;
}

.conversation-row:hover {
    background: #f0f2f5;
}

.conversation-row.conversation-unread .conversation-preview,
.conversation-row.conversation-unread .fb-username {
    font-weight: 700;
    color: #050505;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-preview {
    color: #65676b;
    max-width: 220px;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.chat-back {
    color: #050505;
    font-size: 1.2rem;
    text-decoration: none;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
}

.chat-date-separator {
    text-align: center;
    margin: 0.8rem 0;
}

.chat-date-separator span {
    background: rgba(0,0,0,0.06);
    color: #65676b;
    font-size: 0.72rem;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
}

.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    max-width: 75%;
}

.chat-row-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-bubble {
    position: relative;
    padding: 0.5rem 0.8rem;
    border-radius: 16px;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.chat-bubble-theirs {
    background: #fff;
    color: #050505;
    border-bottom-left-radius: 4px;
}

.chat-bubble-mine {
    background: #198754;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 0.2rem;
    opacity: 0.7;
    text-align: right;
}

.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    background: #f0f2f5;
    border: none;
    border-radius: 20px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    outline: none;
}

.chat-send-btn {
    background: #198754;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #157347;
}

/* ===== WiFiMarkets ===== */
.wm-header {
    margin-bottom: 1rem;
}

.wm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.wm-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 0.45rem 1rem;
    flex: 1 1 220px;
}

.wm-search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.wm-select {
    width: auto;
    flex: 0 0 auto;
    font-size: 0.85rem;
}

.wm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #050505;
    white-space: nowrap;
}

.wm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .wm-layout {
        grid-template-columns: 1fr;
    }
}

.wm-map-wrapper {
    position: relative;
}

.wm-map {
    width: 100%;
    height: 560px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    z-index: 1;
}

.wm-route-info {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    padding: 0.75rem 1rem;
    min-width: 220px;
    z-index: 500;
}

.wm-route-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: #65676b;
}

.wm-route-info-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    padding-right: 1rem;
}

.wm-route-info-stats {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #198754;
    margin-bottom: 0.2rem;
}

.wm-list {
    max-height: 560px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wm-results-count {
    font-size: 0.85rem;
    color: #65676b;
    padding: 0 0.2rem;
}

.wm-card {
    display: flex;
    gap: 0.75rem;
    background: #fff;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: pointer;
}

.wm-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wm-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.wm-card-body {
    flex: 1;
    min-width: 0;
}

.wm-card-meta {
    font-size: 0.78rem;
    color: #65676b;
    margin: 0;
}

.wm-user-marker span {
    display: block;
    width: 16px;
    height: 16px;
    background: #0d6efd;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.3);
}

.wm-popup strong {
    font-size: 0.95rem;
}

/* ===== Tunnel de paiement (checkout wizard) ===== */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.checkout-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.checkout-progress-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e9ecef;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.checkout-progress-step.is-active .checkout-progress-circle {
    background: #198754;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(25,135,84,0.2);
}

.checkout-progress-step.is-done .checkout-progress-circle {
    background: #198754;
    color: #fff;
}

.checkout-progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #adb5bd;
    white-space: nowrap;
}

.checkout-progress-step.is-active .checkout-progress-label,
.checkout-progress-step.is-done .checkout-progress-label {
    color: #198754;
}

.checkout-progress-line {
    flex: 1;
    height: 3px;
    background: #e9ecef;
    margin: 0 0.5rem;
    margin-bottom: 1.4rem;
    min-width: 24px;
    transition: background 0.25s ease;
}

.checkout-progress-line.is-done {
    background: #198754;
}

.checkout-wrapper {
    display: flex;
    justify-content: center;
}

.checkout-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1.75rem;
    width: 100%;
    max-width: 640px;
    animation: checkoutFadeIn 0.3s ease;
}

@keyframes checkoutFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.checkout-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.checkout-card-icon {
    font-size: 2rem;
    color: #198754;
    background: #e9f7ef;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f2f5;
}

.checkout-item img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.checkout-item-info {
    flex: 1;
    min-width: 0;
}

.checkout-item .qty-stepper {
    margin: 0;
}

.checkout-item-subtotal {
    font-weight: 700;
    color: #198754;
    min-width: 90px;
    text-align: right;
}

.checkout-summary {
    background: #f7f9f7;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.checkout-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 576px) {
    .checkout-actions {
        flex-direction: column-reverse;
    }
    .checkout-actions > * {
        width: 100%;
    }
}

/* Livraison */
.delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .delivery-options {
        grid-template-columns: 1fr;
    }
}

.delivery-option input {
    position: absolute;
    opacity: 0;
}

.delivery-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    border: 2px solid #e4e6eb;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delivery-option-card i {
    font-size: 1.8rem;
    color: #198754;
}

.delivery-option input:checked + .delivery-option-card {
    border-color: #198754;
    background: #e9f7ef;
}

/* Paiement */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 700px) {
    .payment-methods {
        grid-template-columns: 1fr;
    }
}

.payment-method-card input {
    position: absolute;
    opacity: 0;
}

.payment-method-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    border: 2px solid #e4e6eb;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method-card input:checked + .payment-method-box {
    border-color: #198754;
    background: #e9f7ef;
    box-shadow: 0 0 0 3px rgba(25,135,84,0.15);
}

.payment-method-logo {
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    color: #fff;
}

.payment-mvola .payment-method-logo, .payment-instructions.payment-mvola .payment-method-logo {
    background: #ff6600;
}

.payment-orange .payment-method-logo, .payment-instructions.payment-orange .payment-method-logo {
    background: #ff7900;
}

.payment-airtel .payment-method-logo, .payment-instructions.payment-airtel .payment-method-logo {
    background: #e2001a;
}

.checkout-order-summary {
    background: #f7f9f7;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.payment-instructions {
    border-radius: 12px;
    padding: 1.25rem;
    background: #fff8f0;
    border: 1px dashed #ffc107;
}

.payment-instructions ol {
    padding-left: 1.2rem;
    font-size: 0.9rem;
}

.payment-instructions ol li {
    margin-bottom: 0.4rem;
}

/* Confirmation */
.checkout-confirmation {
    text-align: center;
}

.checkout-confirmation-icon {
    width: 84px;
    height: 84px;
    background: #198754;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.25rem;
    animation: checkoutPop 0.4s ease;
}

@keyframes checkoutPop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.checkout-confirmation-details {
    background: #f7f9f7;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

/* Commandes commerçant */
.merchant-order-card {
    margin-bottom: 1rem;
}

/* Gestion de l'équipe commerçant */
.team-header {
    background: linear-gradient(135deg, #198754, #14532d);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    color: #fff;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.team-header h3 {
    margin: 0;
    font-weight: 700;
}

.team-header p {
    margin: 0.15rem 0 0;
    opacity: 0.85;
    font-size: 0.9rem;
}

.team-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.team-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.team-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.team-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
}

.team-stat-label {
    font-size: 0.72rem;
    color: #65676b;
}

.team-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 1.25rem;
}

.team-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-role-option {
    border: 1px solid #e4e6eb;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    transition: border-color .15s;
}

.team-role-option:hover {
    border-color: #198754;
}

.team-role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.team-member-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f0f2f5;
    flex-wrap: wrap;
}

.team-member-row:last-child {
    border-bottom: none;
}

.team-member-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 220px;
    flex: 1 1 220px;
}

.team-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.team-member-name {
    font-weight: 600;
    color: #050505;
}

.team-member-email {
    font-size: 0.78rem;
    color: #65676b;
}

.team-member-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.team-member-actions {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.role-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
}

.role-badge-manager { background: #212529; }
.role-badge-commercial { background: #0d6efd; }
.role-badge-caissier { background: #198754; }
.role-badge-stock { background: #fd7e14; }
.role-badge-livreur { background: #0dcaf0; color: #052c33; }
.role-badge-livreur::before { background: rgba(5,44,51,0.6); }
.role-badge-marketing { background: #6f42c1; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.status-pill-active { background: #d1f5e0; color: #146c43; }
.status-pill-suspended { background: #f1f0f2; color: #6c757d; }

.team-password-banner {
    background: linear-gradient(135deg, #d1f5e0, #eafff2);
    border: 1px solid #a3e9bf;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.team-password-banner code {
    background: #fff;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #146c43;
    border: 1px solid #a3e9bf;
}

.team-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #65676b;
}

/* ===== Carrousel média produit (JangaMarket) ===== */
.jm-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    background: #000;
}
.jm-carousel::-webkit-scrollbar { height: 6px; }
.jm-carousel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.4); border-radius: 6px; }
.jm-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 1/1;
    max-height: 480px;
}
.jm-carousel-slide img, .jm-carousel-slide video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.fb-product-card { position: relative; }
.jm-carousel-count {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,0.6); color: #fff;
    font-size: 0.75rem; font-weight: 600;
    padding: 2px 8px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 4px;
}

/* ===== Afficher plus / moins ===== */
.jm-readmore { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.jm-readmore.expanded { -webkit-line-clamp: unset; display: block; overflow: visible; }
.jm-readmore-btn { background: none; border: none; padding: 2px 0 0; font-weight: 700; cursor: pointer; font-size: 0.85rem; color: #198754; }
.jm-readmore-btn:hover { text-decoration: underline; }

/* ===== Carrousel produit (raffiné, thème client vert) ===== */
.jm-media { position: relative; border-radius: 12px; overflow: hidden; }
.jm-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; background: #eef1f0; scrollbar-width: none; }
.jm-carousel::-webkit-scrollbar { display: none; }
.jm-carousel-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1/1; max-height: 460px; }
.jm-carousel-slide img, .jm-carousel-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.jm-carousel-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; z-index: 3; }
.jm-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; pointer-events: none; }
.jm-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.55); box-shadow: 0 0 2px rgba(0,0,0,0.4); transition: all 0.2s; }
.jm-dot.active { background: #fff; width: 18px; border-radius: 999px; }
.jm-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,0.85); color: #198754; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; opacity: 0; transition: opacity 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.jm-media:hover .jm-arrow { opacity: 1; }
.jm-arrow.prev { left: 8px; } .jm-arrow.next { right: 8px; }
.jm-arrow:disabled { opacity: 0 !important; cursor: default; }


/* ============================================================
   MARQUE « AllGo » — identite visuelle
   Couleurs reprises du logo : vert profond + teal
   ============================================================ */
.jm-brand {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #0f2e2b;                 /* "All" */
}
.jm-brand span { color: #14b8a6; }  /* "Go" */

/* Variante sur fond fonce / colore (navbar verte) */
.jm-brand-on-dark { color: #fff; }
.jm-brand-on-dark span {
    color: #7ff0e4;
    text-shadow: 0 0 12px rgba(127, 240, 228, 0.45);
}

/* Logo de marque : logo entier visible (contain), cercle blanc */
.jm-brand-logo {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: contain;            /* aucun zoom : le logo est vu en entier */
    background: #fff;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s;
}

/* ===== Modal scrollable ===== */
.modal-dialog-scrollable .modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.navbar-brand:hover .jm-brand-logo { transform: scale(1.06); }
/* ============================================================
   OVERHAUL PREMIUM — typographie, burger, offcanvas mobile
   ============================================================ */
body { font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; }
h1, h2, h3, h4, h5, h6,
.navbar-brand, .nav-profile-name, .jm-mobile-brand {
    font-family: "Poppins", "Inter", system-ui, -apple-system, sans-serif;
}

/* ---- Burger menu (mobile) ---- */
.navbar-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: .35rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    transition: background .15s, transform .15s;
}
.navbar-burger:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.navbar-burger:focus-visible { outline: 2px solid #7ff0e4; outline-offset: 2px; }

/* ---- Offcanvas navigation mobile ---- */
.jm-mobile-nav {
    width: 320px !important;
    background: linear-gradient(180deg, #0f5132 0%, #0a3526 100%);
    color: #eafff3;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.jm-mobile-brand {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: #fff;
}
.jm-mobile-brand span { color: #7ff0e4; text-shadow: 0 0 12px rgba(127, 240, 228, 0.45); }
.jm-mobile-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: .6rem .8rem;
    color: #c9f3dd;
}
.jm-mobile-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
}
.jm-mobile-search input::placeholder { color: rgba(255, 255, 255, 0.55); }
.jm-mobile-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
    margin: 1.25rem 0;
}
.jm-mobile-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .85rem .5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #eafff3;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .15s;
}
.jm-mobile-tile:hover { background: rgba(255, 255, 255, 0.14); color: #fff; transform: translateY(-2px); }
.jm-mobile-tile i { font-size: 1.25rem; color: #7ff0e4; }
.jm-mobile-tile em {
    position: absolute;
    top: .4rem;
    right: .4rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #fc6d6d;
    color: #fff;
    font-style: normal;
    font-size: .6rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.jm-mobile-profile {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: .6rem;
}
.jm-mobile-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.25);
}
.jm-mobile-profile strong { display: block; color: #fff; font-size: .92rem; }
.jm-mobile-profile a { color: #b9ecd2; font-size: .8rem; text-decoration: none; }
.jm-mobile-profile a:hover { color: #fff; }
.jm-mobile-btn {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
}
.jm-mobile-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.jm-mobile-btn-danger { color: #ffb4b4; }
.jm-mobile-btn-danger:hover { color: #fff; background: #c03434; border-color: #c03434; }

/* ---- Responsive desktop : masque la recherche px, garde le burger ---- */
@media (max-width: 575.98px) {
    .navbar-search { display: none; }
    .navbar-left .navbar-brand-logo img { height: 34px; width: auto; }
}

/* ============================================================
   FOOTER PREMIUM (visiteurs / admin) — bordure dégradée
   ============================================================ */
.jm-footer {
    margin-top: 3rem;
    border-top: 3px solid transparent;
    background: linear-gradient(180deg, #0c2b21 0%, #081d16 100%) padding-box,
                var(--jm-grad-btn, linear-gradient(120deg, #16a34a, #7c3aed)) border-box;
}
.jm-footer-brand {
    font-family: "Poppins", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: #fff;
    text-decoration: none;
}
.jm-footer-brand span { color: #7ff0e4; }
.jm-footer-about { margin: .85rem 0 1rem; color: #b9d8c8; font-size: .9rem; max-width: 34ch; }
.jm-footer-social { display: flex; gap: .6rem; }
.jm-footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.05rem;
    transition: background .15s, transform .15s;
}
.jm-footer-social a:hover { background: var(--jm-grad-btn, linear-gradient(120deg, #16a34a, #7c3aed)); transform: translateY(-2px); }
.jm-footer-title {
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}
.jm-footer-links { list-style: none; padding: 0; margin: 0; }
.jm-footer-links li { margin-bottom: .55rem; font-size: .9rem; }
.jm-footer-links a { color: #b9d8c8; text-decoration: none; transition: color .15s, padding-left .15s; }
.jm-footer-links a:hover { color: #7ff0e4; padding-left: 4px; }
.jm-footer-hr { border-color: rgba(255, 255, 255, 0.1); opacity: 1; margin: 1.5rem 0 1rem; }
.jm-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    color: #9fc3b1;
    font-size: .84rem;
}
.jm-footer-bottom i { color: #f472b6; }
@media (max-width: 767px) {
    .jm-footer-bottom { justify-content: center; text-align: center; }
}

/* ============================================================
   NAVBAR PREMIUM — refonte des barres de navigation (Partie 3 & 4)
   Rempl ace l'ancien fond vert Bootstrap (bg-success retire de header.php).
   ============================================================ */

/* Garde-fou : l'element racine ne doit jamais generer de scroll horizontal fantome */
html { overflow-x: hidden; }

/* ---- Barre commune (icones client + classique visiteur/admin) ---- */
.site-navbar {
    background: linear-gradient(90deg, rgba(9, 15, 12, 0.96), rgba(16, 24, 21, 0.96));
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(2, 6, 4, 0.45);
}
/* Halo degrade vert -> teal -> violet en haut de la barre */
.site-navbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #16a34a, #0d9488, #7c3aed);
    opacity: .95;
    z-index: 2;
    pointer-events: none;
}

/* ---- Barre icones : recherche redesignee ---- */
.navbar-search {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.navbar-search:focus-within {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(124, 58, 237, 0.85);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25);
}

/* ---- Barre icones : liens centraux (pill + underline degrade) ---- */
.icon-navbar .nav-icon-link {
    border-radius: 14px;
    transition: color .15s, background .15s;
}
.icon-navbar .nav-icon-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.icon-navbar .nav-icon-link::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #2dd4bf, #a78bfa);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.icon-navbar .nav-icon-link:hover::after,
.icon-navbar .nav-icon-link:focus-visible::after { transform: scaleX(1); }

/* ---- Pastilles : corail -> rose, bordure barre sombre ---- */
.nav-icon-badge {
    border-color: #0c1310;
    background: linear-gradient(135deg, #f43f5e, #f472b6);
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.45);
}
.nav-icon-badge-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0c1310;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
}

/* ---- Profil : lien pill + avatar a anneau conique ---- */
.nav-profile-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 12px 3px 3px;
    transition: background .15s, border-color .15s;
}
.nav-profile-link:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(127, 240, 228, 0.4);
}
.nav-profile-avatar {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 2px solid #0c1310;
    background: conic-gradient(from 210deg, #16a34a, #0d9488, #7c3aed, #f472b6, #16a34a);
    background-clip: padding-box;
}

/* ---- Dropdown profil : glass premium + items arrondis ---- */
.icon-navbar .navbar-right .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(20, 32, 26, 0.08);
    border-radius: 14px;
    box-shadow: 0 22px 44px rgba(8, 12, 40, 0.2);
    padding: .4rem;
    min-width: 250px;
}
.icon-navbar .navbar-right .dropdown-header { font-weight: 700; padding-bottom: .4rem; }
.icon-navbar .navbar-right .dropdown-item {
    border-radius: 9px;
    padding: .5rem .85rem;
    transition: background .15s, color .15s, transform .15s;
}
.icon-navbar .navbar-right .dropdown-item:hover {
    background: linear-gradient(120deg, rgba(22, 163, 74, 0.12), rgba(124, 58, 237, 0.12));
    transform: translateX(2px);
}
.icon-navbar .navbar-right .dropdown-divider { margin: .3rem 0; border-color: rgba(20, 32, 26, 0.1); }

/* ---- Tooltips CSS sur les icones desktop ---- */
@media (hover: hover) and (min-width: 992px) {
    .icon-navbar .nav-icon-link[data-tooltip]::before {
        content: attr(data-tooltip);
        position: absolute;
        top: calc(100% + 9px);
        left: 50%;
        transform: translate(-50%, -4px);
        background: #0b1110;
        color: #eafff3;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: .02em;
        padding: .32rem .6rem;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 8px 20px rgba(2, 6, 4, 0.4);
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s, transform .15s;
        z-index: 1045;
    }
    .icon-navbar .nav-icon-link[data-tooltip]:hover::before,
    .icon-navbar .nav-icon-link[data-tooltip]:focus-visible::before {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ---- Navbar classique (visiteur / admin) : pills + underline ---- */
.site-navbar .navbar-nav .nav-link {
    position: relative;
    border-radius: 10px;
    padding: .5rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    transition: color .15s, background .15s;
}
.site-navbar .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #16a34a, #0d9488, #7c3aed);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.site-navbar .navbar-nav .nav-link:hover,
.site-navbar .navbar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}
.site-navbar .navbar-nav .nav-link:hover::after,
.site-navbar .navbar-nav .nav-link.active::after { transform: scaleX(1); }

/* Boutons pill Connexion / Inscription / Deconnexion */
.site-navbar .nav-link.nav-pill-ghost {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    color: #fff;
}
.site-navbar .nav-link.nav-pill-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
}
.site-navbar .nav-link.nav-pill-grad {
    background: linear-gradient(120deg, #16a34a, #0d9488 42%, #7c3aed);
    border-radius: 30px;
    color: #fff;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}
.site-navbar .nav-link.nav-pill-grad:hover {
    color: #fff;
    filter: brightness(1.08);
}
.site-navbar .nav-pill-ghost::after,
.site-navbar .nav-pill-grad::after { display: none; }

/* Menu mobile (offcanvas) : coherent avec la nouvelle barre */
.jm-mobile-nav {
    background: linear-gradient(180deg, #0d1512 0%, #0a120e 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
