/* Compléments Tailwind — thème chantier sobre (canvas / coal / brick) */

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: clip;
}

#site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#site-header.header-scrolled {
  background-color: rgba(250, 250, 248, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(42, 41, 38, 0.06);
  border-color: rgba(232, 230, 224, 0.95);
}

@media (max-width: 767px) {
  #site-header {
    background-color: #fafaf8 !important;
    backdrop-filter: none;
    border-bottom-color: #e8e6e0 !important;
    box-shadow: 0 1px 0 rgba(42, 41, 38, 0.06);
  }

  #site-header.header-scrolled {
    background-color: #fafaf8 !important;
  }

  #site-header .max-w-6xl > div:first-child {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  #nav-toggle {
    position: relative;
    z-index: 52;
  }

  #nav-menu {
    position: fixed;
    inset: 0;
    top: 4.5rem;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.5rem;
    background: rgba(250, 250, 248, 0.98);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid #e8e6e0;
  }

  #nav-menu.nav-open {
    transform: translateX(0);
  }

  #nav-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 45;
    background: rgba(42, 41, 38, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  #nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Grille fine — rappel plan / quadrillage chantier */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04'%3E%3Cpath d='M0 20h40M20 0v40'/%3E%3C/g%3E%3C/svg%3E");
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #a85a38;
  outline-offset: 2px;
}

/* Bandeau cookies */
.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 100;
  padding: 1rem;
  background: rgba(42, 41, 38, 0.97);
  color: #f5f4f0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.cookie-banner__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner__title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.cookie-banner__desc {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #d1cec6;
  max-width: 42rem;
}

.cookie-banner__link {
  color: #d4a088;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__link:hover {
  color: #e8b5a0;
}

.cookie-banner__actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-btn {
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-btn--primary {
  background: #a85a38;
  color: #fff;
  border: none;
}

.cookie-btn--primary:hover {
  background: #c2785a;
}

.cookie-btn--ghost {
  background: transparent;
  color: #f5f4f0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cookie-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Pages légales */
.legal-prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2a2926;
}

.legal-prose h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #45433d;
}

.legal-prose p,
.legal-prose li {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #5c5952;
}

.legal-prose ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  list-style: disc;
}

.legal-prose a {
  color: #a85a38;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.legal-table {
  width: 100%;
  min-width: 28rem;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal-table th,
.legal-table td {
  border: 1px solid #e8e6e0;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.legal-table th {
  background: #f5f4f0;
  font-weight: 600;
  color: #2a2926;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
