/* ============================================================
   COOKIES CMP — Carte flottante bas-gauche, 2 vues (intro + settings)
   Charte CO.CONSEILS : bleu marine #091A42, accent or #E9B94C
   ============================================================ */

.cc-root, .cc-root * { box-sizing: border-box; }
.cc-root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }

/* ---------- Carte flottante ---------- */
.cc-card-wrap {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 20px;
  z-index: 2147483640;
  width: 400px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 50px);
  animation: cc-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}

@keyframes cc-slide-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cc-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(9, 26, 66, 0.22), 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  color: #091A42;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  position: relative;
}

/* Vue intro - visible par defaut */
.cc-view--intro { display: flex; flex-direction: column; }
.cc-view--settings { display: none; flex-direction: column; min-height: 0; }

.cc-card.is-settings .cc-view--intro { display: none; }
.cc-card.is-settings .cc-view--settings { display: flex; }

/* ---------- Vue intro : media + texte + 3 boutons ---------- */
.cc-card__media {
  position: relative;
  background: linear-gradient(135deg, #0f2454 0%, #091A42 100%);
  height: 170px;
  overflow: hidden;
  flex-shrink: 0;
}

.cc-card__media svg.cc-illu {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  width: 75%;
  height: auto;
  max-height: 140px;
}

.cc-card__wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 32px;
  display: block;
}

.cc-card__brand {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.88);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.cc-card__brand .cc-brand-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #E9B94C;
}

.cc-card__body {
  padding: 18px 22px 10px 22px;
}

.cc-card__hello {
  font-size: 13.5px;
  color: #6b7590;
  margin: 0 0 4px 0;
  font-weight: 500;
}
.cc-card__title {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #091A42;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.cc-card__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #4a5774;
  margin: 0 0 14px 0;
}
.cc-card__text a {
  color: #091A42;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-card__actions {
  display: flex;
  gap: 6px;
  padding: 0 18px 18px 18px;
}
.cc-card__actions > .cc-btn { flex: 1; }

.cc-card__close-x {
  position: absolute;
  bottom: -16px;
  left: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #E9B94C;
  color: #091A42;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(233, 185, 76, 0.4);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.18s;
  z-index: 3;
  padding: 0;
}
.cc-card__close-x:hover { transform: scale(1.08); }

/* ---------- Vue settings : categories + save ---------- */
.cc-view--settings .cc-settings__header {
  padding: 18px 22px 10px 22px;
  border-bottom: 1px solid #ecf0f5;
  position: relative;
  flex-shrink: 0;
}

.cc-settings__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #6b7590;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 8px;
}
.cc-settings__back:hover { color: #091A42; }

.cc-settings__title {
  font-size: 17px;
  font-weight: 700;
  color: #091A42;
  margin: 0 0 4px 0;
}
.cc-settings__subtitle {
  font-size: 12.5px;
  color: #6b7590;
  margin: 0;
  line-height: 1.45;
}

.cc-settings__body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.cc-category {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ecf0f5;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: border-color 0.18s, background 0.18s;
}
.cc-category:hover { border-color: #d5dbe8; background: #fafbfd; }
.cc-category.is-open { flex-wrap: wrap; }

.cc-category__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.cc-category__icon--essential { background: #e8efe6; color: #3a7a43; }
.cc-category__icon--analytics { background: #fff1d6; color: #b78618; }
.cc-category__icon--marketing { background: #f3e5f8; color: #7a3aa1; }

.cc-category__info { flex: 1; min-width: 0; }
.cc-category__name {
  font-size: 13.5px;
  font-weight: 600;
  color: #091A42;
  margin: 0 0 2px 0;
}
.cc-category__desc {
  font-size: 11.5px;
  color: #6b7590;
  line-height: 1.4;
  margin: 0;
}

.cc-category__toggle-btn {
  background: none;
  border: none;
  color: #9aa3b7;
  font-size: 10.5px;
  cursor: pointer;
  padding: 3px 0 0 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cc-category__toggle-btn:hover { color: #091A42; }

.cc-category__details {
  display: none;
  width: 100%;
  padding: 10px 2px 0 48px;
  margin-top: -2px;
  font-size: 11.5px;
  color: #6b7590;
  line-height: 1.5;
}
.cc-category.is-open .cc-category__details { display: block; }
.cc-category__details ul { margin: 4px 0 0 0; padding-left: 14px; }
.cc-category__details li { margin-bottom: 2px; }

/* Toggle switch */
.cc-switch {
  position: relative;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
}
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d5dbe8;
  border-radius: 24px;
  transition: background 0.2s;
}
.cc-switch__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-switch input:checked + .cc-switch__slider { background: #E9B94C; }
.cc-switch input:checked + .cc-switch__slider::before { transform: translateX(16px); }
.cc-switch input:disabled + .cc-switch__slider {
  background: #3a7a43;
  opacity: 0.6;
  cursor: not-allowed;
}

.cc-settings__footer {
  padding: 12px 16px 16px 16px;
  border-top: 1px solid #ecf0f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.cc-settings__footer-row {
  display: flex;
  gap: 6px;
}
.cc-settings__footer-row > .cc-btn { flex: 1; }

.cc-settings__legal {
  text-align: center;
  font-size: 10.5px;
  color: #9aa3b7;
  margin: 2px 0 0 0;
}
.cc-settings__legal a { color: #6b7590; text-decoration: underline; }

/* ---------- Boutons ---------- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  line-height: 1.15;
  text-decoration: none;
  text-align: center;
}

.cc-btn--primary {
  background: #E9B94C;
  color: #091A42;
}
.cc-btn--primary:hover { background: #d9a93a; transform: translateY(-1px); }

.cc-btn--secondary {
  background: #fff;
  color: #091A42;
  border: 1px solid #e5e8f0;
}
.cc-btn--secondary:hover { background: #f7f8fb; border-color: #d5dbe8; }

.cc-btn--ghost {
  background: transparent;
  color: #6b7590;
  font-weight: 500;
  padding: 8px 12px;
  font-size: 12.5px;
}
.cc-btn--ghost:hover { color: #091A42; background: #f7f8fb; }

/* ---------- Bouton flottant apres choix ---------- */
.cc-floating {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 2147483630;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ecf0f5;
  box-shadow: 0 6px 20px rgba(9, 26, 66, 0.14);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.18s;
  padding: 0;
}
.cc-floating:hover { transform: scale(1.1); }

/* ---------- Responsive mobile ---------- */
@media (max-width: 480px) {
  .cc-card-wrap {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 20px);
  }
  .cc-card { max-height: calc(100vh - 20px); }
  .cc-card__media { height: 150px; }
  .cc-card__title { font-size: 19px; }
  .cc-card__actions { flex-direction: column; }
  .cc-floating { bottom: 12px; left: 12px; }
}
