/* ===== BANNIÈRE COOKIES — LOI 25 =====
   Reprise de la bannière du dossier public_html, aux couleurs de Marquage Ouimet inc. */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 3px solid #f6b404;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

#cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.cookie-text {
  flex: 1;
  min-width: 260px;
}

.cookie-text h3 {
  margin: 0 0 4px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #000;
}

.cookie-text p {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: #364153;
  line-height: 1.5;
}

.cookie-text a {
  color: #000;
  text-decoration: underline;
  text-decoration-color: #f6b404;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 600;
}

.cookie-text a:hover {
  color: #b78600;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn-accept {
  background: #f6b404;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 11px 22px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.cookie-btn-accept:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.45);
}

.cookie-btn-refuse {
  background: transparent;
  color: #000;
  border: 1.5px solid #000;
  border-radius: 0;
  padding: 11px 22px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn-refuse:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
}

.cookie-btn-settings {
  background: transparent;
  color: #6e7191;
  border: none;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
  transition: color 0.2s;
}

.cookie-btn-settings:hover {
  color: #000;
}

#cookie-banner button:focus-visible,
#cookie-modal button:focus-visible,
.cookie-toggle input:focus-visible + .cookie-toggle-slider {
  outline: 2px solid #f6b404;
  outline-offset: 2px;
}

/* MODAL PRÉFÉRENCES COOKIES */
#cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#cookie-modal.open {
  display: flex;
}

.cookie-modal-box {
  background: #fff;
  border-top: 4px solid #f6b404;
  border-radius: 0;
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal-box h2 {
  margin: 0 0 8px;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: #000;
}

.cookie-modal-box > p {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: #364153;
  margin: 0 0 24px;
  line-height: 1.5;
}

.cookie-category {
  border: 1.5px solid #e5e7eb;
  border-left: 4px solid #f6b404;
  border-radius: 0;
  background: #f9fbfe;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.cookie-category-header strong {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #000;
}

.cookie-category p {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: #6e7191;
  line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cad5d5;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #f6b404;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background: #f6b404;
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cookie-modal-actions .cookie-btn-accept {
  flex: 1;
  text-align: center;
  justify-content: center;
}

.cookie-modal-actions .cookie-btn-refuse {
  flex: 1;
  text-align: center;
}

.cookie-modal-links {
  text-align: center;
  margin-top: 12px;
  color: #6e7191;
}

/* Lien gestion cookies dans footer */
.cookie-manage-link:not(.btn) {
  font-size: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s;
}

.cookie-manage-link:not(.btn):hover {
  color: #f6b404;
}

@media (max-width: 768px) {
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }

  .cookie-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .cookie-btn-accept,
  .cookie-btn-refuse {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .cookie-modal-box {
    padding: 24px 18px;
  }
}
