/* ==========================================================
   Asso Consent Light - Frontend CSS
   Version propre et moderne
   ========================================================== */

/* Base */
.acl-banner,
.acl-modal,
.acl-button,
.acl-banner *,
.acl-modal * {
  box-sizing: border-box;
  font-family: inherit;
}

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

/* ==========================================================
   Bandeau principal
   ========================================================== */

.acl-banner {
  position: fixed;
  z-index: 999998;
  color: var(--acl-text, #3f3a34);
}

/* Position bas de page */
.acl-position-bottom {
  left: 18px;
  right: 18px;
  bottom: 18px;
}

/* Position popup */
.acl-position-popup {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
}

/* Contenu du bandeau */
.acl-banner-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--acl-bg, #fffdf8);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(92, 84, 71, 0.14);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

/* Texte du bandeau */
.acl-banner-content p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--acl-text, #3f3a34);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
}

/* Zone boutons */
.acl-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

/* ==========================================================
   Boutons
   ========================================================== */

.acl-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

/* Hover général */
.acl-button:hover {
  transform: translateY(-1px);
}

/* Focus accessibilité */
.acl-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 168, 94, 0.22);
}

/* Bouton accepter : action principale */
.acl-button-accept {
  background: var(--acl-primary, #8ba85e);
  color: #ffffff;
  border-color: var(--acl-primary, #8ba85e);
  box-shadow: 0 8px 20px rgba(139, 168, 94, 0.28);
}

.acl-button-accept:hover,
.acl-button-accept:focus {
  background: #7c9950;
  border-color: #7c9950;
  color: #ffffff;
}

/* Bouton enregistrer : même style que accepter */
.acl-button-save {
  background: var(--acl-primary, #8ba85e);
  color: #ffffff;
  border-color: var(--acl-primary, #8ba85e);
  box-shadow: 0 8px 20px rgba(139, 168, 94, 0.24);
}

.acl-button-save:hover,
.acl-button-save:focus {
  background: #7c9950;
  border-color: #7c9950;
  color: #ffffff;
}

/* Bouton personnaliser : secondaire élégant */
.acl-button-customize {
  background: #ffffff;
  color: var(--acl-text, #3f3a34);
  border-color: rgba(92, 84, 71, 0.24);
}

.acl-button-customize:hover,
.acl-button-customize:focus {
  background: #f7f3ec;
  color: var(--acl-text, #3f3a34);
  border-color: rgba(92, 84, 71, 0.38);
}

/* Bouton refuser : discret, mais visible */
.acl-button-refuse {
  background: transparent;
  color: rgba(63, 58, 52, 0.82);
  border-color: rgba(92, 84, 71, 0.22);
}

.acl-button-refuse:hover,
.acl-button-refuse:focus {
  background: #f7f3ec;
  color: var(--acl-text, #3f3a34);
  border-color: rgba(92, 84, 71, 0.36);
}

/* ==========================================================
   Modal préférences
   ========================================================== */

.acl-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(20, 20, 20, 0.48);
  color: var(--acl-text, #3f3a34);
}

/* Boîte modale */
.acl-modal-inner {
  position: relative;
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;

  background: var(--acl-bg, #fffdf8);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(92, 84, 71, 0.12);
}

/* Titre modal */
.acl-modal-inner h2 {
  margin: 0 42px 20px 0;
  color: var(--acl-text, #3f3a34);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
}

/* Bouton fermer */
.acl-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;

  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;

  background: rgba(92, 84, 71, 0.08);
  color: var(--acl-text, #3f3a34);

  font-size: 26px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background-color 0.18s ease, transform 0.18s ease;
}

.acl-modal-close:hover,
.acl-modal-close:focus {
  background: rgba(92, 84, 71, 0.14);
  transform: rotate(90deg);
  outline: none;
}

/* Catégories */
.acl-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;

  padding: 18px 0;
  border-top: 1px solid rgba(92, 84, 71, 0.14);
}

.acl-category:last-of-type {
  border-bottom: 1px solid rgba(92, 84, 71, 0.14);
}

.acl-category strong {
  display: block;
  color: var(--acl-text, #3f3a34);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.acl-category p {
  margin: 7px 0 0;
  color: rgba(63, 58, 52, 0.78);
  font-size: 14px;
  line-height: 1.55;
}

/* Toujours actif */
.acl-always-on {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 10px;
  border-radius: 999px;

  background: rgba(139, 168, 94, 0.13);
  color: var(--acl-primary, #8ba85e);

  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 700;
}

/* Checkbox/toggle simple */
.acl-toggle {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: var(--acl-primary, #8ba85e);
}

/* Actions dans la modal */
.acl-modal-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================
   Shortcode politique cookies
   ========================================================== */

.acl-policy {
  line-height: 1.7;
  color: var(--acl-text, #3f3a34);
}

.acl-policy h2,
.acl-policy h3 {
  color: var(--acl-text, #3f3a34);
}

.acl-policy p {
  margin-bottom: 1em;
}

/* ==========================================================
   Responsive tablette
   ========================================================== */

@media (max-width: 900px) {
  .acl-banner-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .acl-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

/* ==========================================================
   Responsive mobile
   ========================================================== */

@media (max-width: 720px) {
  .acl-position-bottom {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .acl-banner-content {
    padding: 18px;
    border-radius: 16px;
  }

  .acl-banner-content p {
    font-size: 14px;
    line-height: 1.55;
  }

  .acl-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }

  .acl-button {
    width: 100%;
    min-height: 45px;
    padding: 13px 16px;
    font-size: 14px;
  }

  .acl-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .acl-modal-inner {
    width: 100%;
    max-height: 90vh;
    padding: 22px 18px;
    border-radius: 20px 20px 0 0;
  }

  .acl-modal-inner h2 {
    font-size: 21px;
    margin-right: 42px;
  }

  .acl-category {
    align-items: flex-start;
    gap: 14px;
  }

  .acl-category p {
    font-size: 13px;
  }

  .acl-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .acl-modal-actions .acl-button {
    width: 100%;
  }
}

/* Très petits écrans */
@media (max-width: 420px) {
  .acl-banner-content {
    padding: 16px;
  }

  .acl-modal-inner {
    padding: 20px 16px;
  }
}