/* ============================================================
   Flytekx — Cookie Consent Modal  v2
   ============================================================ */

/* --- Overlay --- */
.fck-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fck-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* --- Modal box --- */
.fck-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

.fck-overlay.is-open .fck-modal {
  transform: translateY(0) scale(1);
}

.fck-modal *,
.fck-modal *::before,
.fck-modal *::after {
  box-sizing: border-box;
}

/* --- Header stripe --- */
.fck-header {
  background: #111;
  color: #fff;
  padding: 22px 28px 20px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fck-header__left { flex: 1; }

.fck-header__badge {
  display: inline-block;
  background: #ff6600;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.fck-header__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.fck-header__sub {
  margin: 5px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,.65);
  line-height: 1.4;
}

.fck-header__close {
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}

.fck-header__close:hover { background: rgba(255,255,255,.2); }

/* --- Scrollable body --- */
.fck-body {
  overflow-y: auto;
  padding: 24px 28px;
  flex: 1;
}

.fck-intro {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 20px;
}

.fck-intro a {
  color: #ff6600;
  text-decoration: underline;
}

/* --- Category cards --- */
.fck-category {
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .2s;
}

.fck-category:last-of-type { margin-bottom: 0; }

.fck-category--active {
  border-color: #ff6600;
  background: #fff9f5;
}

.fck-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.fck-category__info { flex: 1; }

.fck-category__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fck-category__tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 20px;
}

.fck-tag--required {
  background: #e8f5e9;
  color: #2e7d32;
}

.fck-tag--optional {
  background: #fff3e0;
  color: #e65100;
}

.fck-category__short {
  margin: 4px 0 0;
  font-size: 12px;
  color: #777;
  line-height: 1.45;
}

/* --- Toggle switch --- */
.fck-switch {
  position: relative;
  width: 48px;
  height: 27px;
  flex-shrink: 0;
}

.fck-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.fck-switch__track {
  position: absolute;
  inset: 0;
  background: #d4d4d4;
  border-radius: 999px;
  cursor: pointer;
  transition: background .22s;
}

.fck-switch__track::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .22s;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.fck-switch input:checked + .fck-switch__track {
  background: #ff6600;
}

.fck-switch input:checked + .fck-switch__track::after {
  transform: translateX(21px);
}

.fck-switch input:disabled + .fck-switch__track {
  opacity: .5;
  cursor: not-allowed;
}

/* --- Expandable details (cookie table) --- */
.fck-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.fck-details.is-open {
  max-height: 600px;
}

.fck-details__inner {
  padding-top: 14px;
}

.fck-details__text {
  font-size: 12.5px;
  color: #555;
  line-height: 1.55;
  margin: 0 0 10px;
}

.fck-cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}

.fck-cookie-table th,
.fck-cookie-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.fck-cookie-table th {
  font-weight: 600;
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f8f8f8;
  border-bottom-color: #e8e8e8;
}

.fck-cookie-table tr:last-child td { border-bottom: none; }

.fck-expand-btn {
  background: none;
  border: none;
  color: #ff6600;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.fck-expand-btn::after {
  content: "▸";
  transition: transform .2s;
  display: inline-block;
}

.fck-expand-btn.is-open::after {
  transform: rotate(90deg);
}

/* --- Footer (CTA bar) --- */
.fck-footer {
  padding: 18px 28px;
  border-top: 1px solid #ececec;
  background: #fafafa;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.fck-footer__note {
  flex: 1;
  font-size: 11px;
  color: #aaa;
  min-width: 160px;
}

.fck-btn {
  appearance: none;
  border: 1.5px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font: 600 13px/1 Poppins, sans-serif;
  padding: 11px 20px;
  transition: all .2s;
  white-space: nowrap;
}

.fck-btn:hover { background: #f2f2f2; border-color: #ccc; }

.fck-btn--reject {
  border-color: #ddd;
  color: #666;
}

.fck-btn--accept {
  background: #ff6600;
  border-color: #ff6600;
  color: #fff;
}

.fck-btn--accept:hover { background: #e05600; border-color: #e05600; }

/* --- "Gérer les cookies" footer link trigger --- */
.fck-manage-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}

/* --- Mobile --- */
@media (max-width: 540px) {
  .fck-overlay { padding: 0; align-items: flex-end; }

  .fck-modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }

  .fck-header { padding: 18px 20px 16px; }
  .fck-body   { padding: 18px 20px; }
  .fck-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
  }

  .fck-footer__note { display: none; }

  .fck-btn { width: 100%; text-align: center; padding: 14px; }
}
