/* ── Maison Tamara Ruban - Announcement Bar ── */

/* Conteneur principal pour le ruban unique */
#mt-announcement-bars-container {
  display: block;
  width: 100%;
  z-index: 99998;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* Le ruban unique */
.mt-announcement-bar {
  position: relative;
  background-color: #2c2c2c;
  color: #f5f0ea;
  font-size: 13px;
  letter-spacing: 0.04em;
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid #444;
}

.mt-ticker-wrap {
  overflow: hidden;
  width: 100%;
  flex: 1;
}

.mt-ticker {
  display: inline-block;
  white-space: nowrap;
  animation: mt-scroll 35s linear infinite;
}

.mt-ticker:hover {
  animation-play-state: paused;
}

.mt-promo-code {
  font-weight: 600;
  margin: 0 6px;
  letter-spacing: 0.06em;
}

@keyframes mt-scroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* Switch Toggle Style */
.mtr-switch-container {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 34px;
}

.mtr-switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mtr-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.mtr-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .mtr-slider {
  background-color: #46b450;
}

input:checked + .mtr-slider:before {
  transform: translateX(26px);
}

/* Tablet */
@media (max-width: 768px) {
  body {
    padding-top: 34px !important;
  }

  #mt-announcement-bars-container {
    top: 0 !important;
    position: fixed !important;
  }

  .mt-announcement-bar {
    font-size: 12px;
    height: 34px;
  }

  .site-header {
    margin-top: 0 !important;
  }
}

/* Petit écran - TRÈS IMPORTANT */
@media (max-width: 601px) {
  body {
    padding-top: 0 !important;
  }

  #mt-announcement-bars-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99998 !important;
    width: 100% !important;
  }

  .mt-announcement-bar {
    font-size: 11px;
    height: 32px;
  }

  .site-content,
  main,
  .site-main,
  .storefront-full-width-content {
    padding-top: 32px !important;
    margin-top: 0 !important;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding-top: 32px !important;
  }

  body.admin-bar {
    padding-top: 32px !important;
  }

  #mt-announcement-bars-container {
    top: 0 !important;
    position: fixed !important;
    z-index: 99998 !important;
    width: 100% !important;
  }

  .mt-announcement-bar {
    font-size: 11px;
    height: 32px;
  }

  /* Storefront - Force padding sur conteneurs */
  .storefront-full-width-content {
    padding-top: 32px !important;
    margin-top: 0 !important;
  }

  .site-content {
    padding-top: 32px !important;
    margin-top: 0 !important;
  }

  main,
  .site-main {
    padding-top: 32px !important;
    margin-top: 0 !important;
  }

  .site-header {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .woocommerce-breadcrumb {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  h1.page-title {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* Force sur tous les enfants directs du body après le ruban */
  body > *:not(#mt-announcement-bars-container) {
    margin-top: 0 !important;
  }
}
