/* -------------------------------------------------------------------------- */
/* Bannière cookies Aidancia (js/cookies.js) — 25/09/2026                      */
/* -------------------------------------------------------------------------- */
/* Carte blanche arrondie comme les boutons du site, en bas à gauche, avec le   */
/* logo dans une pastille beige (rappel de l'en-tête). Le logo salue à         */
/* l'ouverture, se réjouit à l'accord et se fait petit sur « Juste l'essentiel ». */
/* -------------------------------------------------------------------------- */

.ad-ck {
  --ad-ck-brown: var(--wp--preset--color--base, #3a2c1c);
  --ad-ck-cream: var(--wp--preset--color--contrast, #F4E7D6);
  --ad-ck-beige: var(--wp--preset--color--primary, #CA9F70);
  --ad-ck-orange: var(--wp--preset--color--secondary, #F7A600);
  --ad-ck-bordeaux: var(--wp--preset--color--tertiary, #751441);
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999990;                    /* sous la popin « Tenez-moi informé » (10000001) */
  width: min(460px, calc(100vw - 40px));
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px 20px 20px;
  box-sizing: border-box;
  background: #fff;
  color: var(--ad-ck-brown);
  border-radius: 28px;
  box-shadow: 0 18px 50px -18px rgba(58, 44, 28, .45);
  font-family: var(--wp--preset--font-family--elza-round, sans-serif);
  font-size: 15px;
  line-height: 1.45;
  transform: translateY(24px);
  opacity: 0;
  visibility: hidden;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1), opacity .4s ease-out, visibility 0s .5s;
}
.ad-ck.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1), opacity .3s ease-out, visibility 0s;
}
.ad-ck.is-leaving {
  transform: translateY(24px) scale(.96);
  opacity: 0;
}
.ad-ck * { box-sizing: border-box; }
/* le thème colore certains <p> en crème : on force la couleur du texte de la carte */
.ad-ck p, .ad-ck label, .ad-ck small, .ad-ck li { color: var(--ad-ck-brown); }

/* --- Le logo dans sa pastille ------------------------------------------------- */
.ad-ck__mark {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--ad-ck-beige);
  display: grid;
  place-items: center;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), background-color .3s ease-out;
}
.ad-ck__mark img { display: block; width: 52px; height: 52px; }
.ad-ck__mark.is-excited { transform: scale(1.08) rotate(-4deg); background: var(--ad-ck-orange); }
.ad-ck__mark.is-shy { transform: scale(.94); }
.ad-ck__mark.is-hello { animation: ad-ck-hello .9s ease-in-out; }
.ad-ck__mark.is-happy { animation: ad-ck-happy .7s cubic-bezier(.34, 1.56, .64, 1); background: var(--ad-ck-orange); }
.ad-ck__mark.is-sorry { animation: ad-ck-sorry .6s ease-in-out; }
@keyframes ad-ck-hello { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 55% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
@keyframes ad-ck-happy { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-14px) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
@keyframes ad-ck-sorry { 0%, 100% { transform: translateX(0) scale(.94); } 25% { transform: translateX(-5px) scale(.94); } 75% { transform: translateX(5px) scale(.94); } }

/* --- Texte ------------------------------------------------------------------ */
.ad-ck__body { flex: 1 1 auto; min-width: 0; }
.ad-ck__title {
  margin: 2px 0 6px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ad-ck-bordeaux);
}
.ad-ck__title small {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ad-ck-brown);
  opacity: .7;
  margin-top: 3px;
}
.ad-ck__text { margin: 0 0 14px; }
.ad-ck__text a {
  color: var(--ad-ck-bordeaux);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
  transition: color .2s ease-out;
}
.ad-ck__text a:hover,
.ad-ck__text a:focus-visible { color: var(--ad-ck-orange); }

/* --- Actions ---------------------------------------------------------------- */
.ad-ck__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.ad-ck__btn {
  appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--ad-ck-bordeaux);
  background: #fff;
  color: var(--ad-ck-bordeaux);
  cursor: pointer;
  transition: background-color .25s ease-out, color .25s ease-out, border-color .25s ease-out, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.ad-ck__btn:hover,
.ad-ck__btn:focus-visible { background: var(--ad-ck-bordeaux); color: #fff; transform: translateY(-1px); }
.ad-ck__btn--yes { background: var(--ad-ck-bordeaux); color: #fff; }
.ad-ck__btn--yes:hover,
.ad-ck__btn--yes:focus-visible { background: var(--ad-ck-orange); border-color: var(--ad-ck-orange); color: #fff; }
.ad-ck__btn:focus-visible { outline: 3px solid var(--ad-ck-orange); outline-offset: 2px; }
.ad-ck__link {
  appearance: none;
  font: inherit;
  font-size: 14px;
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--ad-ck-brown);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .18em;
  transition: color .2s ease-out;
}
.ad-ck__link:hover,
.ad-ck__link:focus-visible { color: var(--ad-ck-bordeaux); }
.ad-ck__link:focus-visible { outline: 3px solid var(--ad-ck-orange); outline-offset: 2px; border-radius: 6px; }

/* --- Préférences ------------------------------------------------------------ */
.ad-ck__prefs { margin: 0 0 14px; padding: 0; list-style: none; }
.ad-ck__prefs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(58, 44, 28, .14);
}
.ad-ck__prefs li:last-child { border-bottom: 1px solid rgba(58, 44, 28, .14); }
.ad-ck__prefs li[hidden] { display: none; }
.ad-ck__prefs label { flex: 1 1 auto; cursor: pointer; font-weight: 700; }
.ad-ck__prefs small { display: block; font-size: 12px; font-weight: 400; opacity: .7; }
.ad-ck__prefs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-ck__toggle {
  flex: 0 0 auto;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 20px;
  border: 1.5px solid var(--ad-ck-bordeaux);
  background: #fff;
  transition: background-color .25s ease-out;
}
.ad-ck__toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ad-ck-bordeaux);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), background-color .25s;
}
.ad-ck__prefs input:checked + .ad-ck__toggle { background: var(--ad-ck-bordeaux); }
.ad-ck__prefs input:checked + .ad-ck__toggle::after { transform: translateX(18px); background: var(--ad-ck-orange); }
.ad-ck__prefs input:disabled + .ad-ck__toggle { opacity: .45; }
.ad-ck__prefs input:focus-visible + .ad-ck__toggle { outline: 3px solid var(--ad-ck-orange); outline-offset: 2px; }

/* --- Mobile ----------------------------------------------------------------- */
@media (max-width: 560px) {
  .ad-ck {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 16px;
    gap: 14px;
    border-radius: 22px;
    font-size: 14px;
  }
  .ad-ck__mark { width: 58px; height: 58px; }
  .ad-ck__mark img { width: 38px; height: 38px; }
  .ad-ck__title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-ck, .ad-ck__mark, .ad-ck__btn, .ad-ck__toggle, .ad-ck__toggle::after { transition: none; animation: none !important; }
}
