/* Bandeau de consentement cookies — thème « Craie & grain » */

.cookieConsent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--theme-b-bg, #faf7f2);
  border-top: 1px solid var(--theme-b-border, #e2ded7);
  box-shadow: 0 -6px 24px rgba(37, 35, 32, 0.12);
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--theme-b-text, #252320);
  transform: translateY(110%);
  transition: transform 0.3s ease;
}

.cookieConsent.is-visible {
  transform: translateY(0);
}

.cookieConsent__text {
  flex: 1 1 320px;
  max-width: 640px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookieConsent__text a {
  color: var(--theme-b-action, #6d5d4b);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookieConsent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookieConsent__btn {
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.cookieConsent__btn--accept {
  background: var(--theme-b-action, #6d5d4b);
  color: var(--theme-b-on-action, #faf8f5);
  box-shadow: var(--theme-b-btn-shadow, 0 2px 12px rgba(109, 93, 75, 0.28));
}

.cookieConsent__btn--accept:hover {
  background: var(--theme-b-action-hover, #5a4c3d);
}

.cookieConsent__btn--refuse {
  background: transparent;
  color: var(--theme-b-text, #252320);
  border-color: var(--theme-b-border, #e2ded7);
}

.cookieConsent__btn--refuse:hover {
  background: var(--theme-b-subtle, #f0ebe3);
}

.cookieConsent__btn:focus-visible {
  outline: 2px solid var(--theme-b-action, #6d5d4b);
  outline-offset: 2px;
}

@media (max-width: 540px) {
  .cookieConsent:not(.cookieConsent--modal) {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookieConsent:not(.cookieConsent--modal) .cookieConsent__actions {
    justify-content: center;
  }
}

/* Modale centrée (landing) — fond flouté */
body.cookie-consent-open {
  overflow: hidden;
}

.cookieConsentBackdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(37, 35, 32, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cookieConsentBackdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cookieConsent--modal {
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  z-index: 9999;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  width: min(92vw, 22rem);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--theme-b-border, #e2ded7);
  box-shadow: 0 20px 50px rgba(37, 35, 32, 0.22);
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}

.cookieConsent--modal.is-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.cookieConsent--modal .cookieConsent__text {
  flex: none;
  max-width: none;
  font-size: 0.92rem;
}

.cookieConsent--modal .cookieConsent__actions {
  justify-content: center;
  margin-top: 0.35rem;
}

.cookieConsent--modal .cookieConsent__btn--accept {
  min-width: 7rem;
}

.cookieConsent__policy {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--theme-b-action, #6d5d4b);
  text-decoration: none;
}

.cookieConsent__policy:hover {
  text-decoration: underline;
}
