/* Base */
.consent-modal[aria-hidden="true"] { display: none; }
.consent-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; }
.consent-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(1px); }
.consent-dialog {
  position: relative; background: #fff; border-radius: 16px;
  width: min(960px, 92vw); max-height: 90vh; overflow-y: scroll; overflow-x: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); display: flex; flex-direction: column;
}
.consent-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 28px; line-height: 1; cursor: pointer; color: #666;
}
.consent-close:hover { color: #111; }
#consent-title { margin: 0; padding: 18px 12px; border-bottom: 1px solid #eee; font-size: 1.25rem; }

/* Corps */
.consent-body { padding: 18px 24px; display: grid; gap: 16px; }
.consent-lead {
  font-size: 1.05rem; line-height: 1.5; color: #333; background: #f8fbff; border: 1px solid #e7f0ff;
  padding: 12px 4px; border-radius: 12px;
}
.pdf-preview { height: clamp(320px, 55vh, 640px); border: 1px solid #eee; border-radius: 12px; overflow: hidden; }
.pdf-preview iframe { width: 100%; height: 100%; border: 0; }

/* Contenu HTML intégré */
#consent-html-content {
  display: block; height: clamp(320px, 55vh, 640px); border: 1px solid #eee; border-radius: 12px; 
  overflow-y: auto; overflow-x: hidden; padding: 16px; background: #fff;
}

.conditions-sections .condition-section { 
  margin: 20px 0; padding: 16px; background: #f9f9f9; border-radius: 8px; 
  border-left: 4px solid #000; 
}

.conditions-sections .section-header { 
  display: flex; justify-content: space-between; align-items: center; 
  margin-bottom: 12px; 
}

.conditions-sections .section-title { 
  margin: 0; color: #000; font-size: 1.1rem; font-weight: bold; 
}

.conditions-sections .section-images { 
  display: flex; gap: 10px; align-items: center;
}

.conditions-sections .section-images img { 
  border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.conditions-sections ul { 
  margin: 0; padding-left: 20px; 
}

.conditions-sections li { 
  margin: 6px 0; color: #333; font-size: 0.9rem; line-height: 1.4; 
}

/* Footer mentions légales */

.terminal-conditions-content .conditions-footer { 
  margin-top: 24px !important; padding-top: 16px !important; border-top: 1px solid #ddd !important; 
  font-size: 0.8rem !important; color: #666 !important; 
}

.terminal-conditions-content .conditions-footer p { 
  margin: 8px 0 !important; 
}

.terminal-conditions-content .conditions-footer strong { 
  color: #333 !important; 
}

.terminal-conditions-content .conditions-footer a { 
  color: #000 !important; text-decoration: none !important; 
}

.terminal-conditions-content .conditions-footer a:hover { 
  text-decoration: underline !important; 
}

/* Case à cocher pour les conditions intégrées */
.conditions-consent { 
  margin: 16px 0; padding: 12px; background: #e7f3ff; border-radius: 6px; 
}

.consent-checkbox-label { 
  display: flex; align-items: center; gap: 8px; font-weight: 500; 
}
.consent-download-wrap { display: flex; justify-content: flex-start; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid #ddd; background: #f8f8f8; cursor: pointer; text-decoration: none;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { background: #f1f1f1; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #0f62fe; color: #fff; border-color: #0f62fe; }
.btn-primary:hover { filter: brightness(0.96); }
.btn-secondary { background: #eee; }
.btn-ghost { background: #fff; border-color: #e6e6e6; }
.btn-ghost:hover { background: #fafafa; }

/* Icône dans le bouton */
.btn-icon { gap: 10px; }
.icon { width: 20px; height: 20px; display: inline-block; fill: currentColor; }

/* Checkbox & erreurs */
.consent-check { display: flex; gap: 10px; align-items: flex-start; }
.consent-check input { margin-top: 2px; }
.consent-error { color: #b00020; margin: 0; }

/* Footer */
.consent-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 16px 24px; border-top: 1px solid #eee; background: #fff;
}

/* Scroll lock */
html.modal-open { overflow: hidden; }
