/**
 * Footer & Mobile Bottom Navigation Styles
 * Olivier Sauvage — B2Biz
 */

.os-footer {
  background-color: var(--os-white);
  border-top: 1px solid var(--os-border);
  padding-top: var(--os-space-3xl);
  padding-bottom: var(--os-space-2xl);
  margin-top: auto;
}

@media (max-width: 768px) {
  .os-footer {
    padding-bottom: calc(var(--os-space-2xl) + var(--os-mobile-nav-height));
  }
}

.os-footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-2xl);
}

/* ==========================================================================
   Main 4-Column Grid (Inspirée de la maquette)
   ========================================================================== */
.os-footer-main-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: var(--os-space-2xl);
  align-items: start;
}

@media (max-width: 1024px) {
  .os-footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--os-space-xl);
  }
}

@media (max-width: 640px) {
  .os-footer-main-grid {
    grid-template-columns: 1fr;
    gap: var(--os-space-xl);
  }
}

.os-footer-col {
  display: flex;
  flex-direction: column;
}

/* Brand Column */
.os-footer-brand-header {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: var(--os-space-md);
  transition: opacity 0.15s ease;
}

.os-footer-brand-header:hover {
  opacity: 0.9;
}

.os-footer-brand-mark {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-footer-brand-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.os-footer-brand-title {
  display: flex;
  flex-direction: column;
  font-family: var(--os-font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #0f172a;
  text-transform: uppercase;
}

.os-brand-line {
  display: block;
}

.os-footer-brand-tagline {
  font-family: var(--os-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.os-footer-brand-desc {
  font-family: var(--os-font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 var(--os-space-md) 0;
  max-width: 320px;
}

.os-footer-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--os-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: var(--os-space-lg);
}

.os-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--os-primary-blue);
  box-shadow: 0 0 0 3px rgba(6, 145, 226, 0.2);
  animation: os-pulse-glow 2.5s infinite;
  display: inline-block;
}

@keyframes os-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(6, 145, 226, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(6, 145, 226, 0.45);
  }
}

.os-footer-social {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.os-footer-social-title {
  font-family: var(--os-font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--os-mid-grey);
}

.os-social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.os-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f1f5f9;
  color: #334155;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.os-social-link:hover {
  background-color: var(--os-primary-blue);
  color: var(--os-white);
  transform: translateY(-2px);
}

.os-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Nav Columns (Catégories & Éditeur) */
.os-footer-col-heading {
  font-family: var(--os-font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  margin: 0 0 var(--os-space-md) 0;
  line-height: 1.2;
}

.os-footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.os-footer-links-list li {
  margin: 0;
  padding: 0;
}

.os-footer-links-list a {
  font-family: var(--os-font-body);
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.os-footer-links-list a:hover {
  color: var(--os-primary-blue);
  transform: translateX(2px);
}

/* ==========================================================================
   Tags Cloud Section (105 Tags cliquables)
   ========================================================================== */
.os-footer-tags-wrapper {
  border-top: 1px solid var(--os-border);
  padding-top: var(--os-space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--os-space-md);
}

.os-footer-tags-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.os-footer-tags-title {
  font-family: var(--os-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: 0.02em;
}

.os-footer-tags-count {
  font-size: 0.8125rem;
  color: var(--os-mid-grey);
  font-weight: 500;
}

.os-footer-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.os-footer-tag-chip {
  font-family: var(--os-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.os-footer-tag-chip:hover {
  background-color: #eaf7fe;
  border-color: var(--os-primary-blue);
  color: var(--os-primary-blue);
  transform: translateY(-1px);
}

/* ==========================================================================
   Footer Bottom Row: Copyright & Mentions
   ========================================================================== */
.os-footer-bottom {
  border-top: 1px solid var(--os-border);
  padding-top: var(--os-space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--os-space-sm);
  font-size: 0.8125rem;
  color: var(--os-mid-grey);
}

@media (min-width: 768px) {
  .os-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.os-footer-bottom a {
  color: var(--os-mid-grey);
}

.os-footer-bottom a:hover {
  color: var(--os-primary-blue);
}

.os-footer-copy {
  font-weight: 400;
}

.os-footer-made {
  font-weight: 500;
}

/* ==========================================================================
   Mobile Fixed Bottom Navigation Bar
   (Conforme aux maquettes mobile accueil et article)
   ========================================================================== */
.os-mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--os-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--os-border);
  z-index: 890;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .os-mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}

.os-mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 500;
  flex: 1;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.os-mobile-bottom-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  transition: stroke 0.15s ease;
}

.os-mobile-bottom-item:hover,
.os-mobile-bottom-item.is-active {
  color: var(--os-dark);
  font-weight: 700;
}

.os-mobile-bottom-item.is-active svg {
  stroke: var(--os-dark);
  stroke-width: 2.2;
}
