/**
 * Pied de page CMP Jeunesse (portail, inscription, pages participant).
 */
.cmp-footer {
  margin-top: auto;
  padding: 2.25rem clamp(18px, 4vw, 48px) 1.25rem;
  background: linear-gradient(180deg, var(--cream, #fffaf5) 0%, #efe6dc 100%);
  border-top: 1px solid var(--border, rgba(45, 31, 23, 0.12));
  width: 100%;
  max-width: 100%;
}

.cmp-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .cmp-footer__inner {
    grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: 2rem 3rem;
  }
}

.cmp-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cmp-footer__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 6px 18px rgba(45, 31, 23, 0.1);
}

.cmp-footer__brand-text strong {
  display: block;
  font-size: 1rem;
  color: var(--text, #2d1f17);
  line-height: 1.2;
}

.cmp-footer__brand-text span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-secondary, #6b5c54);
}

.cmp-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.cmp-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius, 8px);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary, #6b5c54);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cmp-footer__nav a:hover {
  color: var(--primary, #d4772c);
  background: var(--primary-glow, rgba(212, 119, 44, 0.12));
  border-color: rgba(212, 119, 44, 0.2);
}

.cmp-footer__nav a.is-active {
  color: var(--primary-dark, #b85f1a);
  background: var(--primary-glow, rgba(212, 119, 44, 0.14));
  border-color: rgba(212, 119, 44, 0.28);
}

.cmp-footer__bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 1.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border, rgba(45, 31, 23, 0.1));
}

.cmp-footer__legal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  justify-self: start;
  font-size: 0.8rem;
  color: var(--text-muted, #8a7a72);
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cmp-footer__legal:hover {
  color: var(--primary, #d4772c);
}

.cmp-footer__legal:hover .cmp-footer__cmp-name {
  text-decoration: underline;
  color: var(--primary, #d4772c);
}

.cmp-footer__cmp-name {
  font-weight: 600;
  color: var(--text, #2d1f17);
  white-space: nowrap;
}

.cmp-footer__legal-sep {
  opacity: 0.45;
  user-select: none;
}

.cmp-footer__rights {
  white-space: nowrap;
}

.cmp-footer__copyright {
  justify-self: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #6b5c54);
  text-align: center;
  white-space: nowrap;
}

.cmp-footer__sdev {
  margin: 0;
  padding: 0;
  justify-self: end;
  font-size: 0.78rem;
  color: var(--text-muted, #8a7a72);
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.cmp-footer__sdev a {
  color: var(--primary, #d4772c);
  font-weight: 600;
  text-decoration: none;
}

.cmp-footer__sdev a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .cmp-footer__bottom {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    text-align: center;
  }

  .cmp-footer__legal {
    justify-self: center;
    justify-content: center;
  }

  .cmp-footer__copyright {
    order: -1;
  }

  .cmp-footer__sdev {
    justify-self: end;
    width: 100%;
    text-align: right;
  }
}
