/* ════════════════════════════════════════════════════════════
   STYLES REÇU DE PAIEMENT — Camp Vacances Coran
   Design premium responsive + règlement intérieur
   ════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --rec-blue:    #0d3b66;
  --rec-green:   #19C31A;
  --rec-green-d: #0f8c10;
  --rec-gold:    #d4a017;
  --rec-gold-l:  #f0c040;
}

/* ── Conteneur double A4 ── */
.receipt-wrapper {
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 620px;
  margin: 0 auto;
}

/* ── Carte reçu unique ── */
.receipt-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,.15);
  margin-bottom: 0;
  border: 1px solid #e8f0e8;
  position: relative;
}
.receipt-card.receipt-archive {
  border: 2px dashed #bbb;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* ── En-tête ── */
.rec-header {
  background: linear-gradient(135deg, #0d3b66 0%, #1a5276 45%, #0f5c10 80%, #19C31A 100%);
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.rec-header::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.rec-logo {
  width: 64px; height: 64px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  flex-shrink: 0;
}
.rec-org { flex: 1; min-width: 0; }
.rec-org-name {
  font-size: 15px; font-weight: 800;
  color: #fff; line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.rec-org-sub {
  font-size: 10.5px; color: rgba(255,255,255,.85);
  margin-top: 2px; line-height: 1.3;
}
.rec-arabic {
  font-family: serif; direction: rtl;
  font-size: 13px; color: var(--rec-gold-l);
  margin-top: 5px;
}
.rec-copy-badge {
  padding: 6px 13px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  text-align: center; letter-spacing: .3px;
}
.badge-parent  { background: var(--rec-gold-l); color: #333; }
.badge-archive { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* ── Barre de références ── */
.rec-ref-bar {
  display: flex; gap: 0;
  background: #f0f8f0;
  border-bottom: 2px solid #d5ebd5;
}
.rec-ref-item {
  flex: 1; padding: 9px 14px;
  border-right: 1px solid #d5ebd5;
}
.rec-ref-item:last-child { border-right: none; }
.ref-label {
  display: block; font-size: 9px; color: #7f8c8d;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px;
}
.ref-value {
  font-size: 12px; font-weight: 700; color: var(--rec-blue);
}

/* ── Corps du reçu ── */
.rec-body { padding: 14px 20px; }

/* ── Bénéficiaire ── */
.rec-beneficiaire {
  background: linear-gradient(to right, #f0f8ff, #f4faf4);
  border-radius: 10px; padding: 12px 16px;
  border-left: 4px solid var(--rec-green);
  margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
}
.rec-ben-info { flex: 1; min-width: 180px; }
.rec-child-name {
  font-size: 17px; font-weight: 800;
  color: var(--rec-blue); line-height: 1.1;
}
.rec-child-num {
  font-size: 11px; color: #7f8c8d; margin-top: 3px;
}
.rec-parents { font-size: 12px; color: #5d6d7e; margin-top: 6px; line-height: 1.7; }
.rec-parents strong { color: var(--rec-blue); }
.rec-qr-area { text-align: center; flex-shrink: 0; }
.rec-qr-area .qr-label { font-size: 9px; color: #95a5a6; margin-top: 3px; }

/* ── Montant principal ── */
.rec-amount-block {
  background: linear-gradient(135deg, #0d3b66, #1a5276);
  border-radius: 12px; padding: 16px;
  text-align: center; margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.rec-amount-block::after {
  content: ''; position: absolute;
  bottom: -15px; right: -15px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.rec-amount-label {
  font-size: 10px; color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 4px;
}
.rec-amount-value {
  font-size: 32px; font-weight: 900;
  color: var(--rec-gold-l); letter-spacing: 1px;
}
.rec-amount-mode {
  font-size: 11.5px; color: rgba(255,255,255,.75);
  margin-top: 5px;
}

/* ── Récapitulatif ── */
.rec-summary { margin-bottom: 12px; }
.rec-sum-row {
  display: flex; justify-content: space-between;
  padding: 7px 12px; border-radius: 7px;
  font-size: 13px; margin-bottom: 4px;
  align-items: center;
}
.rec-sum-row.sum-base  { background: #f8f9fa; color: #5d6d7e; }
.rec-sum-row.sum-paid  { background: #eafaf1; color: #1e8449; font-weight: 600; }
.rec-sum-row.sum-due   { background: #fdedec; color: #c0392b; font-weight: 700; }
.rec-sum-row.sum-clear { background: #d5f5e3; color: #1e8449; font-weight: 700; }
.rec-sum-row .sum-icon { font-size: 14px; margin-right: 6px; }

/* ── Note règlement ── */
.rec-reglement-note {
  background: #fffdf0;
  border: 1px solid #f9e79f;
  border-left: 4px solid var(--rec-gold);
  border-radius: 8px; padding: 10px 14px;
  font-size: 11.5px; color: #7d5a00;
  margin-bottom: 12px;
  line-height: 1.6;
}
.rec-reglement-note strong { color: #5a3e00; }
.rec-reglement-rules {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5px; margin-top: 8px;
}
.rec-rule-item {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11px; line-height: 1.4;
}
.rec-rule-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

/* ── Pied du reçu ── */
.rec-footer {
  background: #f8f9fa; padding: 10px 20px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}
.rec-verse {
  font-style: italic; font-size: 11.5px;
  color: #5d6d7e; margin-bottom: 3px;
}
.rec-notice {
  font-size: 10.5px; color: #95a5a6;
}

/* ── Ligne de découpe ── */
.cut-line {
  display: flex; align-items: center; gap: 8px;
  color: #aaa; font-size: 11px;
  padding: 8px 0; margin: 6px 0;
  user-select: none;
}
.cut-line::before, .cut-line::after {
  content: ''; flex: 1;
  border-top: 1.5px dashed #ccc;
}

/* ── VERSO : Règlement intérieur ── */
.rec-reglement-full {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  margin-top: 20px;
  border: 1px solid #d5ebd5;
  page-break-before: always;
}
.rec-reg-header {
  background: linear-gradient(135deg, #0d3b66 0%, #19C31A 100%);
  padding: 14px 20px;
  text-align: center; color: #fff;
}
.rec-reg-header h2 {
  font-size: 14px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 3px;
}
.rec-reg-header p { font-size: 10.5px; opacity: .85; }
.rec-reg-body { padding: 14px 20px; }

.reg-section {
  margin-bottom: 12px;
}
.reg-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  color: var(--rec-blue);
  background: #f0f8f0;
  padding: 6px 10px; border-radius: 6px;
  margin-bottom: 7px;
  border-left: 3px solid var(--rec-green);
}
.reg-section-title i { color: var(--rec-green); font-size: 13px; }
.reg-rules-list { list-style: none; padding: 0; margin: 0 0 0 8px; }
.reg-rules-list li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 11.5px; color: #3d3d3d;
  padding: 4px 0; line-height: 1.5;
}
.reg-rules-list li::before {
  content: '▸'; color: var(--rec-green);
  font-size: 12px; flex-shrink: 0; margin-top: 1px;
}
.reg-warning {
  background: #fff9e6; border-left: 4px solid var(--rec-gold);
  border-radius: 0 8px 8px 0; padding: 10px 14px;
  font-size: 11px; color: #7d5a00; margin-top: 10px;
  line-height: 1.6;
}

/* ── VERSO : Autorisation parentale ── */
.rec-autorisation {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #d5ebd5;
  margin-top: 16px;
  overflow: hidden;
}
.rec-aut-header {
  background: #f0f8f0; padding: 12px 20px;
  border-bottom: 2px solid #d5ebd5;
  display: flex; align-items: center; gap: 10px;
}
.rec-aut-header h3 {
  font-size: 13px; font-weight: 700;
  color: var(--rec-blue);
}
.rec-aut-header p { font-size: 10.5px; color: #7f8c8d; margin-top: 2px; }
.rec-aut-body { padding: 14px 20px; }
.aut-text {
  font-size: 12.5px; line-height: 1.7; color: #3d3d3d;
  margin-bottom: 12px;
}
.aut-checkbox-list { list-style: none; padding: 0; margin: 0 0 14px; }
.aut-checkbox-list li {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 5px 0; font-size: 12px; line-height: 1.5;
  border-bottom: 1px solid #f0f4f0;
}
.aut-checkbox-list li:last-child { border-bottom: none; }
.aut-check-icon {
  width: 18px; height: 18px;
  background: var(--rec-green);
  border-radius: 4px; display: flex;
  align-items: center; justify-content: center;
  color: white; font-size: 10px;
  flex-shrink: 0; margin-top: 2px;
}
.aut-sign-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-top: 16px;
}
.aut-sign-box { }
.aut-sign-label {
  font-size: 10px; color: #95a5a6;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 5px;
}
.aut-sign-line {
  border-bottom: 1.5px solid #bbb;
  height: 32px;
}
.aut-notice {
  background: #f4faf4; border-radius: 8px;
  padding: 10px 14px; margin-top: 14px;
  font-size: 11px; color: #5d6d7e;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .rec-ref-bar    { flex-direction: column; }
  .rec-ref-item   { border-right: none; border-bottom: 1px solid #d5ebd5; }
  .rec-beneficiaire { flex-direction: column; }
  .rec-amount-value { font-size: 24px; }
  .rec-reglement-rules { grid-template-columns: 1fr; }
  .aut-sign-grid  { grid-template-columns: 1fr; }
  .rec-logo       { width: 52px; height: 52px; }
}

/* ── Impression ── */
@media print {
  .rec-copy-badge.badge-archive { border-color: #888; color: #555; }
  .receipt-wrapper { max-width: 100%; }
  .no-print { display: none !important; }
}
