/* =========================================================
   CROCS-MINILUS — COOKIES MODULE
   Bannière + Page Préférences
   Version propre, cohérente et lisible
   ========================================================= */


/* =========================================================
   1️⃣  BANNIÈRE COOKIES
   ========================================================= */

.cm-cookie{
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 1500;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cm-cookie.is-hidden{
  display: none;
}

.cm-cookie__panel{
  pointer-events: auto;
  width: min(720px, 100%);
  border-radius: 18px;
  padding: 16px 16px 14px;

  /* Fond clair lisible sur thème crème */
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);

  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);

  color: #241f1a;
}

.cm-cookie__title{
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 6px;
  color: #1f1a15;
}

.cm-cookie__text{
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #2b241d;
}

.cm-cookie__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}


/* =========================================================
   Boutons (compatibles thème)
   ========================================================= */

.cm-btn{
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: all .2s ease;
}

.cm-btn--ghost{
  background: rgba(0,0,0,.06);
  color: #201a15;
}

.cm-btn--ghost:hover{
  background: rgba(0,0,0,.10);
}

.cm-btn--primary{
  background: #2f2a24; /* bois foncé */
  color: #ffffff;
}

.cm-btn--primary:hover{
  background: #1f1a15;
}


/* Responsive bannière */
@media (max-width: 480px){
  .cm-cookie{
    inset: auto 10px 10px 10px;
  }

  .cm-cookie__actions{
    justify-content: stretch;
  }

  .cm-btn{
    flex: 1;
  }
}



/* =========================================================
   2️⃣  PAGE PRÉFÉRENCES COOKIES
   ========================================================= */

.cm-cookiepage{
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
}

.cm-cookiepage__card{
  width: min(760px, 100%);
  border-radius: 22px;
  padding: 20px 20px 16px;

  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);

  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 22px 50px rgba(0,0,0,.22);

  color: #241f1a;
}

.cm-cookiepage__title{
  margin: 0 0 12px;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .2px;
  color: #1f1a15;
}

.cm-cookiepage__text{
  margin: 0 0 16px;
  line-height: 1.5;
  color: #2b241d;
}

.cm-cookiepage__list{
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.cm-cookiepage__row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;

  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);

  color: #241f1a;
}

.cm-cookiepage__row small{
  display: block;
  margin-top: 4px;
  color: #4b4036;
  font-weight: 600;
}

.cm-cookiepage__actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cm-cookiepage__links{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  color: #3a322a;
}

.cm-cookiepage__links a{
  color: #2c241d;
  text-decoration: none;
  border-bottom: 1px solid rgba(44,36,29,.25);
  transition: border-color .2s ease;
}

.cm-cookiepage__links a:hover{
  border-bottom-color: rgba(44,36,29,.55);
}

/* Checkboxes cohérentes avec thème */
.cm-cookiepage input[type="checkbox"]{
  accent-color: #2f2a24;
}


/* Responsive page */
@media (max-width: 480px){
  .cm-cookiepage__actions{
    justify-content: stretch;
  }

  .cm-btn{
    flex: 1;
  }
}


/* =========================
   Open App (PWA)
   ========================= */
.cm-openapp{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 5000;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
}

.cm-openapp.is-hidden{ display:none; }

.cm-openapp__panel{
  width: min(520px, 100%);
  border-radius: 22px;
  padding: 18px 18px 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 28px 70px rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,.08);
  position: relative;
}

.cm-openapp__text{
  color: #241f1a;
  line-height: 1.35;
  font-size: 16px;
  padding-right: 34px;
}

.cm-openapp__btn{
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  background: #2c241d;
  color: #f3e6cf;
  box-shadow: 0 14px 26px rgba(0,0,0,.18);
}

.cm-openapp__btn:active{
  transform: translateY(1px);
}

.cm-openapp__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(0,0,0,.06);
}
