/* Styles pour WP Native Mobile Menu (Amélioré par Fabian) v4.1.0 */

:root {
  --wnmm-fab-bg-drawer: #111111;
  --wnmm-fab-text-drawer: #ffffff;
  --wnmm-fab-bg-topbar: #ffffff;
  --wnmm-fab-text-topbar: #000000;
  --wnmm-fab-icon-color: #000000; 
}

/* Ajustement du padding du body pour la nouvelle barre d'icônes */
body.wnmm-fab-breakpoint-active {
  padding-top: 91px !important; /* topbar (50px) + user bar (41px) */
}

.wnmm-fab-theme-dark { /* Styles spécifiques au thème sombre si nécessaire */ }
.wnmm-fab-theme-light { /* Styles spécifiques au thème clair si nécessaire */ }

/* Masquer le menu du thème lorsque le menu mobile est actif via la classe sur le body */
body.wnmm-fab-breakpoint-active .main-navigation, 
body.wnmm-fab-breakpoint-active nav[role="navigation"], 
body.wnmm-fab-breakpoint-active #primary-menu, 
body.wnmm-fab-breakpoint-active .primary-navigation,
body.wnmm-fab-breakpoint-active header .main-menu,
body.wnmm-fab-breakpoint-active header nav,
body.wnmm-fab-breakpoint-active .elementor-nav-menu {
  display: none !important;
}

body.wnmm-fab-breakpoint-active .elementor-menu-toggle {
  display: none !important; 
}

#wnmm-fab-drawer-wrapper {
  display: none; 
}

body.wnmm-fab-breakpoint-active #wnmm-fab-drawer-wrapper {
  display: block; 
}

#wnmm-fab-topbar {
  position: fixed !important; 
  top: 0 !important; 
  left: 0;
  width: 100%;
  background-color: var(--wnmm-fab-bg-topbar);
  color: var(--wnmm-fab-text-topbar);
  z-index: 100000; 
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Styles pour la barre d'icônes utilisateur */
#wnmm-fab-user-icons-bar {
  display: none; /* Caché par défaut */
}

body.wnmm-fab-breakpoint-active #wnmm-fab-user-icons-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  position: fixed;
  top: 50px; /* En dessous de la topbar principale */
  left: 0;
  width: 100%;
  padding: 8px 0;
  z-index: 99999;
  background-color: var(--wnmm-fab-bg-topbar);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.wnmm-fab-theme-dark body.wnmm-fab-breakpoint-active #wnmm-fab-user-icons-bar {
    border-bottom-color: rgba(255,255,255,0.1);
}

.wnmm-fab-user-link {
  display: flex;
  align-items: center;
  gap: 8px; /* Espace entre l'icône et le texte */
  text-decoration: none;
  color: var(--wnmm-fab-text-topbar);
}

.wnmm-fab-user-link .dashicons {
  font-size: 24px;
  vertical-align: middle;
  color: var(--wnmm-fab-icon-color);
  position: relative; /* Contexte de position pour la barre de déconnexion */
  display: inline-block;
}

.wnmm-fab-user-link-text {
  font-size: 0.9em;
  font-weight: 500;
}

/* Style pour barrer l'icône utilisateur pour la déconnexion */
a.wnmm-fab-user-link[href*="logout"] .dashicons-admin-users::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--wnmm-fab-icon-color);
  transform: translateY(-50%) rotate(-45deg);
  transform-origin: center;
}

/* Conteneur pour l'icône du panier */
.wnmm-fab-icon-wrapper {
  position: relative;
  display: inline-block;
  line-height: 1; /* Assure un bon alignement vertical */
}

/* Style pour la pastille du panier */
.wnmm-fab-cart-badge {
    position: absolute;
    top: -6px;   /* Ajusté pour un meilleur placement */
    right: -8px; /* Ajusté pour un meilleur placement */
    background-color: #d63638;
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-sizing: border-box;
}


#wnmm-fab-title {
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  flex-grow: 1; 
  margin: 0 10px; 
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#wnmm-fab-title a {
  color: inherit;
  text-decoration: none;
}

#wnmm-fab-hamburger,
#wnmm-fab-bell {
  cursor: pointer;
  color: var(--wnmm-fab-icon-color) !important; 
  flex-shrink: 0; 
  padding: 5px; 
}
#wnmm-fab-hamburger .dashicons,
#wnmm-fab-bell .dashicons {
    font-size: 24px; 
    display: inline-block;
    vertical-align: middle;
}

#wnmm-fab-drawer {
  position: fixed;
  left: -100%; 
  top: 91px;
  height: calc(100% - 91px); 
  width: 80%; 
  max-width: 320px;
  transition: left 0.3s ease-in-out;
  z-index: 99998; 
  background: var(--wnmm-fab-bg-drawer);
  color: var(--wnmm-fab-text-drawer);
  box-sizing: border-box;
  border-right: 1px solid rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.wnmm-fab-theme-dark #wnmm-fab-drawer {
  border-right: 1px solid rgba(255,255,255,0.1);
}

.wnmm-fab-drawer-links-container {
    flex-grow: 1; 
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#wnmm-fab-drawer.open { 
  left: 0; 
  box-shadow: 3px 0 15px rgba(0,0,0,0.2); 
}

#wnmm-fab-drawer a {
  display: flex; 
  align-items: center;
  gap: 12px; 
  padding: 15px 20px;
  color: inherit !important; 
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.wnmm-fab-theme-dark #wnmm-fab-drawer a {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.wnmm-fab-drawer-links-container a:last-child {
    border-bottom: none;
}

#wnmm-fab-drawer a:hover {
  background-color: rgba(0,0,0,0.05);
}
.wnmm-fab-theme-dark #wnmm-fab-drawer a:hover {
  background-color: rgba(255,255,255,0.05);
}

#wnmm-fab-drawer a .wnmm-fab-menu-item-icon,
#wnmm-fab-drawer a .wnmm-fab-menu-item-icon-img {
  font-size: 20px; 
  width: 24px; 
  text-align: center;
  flex-shrink: 0;
}
#wnmm-fab-drawer a .wnmm-fab-menu-item-icon-img {
  height: 24px;
  object-fit: contain;
}

#wnmm-fab-close {
  font-size: 28px;
  text-align: right;
  cursor: pointer;
  padding: 12px 20px;
  color: inherit; 
  border-bottom: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.wnmm-fab-theme-dark #wnmm-fab-close {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}


#wnmm-fab-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99997; 
  background: rgba(0, 0, 0, 0.5); 
  display: none; 
}

#wnmm-fab-drawer.open + #wnmm-fab-overlay {
  display: block; 
}

#wnmm-fab-notifications {
  position: fixed;
  top: 60px; 
  right: 15px;
  background: #fff; 
  color: #333;
  padding: 15px;
  width: 290px; 
  max-width: calc(100% - 30px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 99999; 
  display: none; 
  border-radius: 4px;
  box-sizing: border-box;
}
.wnmm-fab-theme-dark #wnmm-fab-notifications {
    background: #333;
    color: #f1f1f1;
    border: 1px solid #444;
}

#wnmm-fab-notifications h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1em;
}
#wnmm-fab-notifications p {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 0.95em;
  line-height: 1.4;
}
#wnmm-fab-notifications a {
  color: #0073aa; 
  text-decoration: underline;
}
.wnmm-fab-theme-dark #wnmm-fab-notifications a {
    color: #79c7f0;
}
#wnmm-fab-notifications a:hover {
  color: #005177;
}
.wnmm-fab-theme-dark #wnmm-fab-notifications a:hover {
    color: #a9def3;
}

#wnmm-fab-notifications .button {
    display: inline-block;
    text-decoration: none;
    font-size: 13px;
    line-height: 2.15384615;
    min-height: 30px;
    margin: 0;
    padding: 0 10px;
    cursor: pointer;
    border-width: 1px;
    border-style: solid;
    -webkit-appearance: none;
    border-radius: 3px;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: top;
    background: #f7f7f7;
    border-color: #ccc;
    color: #555;
    width: 100%;
    text-align: center;
}
#wnmm-fab-notifications .button:hover {
    background: #f0f0f0;
    border-color: #999;
    color: #333;
}
#wnmm-fab-notifications #wnmm-fab-mark-notification-read {
    margin-bottom: 15px; 
    display: block; 
    width: 100%;
}

.wnmm-fab-button-link-destructive {
    color: #d63638 !important; 
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    padding: 5px 0 !important; 
    cursor: pointer;
    display: block; 
    width: 100%;
    margin-top: 10px; 
    text-align: center; 
}
.wnmm-fab-button-link-destructive:hover,
.wnmm-fab-button-link-destructive:focus {
    color: #a02426 !important; 
    text-decoration: underline !important;
}

.wnmm-fab-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #d63638;
    color: #fff;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wnmm-fab-bell {
  position: relative; 
}

#wnmm-fab-reactivate-notifs-container {
    padding:10px 15px; 
    background: #fff; 
    color: #333; 
    text-align:center; 
    position:fixed; 
    bottom:0; 
    left: 0;
    width:100%; 
    z-index:100001;
    border-top: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 0.9em;
    display: none; 
}
#wnmm-fab-reactivate-notifs-container button {
    margin-left: 8px;
    padding: 4px 8px;
    font-size: 0.9em;
}
.wnmm-fab-theme-dark #wnmm-fab-reactivate-notifs-container {
    background: #2a2a2a;
    color: #f1f1f1;
    border-top: 1px solid #444;
}

#wnmm-fab-drawer-wrapper .dashicons {
    font-family: "dashicons" !important;
}

/* Styles pour la section des paramètres dans le drawer */
#wnmm-fab-drawer-settings {
    padding: 12px 20px;
    background-color: rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.15);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: inherit;
}
.wnmm-fab-theme-light #wnmm-fab-drawer-settings {
    background-color: rgba(0,0,0,0.04);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.wnmm-fab-settings-cog-icon {
    font-size: 20px;
    line-height: 1;
    color: inherit;
}

.wnmm-fab-drawer-settings-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    text-decoration: underline;
    font-size: 0.9em;
    text-align: left;
    flex-grow: 1;
}
.wnmm-fab-drawer-settings-button:hover {
    opacity: 0.8;
}

/* --- Styles pour les notifications personnelles --- */
.sg-notification-list { list-style: none; padding: 0; margin: 0; }
.sg-notification-list li a { display: block; padding: 10px; border-bottom: 1px solid #eee; text-decoration: none; color: #333; }
.sg-notification-list li a small { display: block; color: #888; font-size: 0.8em; margin-top: 4px; }
.sg-notification-list li.unread a { font-weight: bold; }
.sg-notification-list li.read a { color: #777; }

/* --- Styles pour les boutons de notification personnelle --- */
#sg-mark-all-read-btn { 
    margin-top: 10px;
}
#sg-clear-all-btn { 
    margin-top: 8px; /* MODIFICATION: Ajout d'une marge */
}


/* --- Styles pour le panneau de notifications combiné --- */
.wnmm-fab-notification-section {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}
.wnmm-fab-notification-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.wnmm-fab-notification-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}