/* mlcookies — bandeau de consentement Sel des Coteaux (charte : bordeaux #9f1642, police du thème).
   Classes préfixées mlc-. « Tout accepter » et « Tout refuser » ont la même taille et le même poids visuel
   (recommandation CNIL : refuser doit être aussi simple qu'accepter). */

.mlc-banner[hidden], .mlc-modal[hidden] { display: none !important; }

.mlc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000;
  background: #fff; color: #333; border-top: 3px solid #9f1642;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
  transform: translateY(100%); transition: transform .35s ease;
  font-size: 14px; line-height: 1.55;
}
.mlc-banner.mlc-visible { transform: translateY(0); }
.mlc-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 56px 18px 28px;
  display: flex; align-items: center; gap: 28px; position: relative;
}
.mlc-text { flex: 1 1 0%; }
.mlc-text p { margin: 0 0 4px; color: #444; }
.mlc-title { font-size: 16px !important; font-weight: 700; color: #222 !important; margin-bottom: 6px !important; }
.mlc-text a, .mlc-modal-more a { color: #9f1642; text-decoration: underline; font-weight: 600; }

.mlc-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; min-width: 190px; }
.mlc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 8px; border: 2px solid transparent;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s;
}
.mlc-btn-accept { background: #9f1642; border-color: #9f1642; color: #fff; }
.mlc-btn-accept:hover, .mlc-btn-accept:focus-visible { background: #7d1034; border-color: #7d1034; }
.mlc-btn-refuse { background: #222; border-color: #222; color: #fff; }
.mlc-btn-refuse:hover, .mlc-btn-refuse:focus-visible { background: #000; border-color: #000; }
.mlc-btn-save { background: #fff; border-color: #222; color: #222; }
.mlc-btn-save:hover, .mlc-btn-save:focus-visible { background: #f4f4f4; }
.mlc-link {
  background: none; border: 0; padding: 4px; font: inherit; font-size: 14px; font-weight: 600;
  color: #555; text-decoration: underline; cursor: pointer;
}
.mlc-link:hover, .mlc-link:focus-visible { color: #9f1642; }
.mlc-close {
  position: absolute; top: 10px; right: 12px; background: none; border: 0;
  color: #888; cursor: pointer; padding: 6px; line-height: 0;
}
.mlc-close:hover, .mlc-close:focus-visible { color: #222; }

/* Fenêtre « Personnaliser » */
html.mlc-noscroll, html.mlc-noscroll body { overflow: hidden; }
.mlc-modal {
  position: fixed; inset: 0; z-index: 100001; background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  font-size: 14px; line-height: 1.55; color: #333;
}
.mlc-modal-box {
  position: relative; background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
  max-height: calc(100vh - 32px); overflow: auto; padding: 24px 24px 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.mlc-modal-title { font-size: 18px; font-weight: 700; color: #222; margin: 0 0 6px; }
.mlc-modal-intro { color: #555; margin: 0 0 14px; }
.mlc-cat { border: 1px solid #eee; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.mlc-cat p { margin: 6px 0 0; color: #666; font-size: 13px; }
.mlc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer; }
.mlc-cat-name { font-weight: 700; color: #222; }
.mlc-always { font-size: 12px; font-weight: 700; color: #2e7d32; }

.mlc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.mlc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.mlc-switch span { position: absolute; inset: 0; background: #ccc; border-radius: 999px; transition: background .2s; }
.mlc-switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.mlc-switch input:checked + span { background: #9f1642; }
.mlc-switch input:checked + span::after { transform: translateX(20px); }
.mlc-switch input:focus-visible + span { outline: 2px solid #222; outline-offset: 2px; }

.mlc-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mlc-modal-actions .mlc-btn { flex: 1 1 140px; }
.mlc-modal-more { margin: 12px 0 0; font-size: 13px; text-align: center; }

/* Lien « Gérer les cookies » sous le pied de page (hook displayFooterAfter) */
.mlc-footer-legal { margin: 6px 0 10px; font-size: 13px; text-align: center; }
.mlc-footer-legal a, .mlc-footer-legal button {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline;
}
.mlc-footer-legal a:hover, .mlc-footer-legal button:hover,
.mlc-footer-legal a:focus-visible, .mlc-footer-legal button:focus-visible { color: #9f1642; }
.mlc-footer-legal span { margin: 0 6px; }

@media (max-width: 767px) {
  .mlc-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 40px 16px 16px; }
  .mlc-text p { font-size: 13px; }
  .mlc-title { font-size: 15px !important; }
  .mlc-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .mlc-actions .mlc-btn { flex: 1 1 0%; padding: 10px 12px; }
  .mlc-actions .mlc-link { flex-basis: 100%; }
  .mlc-modal-box { padding: 20px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .mlc-banner { transition: none; }
}
