/* PFPI Consent Plugin – Frontend CSS */
.pfpi-wrapper { font-family: Georgia, serif; color: #1a1a1a; }
.pfpi-form-container {
  background: #fff;
  border: 1px solid #c8d0dc;
  padding: 44px 56px 48px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.10);
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .pfpi-form-container { padding: 24px 16px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.pfpi-wrapper { font-family: 'Georgia', serif; background: #e8edf2; color: #1a1a1a; min-height: 100vh; padding: 28px 16px; }
.page { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid #c8d0dc; padding: 44px 56px 48px; box-shadow: 0 6px 32px rgba(0,0,0,0.10); }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 3px solid #0d2f5e; }
.header img { height: 54px; object-fit: contain; }
.header-center { text-align: center; flex: 1; padding: 0 20px; }
.program-label { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.doc-title { font-size: 19px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; color: #0d2f5e; }
.doc-subtitle { font-size: 12px; color: #555; margin-top: 3px; }

/* Dividers */
.divider { border: none; border-top: 1.5px solid #0d2f5e; margin: 20px 0; }
.divider-light { border: none; border-top: 1px solid #dde3ec; margin: 16px 0; }

/* Section titles */
.section-title { font-size: 13px; font-weight: bold; color: #0d2f5e; text-transform: uppercase; letter-spacing: 0.05em; margin: 22px 0 10px; }

/* Text */
.intro { font-size: 13px; line-height: 1.75; color: #333; margin-bottom: 14px; text-align: justify; }
.intro strong { color: #0d2f5e; }
.warn { font-size: 13px; font-style: italic; font-weight: bold; color: #0d2f5e; margin-bottom: 16px; }

/* Meta */
.meta-row { display: flex; gap: 8px; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.meta-label { font-weight: bold; color: #0d2f5e; min-width: 180px; flex-shrink: 0; }
.meta-value { color: #333; }

/* Lists */
.content-list { margin: 8px 0 12px 22px; font-size: 13px; line-height: 1.75; color: #333; }
.content-list li { margin-bottom: 4px; }

/* Info blocks */
.info-block { background: #f4f7fb; border-left: 4px solid #0d2f5e; padding: 12px 16px; margin: 12px 0; font-size: 13px; line-height: 1.7; color: #333; }

/* Sub-sections (formulaires intégrés) */
.subsection { background: #f8fafd; border: 1px solid #d0d8ea; border-radius: 4px; padding: 18px 22px; margin: 14px 0; }
.subsection-title { font-size: 12.5px; font-weight: bold; color: #fff; background: #0d2f5e; margin: -18px -22px 16px -22px; padding: 9px 16px; border-radius: 4px 4px 0 0; }

/* Form fields */
.field-row { display: flex; align-items: center; margin-bottom: 13px; gap: 10px; }
.field-label { font-size: 13px; min-width: 195px; color: #333; flex-shrink: 0; font-weight: bold; }
.field-input { flex: 1; border: none; border-bottom: 1.5px solid #aab; background: transparent; padding: 4px 6px; font-size: 13px; font-family: inherit; color: #1a1a1a; outline: none; transition: border-color 0.2s; }
.field-input:focus { border-bottom-color: #0d2f5e; }
.field-row-inline { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 13px; }
.field-inline { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px; }
.field-inline .field-label { min-width: auto; }

/* Radio / Checkbox */
.radio-group { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 0; }
.radio-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; cursor: pointer; }
.radio-item input[type=radio] { width: 15px; height: 15px; cursor: pointer; accent-color: #0d2f5e; }
.check-group { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 13px; }
.check-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; cursor: pointer; }
.check-item input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; accent-color: #0d2f5e; }

/* Textarea */
.field-textarea { width: 100%; border: 1px solid #c0c8d8; border-radius: 3px; padding: 8px 10px; font-size: 13px; font-family: inherit; color: #1a1a1a; outline: none; resize: vertical; min-height: 60px; transition: border-color 0.2s; margin-top: 4px; }
.field-textarea:focus { border-color: #0d2f5e; }

/* Signature */
.sig-section { margin-top: 6px; }
.sig-label { font-size: 13px; font-weight: bold; color: #333; margin-bottom: 6px; }
canvas.sig-pad { border: 1px solid #aab; border-radius: 3px; background: #fff; cursor: crosshair; display: block; width: 100%; height: 90px; touch-action: none; }
.sig-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.btn-clear { font-size: 11px; color: #888; background: none; border: 1px solid #ccc; border-radius: 3px; padding: 2px 10px; cursor: pointer; font-family: inherit; }
.btn-clear:hover { color: #c0392b; border-color: #c0392b; }

/* Jurat italic intro */
.jurat-intro { font-size: 12.5px; font-style: italic; color: #555; margin-bottom: 14px; line-height: 1.65; }

/* Actions */
.actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-main { background: #0d2f5e; color: #fff; border: none; padding: 12px 34px; font-size: 14px; font-family: inherit; border-radius: 3px; cursor: pointer; transition: background 0.2s; }
.btn-main:hover { background: #16438a; }
.btn-secondary { background: #fff; color: #0d2f5e; border: 1.5px solid #0d2f5e; padding: 12px 34px; font-size: 14px; font-family: inherit; border-radius: 3px; cursor: pointer; transition: all 0.2s; }
.btn-secondary:hover { background: #f0f4fa; }

.notice { margin-top: 20px; font-size: 11.5px; color: #888; text-align: center; line-height: 1.7; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #1a5e2a; color: #fff; padding: 12px 28px; border-radius: 4px; font-size: 14px; font-family: inherit; display: none; z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,0.2); white-space: nowrap; }
.toast.error { background: #a32020; }

@media (max-width: 640px) {
  .page { padding: 24px 16px; }
  .header { flex-direction: column; gap: 12px; text-align: center; }
  .field-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .field-label { min-width: unset; }
  .field-input { width: 100%; }
}

/* Buttons in WP context */
.pfpi-form-container .btn-main,
.pfpi-form-container .pfpi-btn-main {
  background: #0d2f5e; color: #fff; border: none;
  padding: 12px 34px; font-size: 14px; font-family: inherit;
  border-radius: 3px; cursor: pointer;
}
.pfpi-form-container .btn-secondary,
.pfpi-form-container .pfpi-btn-secondary {
  background: #fff; color: #0d2f5e; border: 1.5px solid #0d2f5e;
  padding: 12px 34px; font-size: 14px; font-family: inherit;
  border-radius: 3px; cursor: pointer;
}
/* Dashboard shortcode styles */
.pfpi-dashboard-wrapper { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.pfpi-db-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.5rem; flex-wrap:wrap; gap:12px; }
.pfpi-db-header h2 { font-size:20px; margin:0; color:#0d2f5e; }
.pfpi-db-stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin-bottom:1.5rem; }
.pfpi-db-stat-card { background:#f0f4fb; border-radius:8px; padding:14px 16px; text-align:center; }
.pfpi-db-stat-val { display:block; font-size:28px; font-weight:700; color:#0d2f5e; }
.pfpi-db-stat-lbl { display:block; font-size:12px; color:#666; margin-top:4px; }
.pfpi-db-toolbar { display:flex; gap:8px; margin-bottom:1rem; }
.pfpi-db-search-input { flex:1; padding:8px 12px; border:1px solid #c8d0dc; border-radius:4px; font-size:13px; }
.pfpi-db-table-wrap { overflow-x:auto; }
.pfpi-db-table { width:100%; border-collapse:collapse; font-size:13px; }
.pfpi-db-table th { background:#0d2f5e; color:#fff; padding:10px 12px; text-align:left; font-size:12px; }
.pfpi-db-table td { padding:10px 12px; border-bottom:1px solid #eee; vertical-align:top; }
.pfpi-db-table tr:hover td { background:#f7f9fc; }
.pfpi-db-badge { display:inline-flex; align-items:center; gap:3px; font-size:11px; padding:2px 7px; border-radius:10px; margin:2px; }
.pfpi-db-badge-ok { background:#e8f5e9; color:#1a7a4a; }
.pfpi-db-badge-no { background:#f5f5f5; color:#999; }
.pfpi-db-pagination { margin-top:10px; display:flex; gap:4px; flex-wrap:wrap; }
.pfpi-btn-page { padding:5px 10px; border:1px solid #c8d0dc; background:#fff; border-radius:3px; cursor:pointer; font-size:12px; }
.pfpi-btn-page.active { background:#0d2f5e; color:#fff; border-color:#0d2f5e; }
.pfpi-btn-sm { padding:4px 10px; border:1px solid #c8d0dc; background:#fff; border-radius:3px; cursor:pointer; font-size:12px; }
.pfpi-btn-danger { border-color:#e74c3c!important; color:#e74c3c; }
.pfpi-btn-main { background:#0d2f5e; color:#fff; border:none; padding:8px 18px; border-radius:4px; cursor:pointer; font-size:13px; }
.pfpi-btn-secondary { background:#fff; color:#0d2f5e; border:1px solid #0d2f5e; padding:7px 16px; border-radius:4px; cursor:pointer; font-size:13px; text-decoration:none; }
.pfpi-db-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:99999; align-items:center; justify-content:center; }
.pfpi-db-modal-box { background:#fff; border-radius:8px; max-width:700px; width:95%; max-height:90vh; overflow-y:auto; box-shadow:0 8px 40px rgba(0,0,0,0.2); }
.pfpi-db-modal-head { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #eee; background:#0d2f5e; border-radius:8px 8px 0 0; }
.pfpi-db-modal-head strong { color:#fff; font-size:15px; }
.pfpi-db-modal-close { background:none; border:none; font-size:22px; cursor:pointer; color:#fff; line-height:1; }
.pfpi-db-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; padding:1rem; }
.pfpi-db-detail-section { background:#f8fafd; border-radius:4px; padding:12px 14px; }
.pfpi-db-detail-section h4 { font-size:11px; text-transform:uppercase; color:#0d2f5e; letter-spacing:0.05em; margin:0 0 8px; }
.pfpi-db-detail-section p { font-size:12.5px; margin:0 0 5px; color:#333; }
.pfpi-db-detail-footer { display:flex; justify-content:space-between; padding:10px 1rem; background:#f4f7fb; font-size:12px; color:#666; border-top:1px solid #eee; flex-wrap:wrap; gap:8px; }
