/* ═════════════════════════════════════════════════════════════════
   JPP-CUSTOM.CSS — Corrections globales pour tout le kit Japan Post
   
   À inclure dans <head> de chaque page APRÈS les CSS Japan Post :
   <link href="assets/css/common.css" rel="stylesheet"/>
   <link href="assets/css/module.css" rel="stylesheet"/>
   <link href="assets/css/style.css" rel="stylesheet"/>
   <link href="assets/css/jpp-custom.css" rel="stylesheet"/>
   ═════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   1. BLOQUE LA POLICE D'ICÔNES JAPAN POST
   
   Sans cette règle, tous les pseudo-éléments qui utilisent
   font-family: "icon-jp-post2025" affichent un carré ☒.
   On la remplace par Arial qui n'a pas ces glyphes → rien.
   ───────────────────────────────────────────────────────────── */
@font-face {
  font-family: "icon-jp-post2025";
  src: local("Arial");
  unicode-range: U+0-10FFFF;
}

/* Sécurité : cache explicitement les icônes connues */
.btn.ic-next::before,
.btn.ic-prev::before,
.btn.ic-popup::before,
.btn.ic-search::before,
.btn.ic-up::before,
.btn.ic-down::before,
.btn.ic-pdf::after,
.btn.ic-doc::after,
.btn.ic-xls::after,
a.ic-next::after,
a.ic-prev::before,
a.ic-popup::after,
main a.ic-next::after,
main a.ic-popup::after,
main ul .arrow::after,
main ul .popup::after,
h1.simple a:after,
h2.simple a:after,
h3.simple a:after,
h4.simple a:after,
h5.simple a:after,
h6.simple a:after,
footer.common .inner .groupLink .link a::before,
footer.common .inner nav.sub ul li a::after,
footer.common .inner nav.sub ul li a[target=_blank]::after,
footer.common .inner nav.main ul li a::after,
footer.common .pagetop a::before {
  content: none !important;
  display: none !important;
}

/* Cache le logo texte du footer (image manquante) */
footer.common .inner nav.sub > div > img {
  display: none !important;
}
footer.common .inner nav.sub > div::before {
  content: "日本郵便株式会社";
  font-weight: 700;
  color: #0B2A3A;
  font-size: 1.05em;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}

/* Cache le vrai header Japan Post (déjà remplacé par .jpp-header) */
header.common {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   2. HEADER CUSTOM JAPAN POST
   Bandeau rouge + logo 〒 + slogan
   ───────────────────────────────────────────────────────────── */
.jpp-header {
  background: #fff;
  border-top: 16px solid #CC0000;
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
  min-height: 76px;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}
.jpp-header .logo-wrap {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 40px 0 32px;
  background: #CC0000;
  color: #fff;
  text-decoration: none;
  position: relative;
}
.jpp-header .logo-wrap::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 0;
  width: 20px;
  height: 60px;
  background: #CC0000;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.jpp-header .logo-wrap .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  color: #CC0000;
  font-weight: 900;
  font-size: 22px;
  border-radius: 4px;
  line-height: 1;
  margin-right: 12px;
}
.jpp-header .logo-wrap .txt-jp {
  font-size: 1.35em;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
}
.jpp-header .logo-wrap .txt-en {
  font-size: .55em;
  font-weight: 600;
  letter-spacing: .3em;
  opacity: .9;
  margin-top: 4px;
  display: block;
}
.jpp-header .slogan {
  font-size: .92em;
  color: #0B2A3A;
  font-weight: 600;
  letter-spacing: .08em;
  margin-left: 60px;
}

/* ─────────────────────────────────────────────────────────────
   3. FOOTER — Logos SVG (remplace les images manquantes)
   ───────────────────────────────────────────────────────────── */
footer.common .groupLink .link a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: #fff;
  border: 1px solid #E9E9E9;
  border-radius: 12px;
  text-decoration: none;
  color: #0B2A3A;
  font-weight: 700;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}
footer.common .groupLink .link a:hover {
  background: #F7F7F7;
}
footer.common .groupLink .link svg {
  max-width: 100%;
  height: auto;
}

/* ─────────────────────────────────────────────────────────────
   4. INDICATEUR D'ÉTAPES (customs, billing, card, otp, success)
   ───────────────────────────────────────────────────────────── */
.jpp-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.jpp-steps .step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85em;
  color: #8b949e;
}
.jpp-steps .step .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #EAF3F6;
  color: #546A75;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.jpp-steps .step.active .num {
  background: #CC0000;
  color: #fff;
}
.jpp-steps .step.active {
  color: #0B2A3A;
  font-weight: 700;
}
.jpp-steps .step.done .num {
  background: #19A939;
  color: #fff;
}
.jpp-steps .step.done {
  color: #19A939;
}
.jpp-steps .sep {
  width: 24px;
  height: 2px;
  background: #E9E9E9;
}

/* ─────────────────────────────────────────────────────────────
   5. ICÔNES SVG INLINE POUR LES TITRES
   ───────────────────────────────────────────────────────────── */
.jpp-icon-tracking,
.jpp-icon-customs,
.jpp-icon-billing,
.jpp-icon-card,
.jpp-icon-otp,
.jpp-icon-success {
  display: inline-block;
  vertical-align: middle;
  width: 40px;
  height: 40px;
  margin-right: .3em;
}

/* ─────────────────────────────────────────────────────────────
   6. FORMULAIRE (billing, card)
   ───────────────────────────────────────────────────────────── */
.jpp-form-section {
  background: #fff;
  border: 1px solid #E9E9E9;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
}
.jpp-form-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02em;
  font-weight: 700;
  color: #0B2A3A;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E9E9E9;
}
.jpp-form-section .section-title svg {
  width: 22px;
  height: 22px;
  stroke: #CC0000;
  flex-shrink: 0;
}
.jpp-form-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
.jpp-form-row > * {
  flex: 1;
}
.jpp-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.jpp-field:last-child {
  margin-bottom: 0;
}
.jpp-field label {
  font-size: .82em;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.jpp-field label .req {
  color: #CC0000;
  margin-left: 3px;
}
.jpp-field input {
  width: 100%;
  padding: 13px 15px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  color: #0B2A3A;
  box-sizing: border-box;
}
.jpp-field input:focus {
  border-color: #CC0000;
  box-shadow: 0 0 0 3px rgba(204,0,0,.1);
}
.jpp-field input::placeholder {
  color: #bbb;
}

/* ─────────────────────────────────────────────────────────────
   7. RÉSUMÉ COMMANDE (billing, card)
   ───────────────────────────────────────────────────────────── */
.jpp-summary {
  background: #F7F7F7;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: .92em;
}
.jpp-summary .line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}
.jpp-summary .line + .line {
  border-top: 1px dashed #E0E0E0;
  margin-top: 4px;
  padding-top: 10px;
}
.jpp-summary .label {
  color: #546A75;
  font-weight: 600;
}
.jpp-summary .value {
  color: #0B2A3A;
  font-weight: 700;
}
.jpp-summary .value.total {
  color: #CC0000;
  font-size: 1.2em;
}
.jpp-summary .value.mono {
  font-family: "Courier New", monospace;
  letter-spacing: .05em;
}

/* ─────────────────────────────────────────────────────────────
   8. BANDEAU INFO JAUNE (customs)
   ───────────────────────────────────────────────────────────── */
.jpp-info-banner {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0;
  font-size: .95em;
  color: #78350f;
}
.jpp-info-banner .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #f0d494;
}
.jpp-info-banner .row:last-child {
  border-bottom: none;
}
.jpp-info-banner .label {
  font-weight: 600;
  color: #92400e;
}
.jpp-info-banner .value {
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 1.05em;
  color: #0B2A3A;
  letter-spacing: .05em;
}
.jpp-info-banner .value.fees {
  font-size: 1.35em;
  color: #CC0000;
  font-family: inherit;
}

/* ─────────────────────────────────────────────────────────────
   9. SPINNER (waiting, otp)
   ───────────────────────────────────────────────────────────── */
.jpp-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid #f0f0f0;
  border-top-color: #CC0000;
  border-radius: 50%;
  margin: 24px auto;
  animation: jpp-spin 1s linear infinite;
}
@keyframes jpp-spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   10. OTP — Champs à 6 chiffres
   ───────────────────────────────────────────────────────────── */
.jpp-otp-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}
.jpp-otp-wrap input {
  width: 46px;
  height: 56px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  outline: none;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  padding: 0;
}
.jpp-otp-wrap input:focus {
  border-color: #CC0000;
  box-shadow: 0 0 0 3px rgba(204,0,0,.1);
}

/* ─────────────────────────────────────────────────────────────
   11. CHECK VERT ANIMÉ (success)
   ───────────────────────────────────────────────────────────── */
.jpp-check {
  width: 72px;
  height: 72px;
  background: #27ae60;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: jpp-pop .4s ease-out;
}
.jpp-check svg {
  width: 38px;
  height: 38px;
}
@keyframes jpp-pop {
  0%   { transform: scale(0); }
  80%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ─────────────────────────────────────────────────────────────
   12. BOX RÉFÉRENCE (success)
   ───────────────────────────────────────────────────────────── */
.jpp-ref-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: .83em;
  color: #555;
  margin: 18px 0;
  text-align: left;
}
.jpp-ref-box div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.jpp-ref-box strong {
  font-family: "Courier New", monospace;
  color: #0B2A3A;
}

/* ─────────────────────────────────────────────────────────────
   13. ERROR MESSAGE STANDARD
   ───────────────────────────────────────────────────────────── */
.errorMessage {
  color: #c0392b;
  font-size: .85em;
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────
   14. RESPONSIVE — MOBILE (max 800px)
   ───────────────────────────────────────────────────────────── */
@media screen and (max-width: 800px) {

  /* Header compact */
  .jpp-header {
    min-height: 60px;
    border-top: none;
    background: #CC0000;
    padding: 0;
  }
  .jpp-header .logo-wrap {
    background: transparent;
    padding: 0 16px;
    height: 60px;
  }
  .jpp-header .logo-wrap::after {
    display: none;
  }
  .jpp-header .slogan {
    display: none;
  }

  /* Anti-conflit avec le padding natif Japan Post */
  body > .wrapper {
    padding-top: 0 !important;
  }

  /* Formulaires */
  .jpp-form-row {
    flex-direction: column;
    gap: 0;
  }
  .jpp-form-section {
    padding: 18px 16px;
  }

  /* OTP plus compact */
  .jpp-otp-wrap input {
    width: 40px;
    height: 50px;
    font-size: 1.2em;
  }

  /* Steps plus compacts */
  .jpp-steps .step {
    font-size: .78em;
  }
  .jpp-steps .step .num {
    width: 24px;
    height: 24px;
    font-size: .9em;
  }
  .jpp-steps .sep {
    width: 12px;
  }
}