/**
 * Styles pour le popup invitation ICCHM 2026 (OrthoDiet).
 */

.od-icchm-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.od-icchm-popup.is-active {
  visibility: visible;
  opacity: 1;
}

.od-icchm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.od-icchm-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(145deg, #091941 0%, #0a0047 52%, #050816 100%);
  border-radius: 20px;
  border: 1px solid rgba(140, 108, 233, 0.38);
  box-shadow: 
    0 25px 60px -10px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(140, 108, 233, 0.25),
    0 0 45px rgba(111, 160, 255, 0.15);
  color: #ffffff;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.od-icchm-popup.is-active .od-icchm-dialog {
  transform: translateY(0) scale(1);
}

/* Bouton fermer */
.od-icchm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(10, 14, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.od-icchm-close:hover,
.od-icchm-close:focus-visible {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  transform: scale(1.08);
  outline: none;
}

/* Bannière média */
.od-icchm-dialog__media {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-top-left-radius: 19px;
  border-top-right-radius: 19px;
  background: #091941;
}

.od-icchm-dialog__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.od-icchm-dialog__media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 25, 65, 0.15) 0%, rgba(9, 25, 65, 0.75) 75%, #091941 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 20px;
  box-sizing: border-box;
}

.od-icchm-badge-dates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px;
  background: rgba(5, 8, 22, 0.85);
  border: 1px solid rgba(140, 108, 233, 0.5);
  border-radius: 999px;
  font-family: var(--od-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B6CFFF;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.od-icchm-badge-dates::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8C6CE9;
  box-shadow: 0 0 10px rgba(140, 108, 233, 0.95);
  flex-shrink: 0;
}

/* Corps du popup */
.od-icchm-dialog__body {
  padding: 20px 24px 24px;
  box-sizing: border-box;
  position: relative;
}

.od-icchm-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.od-icchm-dialog__logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.od-icchm-pill {
  font-family: var(--od-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9b90de;
  background: rgba(140, 108, 233, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(140, 108, 233, 0.25);
}

.od-icchm-dialog__title {
  margin: 0 0 10px !important;
  font-family: var(--od-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
  font-size: clamp(20px, 4vw, 24px) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
  color: #ffffff !important;
}

.od-icchm-accent {
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff 0%, #B6CFFF 45%, #A78BFA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #B6CFFF;
}

.od-icchm-dialog__desc {
  margin: 0 0 16px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

/* Points clés */
.od-icchm-keypoints {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(140, 108, 233, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
}

.od-icchm-keypoint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.od-icchm-keypoint strong {
  color: #B6CFFF;
  font-weight: 600;
}

.od-icchm-keypoint__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  font-size: 13px;
}

/* Actions */
.od-icchm-dialog__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.od-icchm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--od-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  box-sizing: border-box;
}

.od-icchm-btn--primary {
  flex: 1.3;
  background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
}

.od-icchm-btn--primary:hover,
.od-icchm-btn--primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.65);
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  outline: none;
}

.od-icchm-btn--ghost {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1 !important;
  border: 1px solid rgba(140, 108, 233, 0.35);
}

.od-icchm-btn--ghost:hover,
.od-icchm-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(140, 108, 233, 0.6);
  color: #ffffff !important;
  outline: none;
}

/* Pied de page du popup */
.od-icchm-dialog__footer {
  margin-top: 14px;
  text-align: center;
}

.od-icchm-dismiss-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.18s ease;
}

.od-icchm-dismiss-btn:hover,
.od-icchm-dismiss-btn:focus-visible {
  color: rgba(255, 255, 255, 0.85);
  outline: none;
}

/* Verrouillage scroll corps si ouvert */
body.od-icchm-open {
  overflow: hidden !important;
}

/* Responsive mobile */
@media (max-width: 580px) {
  .od-icchm-dialog {
    max-width: calc(100vw - 28px);
    border-radius: 16px;
  }

  .od-icchm-dialog__media {
    height: 140px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
  }

  .od-icchm-dialog__body {
    padding: 16px 16px 20px;
  }

  .od-icchm-brand-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .od-icchm-dialog__logo {
    height: 28px;
  }

  .od-icchm-dialog__title {
    font-size: 18px !important;
  }

  .od-icchm-dialog__desc {
    font-size: 12.5px !important;
  }

  .od-icchm-keypoints {
    padding: 10px 12px;
    gap: 6px;
  }

  .od-icchm-keypoint {
    font-size: 11.5px;
  }

  .od-icchm-dialog__actions {
    flex-direction: column;
    gap: 8px;
  }

  .od-icchm-btn {
    width: 100%;
    flex: none;
    padding: 11px 16px;
    font-size: 13px;
  }
}
