/* =========================================================================
   e-Attestation — site public de vérification des attestations
   Charte ASAR RDC (bleu nuit, bleu, rouge et jaune du drapeau). Ancienne version : style.css.orig
   ========================================================================= */
:root {
  --nuit: #0F2D57;
  --bleu: #1F63C4;
  --bleu-fonce: #174E9C;
  --bleu-pale: #EEF4FC;
  --rouge: #D3263A;
  --jaune: #F2C230;
  --vert: #1E9E57;
  --ambre: #D98E04;
  --encre: #0B1B3F;
  --texte: #5B6B85;
  --bord: #DDE4EE;
  --fond: #F4F7FC;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--encre);
  background: radial-gradient(ellipse at 50% 30%, #FCFDFF 0%, var(--fond) 100%);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- décor */
.drapeau { display: flex; height: 5px; position: relative; z-index: 2; }
.drapeau span { flex: 1; background: var(--bleu); }
.drapeau span:nth-child(2) { background: var(--rouge); }
.drapeau span:nth-child(3) { background: var(--jaune); }
.motif { position: absolute; z-index: 0; pointer-events: none; user-select: none; }
.motif-gauche { left: 0; bottom: 0; width: 30vw; min-width: 240px; }
.motif-droit { right: 0; top: 14vh; width: 32vw; min-width: 260px; }

/* ---------------------------------------------------------------- en-tête */
.entete {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 24px 0;
}
.marque { display: flex; align-items: center; gap: 18px; text-decoration: none; }
.logo { height: 76px; width: auto; }
.separateur { width: 1.5px; height: 36px; background: #D3DBE7; }
.produit { font-size: 21px; color: #4A5A75; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--bord);
  font-size: 13px; font-weight: 600; color: var(--nuit);
}
.pastille .point { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 4px rgba(30, 158, 87, .15); }

/* ---------------------------------------------------------------- page */
.page { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 48px 20px 40px; }
.ecran { display: none; }
.ecran.actif { display: block; animation: apparition .45s cubic-bezier(.2, .7, .2, 1) both; }

.surtitre { margin: 0 0 14px; font-size: 14px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: #3A78C2; text-align: center; }
.titre { margin: 0 auto 16px; max-width: 700px; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -1.6px; text-align: center; }
.sous-titre { margin: 0 auto; max-width: 560px; font-size: 18px; line-height: 1.5; color: var(--texte); text-align: center; }

/* ---------------------------------------------------------------- formulaire */
.formulaire {
  margin: 40px auto 0; padding: 26px 26px 20px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--bord); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 45, 87, .08);
}
.aide { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: #1E2A44; }
.champ-groupe {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 16px;
  background: #fff; border: 1.5px solid #CFD8E6; border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.champ-groupe:focus-within { border-color: #3A78C2; box-shadow: 0 0 0 4px rgba(58, 120, 194, .15); }
.champ-groupe.en-erreur { border-color: var(--rouge); }
.loupe { width: 22px; height: 22px; flex: none; fill: none; stroke: #637799; stroke-width: 2; stroke-linecap: round; }
#saisie {
  flex: 1; min-width: 0; height: 50px;
  border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 19px; font-weight: 600; line-height: 1;
  letter-spacing: 1px; text-transform: uppercase; color: var(--encre);
}
#saisie::placeholder { color: #98A4B6; font-weight: 400; font-size: 16px; letter-spacing: 0; text-transform: none; }
.erreur-saisie { min-height: 18px; margin: 10px 2px 0; color: var(--rouge); font-size: 14px; }
.exemples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--texte); font-size: 14px; }
.exemples span {
  padding: 4px 10px; border-radius: 999px;
  background: var(--bleu-pale); color: var(--bleu-fonce);
  font-weight: 600; cursor: pointer; transition: background .15s;
}
.exemples span:hover { background: #DCE8FA; }

.bouton {
  position: relative; flex: none;
  height: 50px; padding: 0 28px;
  border: 0; border-radius: 9px;
  background: linear-gradient(180deg, #3066AD 0%, var(--bleu-fonce) 100%);
  color: #fff; font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 16px rgba(23, 78, 156, .25);
  transition: filter .15s, transform .1s;
}
.bouton:hover { filter: brightness(1.07); }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { cursor: wait; opacity: .85; }
.bouton .chargeur {
  display: none; width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: rotation .7s linear infinite;
}
.bouton.en-cours .chargeur { display: inline-block; }
.bouton-secondaire { width: 100%; margin-top: 22px; background: #fff; color: var(--bleu); border: 1.5px solid #CFD8E6; box-shadow: none; }

/* ---------------------------------------------------------------- atouts */
.atouts { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.atouts li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .7); border: 1px solid var(--bord); }
.atouts svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--bleu); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atouts strong { display: block; font-size: 14px; margin-bottom: 2px; }
.atouts span { font-size: 13px; color: var(--texte); line-height: 1.4; }

/* ---------------------------------------------------------------- résultat */
.carte {
  --statut: var(--vert);
  --statut-pale: #E8F6EE;
  overflow: hidden;
  background: #fff; border: 1px solid var(--bord); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 45, 87, .10);
}
.carte.invalide { --statut: var(--rouge); --statut-pale: #FDEEF0; }
.carte.expiree { --statut: var(--ambre); --statut-pale: #FFF6E3; }
.carte.a-venir { --statut: var(--bleu); --statut-pale: var(--bleu-pale); }

.carte-statut { display: flex; align-items: center; gap: 18px; padding: 22px 26px; background: var(--statut-pale); border-bottom: 3px solid var(--statut); }
.res-icone { width: 64px; height: 64px; flex: none; }
.res-icone svg { width: 100%; height: 100%; animation: pop .45s cubic-bezier(.2, .9, .3, 1.4) both; }
.res-icone circle { fill: var(--statut); }
.res-icone path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60; animation: trace .45s ease-out .3s forwards; }
.res-titre { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.4px; color: var(--encre); }
.res-intro { margin: 0; font-size: 14px; line-height: 1.45; color: var(--texte); }

.carte-corps { padding: 24px 26px 22px; }
.plaque {
  display: flex; align-items: stretch; max-width: 420px; margin: 0 auto 18px;
  border: 3px solid var(--nuit); border-radius: 10px; overflow: hidden; background: #fff;
}
.plaque-pays {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 56px; flex: none; background: var(--bleu); color: #fff; font-size: 13px; font-weight: 700;
}
.plaque-pays i { width: 26px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #8DB9F2 0 33%, var(--rouge) 33% 66%, var(--jaune) 66%); }
.res-recherche { flex: 1; padding: 14px 16px; text-align: center; font-size: clamp(24px, 5vw, 36px); font-weight: 800; letter-spacing: 1px; word-break: break-all; color: var(--encre); }
.res-phrase { margin: 0 0 18px; text-align: center; font-size: 16px; font-weight: 600; line-height: 1.5; }
.res-phrase em { font-style: normal; color: var(--statut); }

.details { width: 100%; border-collapse: collapse; font-size: 14px; }
.details th, .details td { padding: 11px 4px; border-bottom: 1px dashed var(--bord); text-align: left; }
.details th { width: 45%; font-weight: 500; color: var(--texte); }
.details td { font-weight: 700; color: var(--encre); text-align: right; }
.details:empty, .details tbody:empty { display: none; }

.signature { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--bord); }
.signature img { width: 66px; height: auto; }
.signature strong { display: block; font-size: 14px; }
.signature span { font-size: 12px; color: var(--texte); line-height: 1.4; }

/* ---------------------------------------------------------------- pied de page */
.pied {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1240px; width: calc(100% - 48px); margin: 0 auto;
  padding: 18px 0 24px; border-top: 1.5px solid var(--bord);
  color: var(--texte); font-size: 14px;
}
.pied strong { color: #3F4D66; }
.puce { margin: 0 6px; }

@keyframes apparition { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rotation { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes trace { to { stroke-dashoffset: 0; } }

@media (max-width: 700px) {
  .entete { padding: 14px 16px 0; }
  .logo { height: 52px; }
  .separateur, .produit { display: none; }
  .pastille { font-size: 12px; padding: 6px 10px; }
  .page { padding: 28px 16px 32px; }
  .sous-titre { font-size: 16px; }
  .formulaire { padding: 18px 16px 16px; }
  .champ-groupe { flex-wrap: wrap; padding: 6px 6px 6px 14px; }
  #saisie { height: 46px; font-size: 17px; }
  .champ-groupe .bouton { width: 100%; }
  .atouts { grid-template-columns: 1fr; }
  .carte-statut { padding: 18px 16px; gap: 14px; }
  .res-icone { width: 52px; height: 52px; }
  .res-titre { font-size: 20px; }
  .carte-corps { padding: 20px 16px 18px; }
  .pied { width: calc(100% - 32px); flex-direction: column; text-align: center; }
  .motif { opacity: .55; }
}
