/* ============================================================
   Cookie Banner — CalcHub Maroc
   Autonome : ne modifie rien dans style.css
   ============================================================ */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: #f3f4f6;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .40);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  transition: transform .3s ease;
}

/* ---- Texte ---- */
#cookie-banner .cb-text {
  flex: 1;
  min-width: 0;
}

#cookie-banner .cb-text p {
  margin: 0;
}

#cookie-banner .cb-text a {
  color: #1D9E75;
  text-decoration: underline;
  white-space: nowrap;
}

#cookie-banner .cb-text a:hover {
  color: #2ecc9e;
}

/* ---- Boutons ---- */
#cookie-banner .cb-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

#cookie-banner button {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
  font-family: inherit;
}

#cb-accept {
  background: #1D9E75;
  color: #fff;
}

#cb-accept:hover {
  background: #17845f;
}

#cb-decline {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #374151 !important;
}

#cb-decline:hover {
  background: #374151;
  color: #f3f4f6;
  border-color: #4b5563 !important;
}

/* ---- Mobile ≤ 640px ---- */
@media (max-width: 640px) {
  #cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 12px;
  }

  #cookie-banner .cb-btns {
    flex-direction: row;
  }

  #cookie-banner button {
    flex: 1;
    padding: 11px 12px;
  }
}

/* ---- RTL (pages arabes) ---- */
[dir="rtl"] #cookie-banner {
  flex-direction: row-reverse;
}

[dir="rtl"] #cookie-banner .cb-btns {
  flex-direction: row-reverse;
}

@media (max-width: 640px) {
  [dir="rtl"] #cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }

  [dir="rtl"] #cookie-banner .cb-btns {
    flex-direction: row;
  }
}
