/* ==========================================================================
   CGT-VIVEST — 46-carte.css — CARTE D'ADHÉRENT·E (refonte-cgt, revue 2)
   --------------------------------------------------------------------------
   Balisage : SM._showMemberCard() (public.js). La seule surface « identité »
   que l'adhérent·e montre à l'extérieur : c'est une AFFICHE, pas une carte
   bancaire. Aplat rouge #E03131 (blanc dessus 4,51 AA), logo OFFICIEL recadré
   sur pastille blanche (jamais retapé), « VIVEST » en Figtree 900, angles
   droits, tranche rouge foncé, barre jaune 100×4 sous le nom, barre
   thématique 6 couleurs en pied. La carte ne suit PAS le thème (c'est un
   objet imprimable) ; la modale qui l'entoure, si (30-composants.css § 18).
   Rendu aussi par html2canvas (Télécharger) : pas de masque, pas de
   color-mix(), pas de filtre — que des aplats, des bords et des ombres.
   ========================================================================== */

/* La modale : petite boîte centrée (480 px : largeur lue par .cgt-modale-dyn,
   30-composants § 18), pied avec les boutons de la charte */
.cgt-carte-modale{ --cgt-largeur:480px; }
.cgt-carte-modale:not(#cgt) .sm-modal-body{ padding:22px 22px 26px; }
.cgt-carte-modale:not(#cgt) .sm-modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:14px;
  flex-wrap:wrap;
  padding:16px 22px 20px;
}
.cgt-carte-modale:not(#cgt) .sm-modal-footer .sm-btn{ min-width:128px; }
@media (max-width: 480px){
  .cgt-carte-modale:not(#cgt) .sm-modal-body{ padding:18px 16px 22px; }
  .cgt-carte-modale:not(#cgt) .sm-modal-footer{ display:grid; grid-auto-flow:column; grid-auto-columns:1fr; padding:14px 16px 18px; }
  .cgt-carte-modale:not(#cgt) .sm-modal-footer .sm-btn{ min-width:0; }
}

/* --------------------------------------------------------------------------
   La carte
   -------------------------------------------------------------------------- */
.cgt-carte-modale .cgt-carte-adh{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
  width:100%;
  max-width:420px;
  /* Format d'une vraie carte (ISO/CEI 7810 ID-1 : 85,60 × 53,98 mm) ; sur
     les très petits écrans, le contenu l'agrandit (min-height:auto, d'où
     l'absence d'overflow:hidden ici : c'est .cgt-carte-decor qui rogne le décor). */
  aspect-ratio:85.6 / 53.98;
  margin:0 auto 8px;                       /* place pour la tranche */
  padding:18px 18px 24px;
  box-sizing:border-box;
  background:#E03131;
  color:#FFFFFF;
  border-radius:0;
  box-shadow:6px 6px 0 0 #7A1414;          /* tranche rouge foncé (les deux thèmes) */
  font-family:var(--police-texte);
  text-align:left;
}
/* Décor d'affiche : grand « tampon » ton sur ton en bas à droite, dans un
   calque rogné (top/right/bottom/left plutôt que inset : html2canvas) */
.cgt-carte-modale .cgt-carte-decor{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  left:0;
  overflow:hidden;
  pointer-events:none;
}
.cgt-carte-modale .cgt-carte-decor::before{
  content:"";
  position:absolute;
  right:-46px;
  bottom:-60px;
  width:190px;
  height:190px;
  border:26px solid #C92A2A;
  border-radius:50%;
  opacity:.55;
}

/* Haut : logo officiel + VIVEST, millésime en autocollant jaune */
.cgt-carte-modale .cgt-carte-haut{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
}
.cgt-carte-modale .cgt-carte-logo{
  flex:none;
  display:block;
  padding:3px;
  background:#FFFFFF;
  box-shadow:3px 3px 0 0 #7A1414;
  line-height:0;
}
.cgt-carte-modale .cgt-carte-logo img{
  display:block;
  height:48px;
  width:auto;
  aspect-ratio:769 / 861;
}
.cgt-carte-modale .cgt-carte-marque{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  flex:1 1 auto;
}
.cgt-carte-modale .cgt-carte-nom{
  font-size:26px;
  font-weight:var(--fw-900);
  line-height:.9;
  letter-spacing:-.01em;
  color:#FFFFFF;
}
.cgt-carte-modale .cgt-carte-sous{
  font-size:var(--fs-11);
  font-weight:var(--fw-800);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#FFFFFF;
}
.cgt-carte-modale .cgt-carte-annee{
  flex:none;
  align-self:flex-start;
  padding:4px 8px;
  background:var(--cgt-jaune);
  color:#212529;                           /* jamais de blanc sur jaune (8,28) */
  font-size:var(--fs-12);
  font-weight:var(--fw-900);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  box-shadow:2px 2px 0 0 #212529;
  white-space:nowrap;
}

/* Bas : titulaire + numéro, QR code sur papier */
.cgt-carte-modale .cgt-carte-bas{
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}
.cgt-carte-modale .cgt-carte-infos{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  min-width:0;
}
.cgt-carte-modale .cgt-carte-depuis{
  font-size:var(--fs-12);
  font-weight:var(--fw-700);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  color:#FFFFFF;
}
.cgt-carte-modale .cgt-carte-titulaire{
  font-size:21px;
  font-weight:var(--fw-800);
  line-height:1.15;
  color:#FFFFFF;
  overflow-wrap:anywhere;
}
/* Barre jaune 100×4 (le motif « barre sous le titre », en jaune sur l'aplat) */
.cgt-carte-modale .cgt-carte-titulaire::after{
  content:"";
  display:block;
  width:64px;
  height:4px;
  margin-top:7px;
  background:var(--cgt-jaune);
}
.cgt-carte-modale .cgt-carte-role{
  display:inline-block;
  padding:2px 7px;
  background:#FFFFFF;
  color:#C92A2A;                           /* 5,46 sur blanc */
  font-size:var(--fs-11);
  font-weight:var(--fw-900);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  box-shadow:2px 2px 0 0 #7A1414;
}
.cgt-carte-modale .cgt-carte-numero{
  font-size:var(--fs-16);
  font-weight:var(--fw-800);
  letter-spacing:.12em;
  font-variant-numeric:tabular-nums;
  color:#FFFFFF;
}
.cgt-carte-modale .cgt-carte-qr{
  flex:none;
  width:96px;
  height:96px;
  padding:6px;
  box-sizing:border-box;
  background:#FFFFFF;
  box-shadow:3px 3px 0 0 #7A1414;
  line-height:0;
}
.cgt-carte-modale .cgt-carte-qr :is(img, canvas){ display:block; width:84px !important; height:84px !important; }
.cgt-carte-modale .cgt-carte-qr .sm-qr-placeholder{ width:84px; height:84px; background:#E9ECEF; }

/* Pied : barre thématique 6 couleurs (cgt.fr) */
.cgt-carte-modale .cgt-carte-arc{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:6px;
  background:var(--barre-arc-en-ciel);
}

/* Carte en attente de numéro : pictogramme sur carré à tranche */
.cgt-carte-modale .cgt-carte-attente{ text-align:center; padding:8px 4px 4px; }
.cgt-carte-modale .cgt-carte-attente-picto{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:64px;
  height:64px;
  margin:0 auto 16px;
  font-size:26px;
  color:var(--alerte-fort);
  background:var(--alerte-fond);
  border:2px solid var(--cgt-jaune);
  box-shadow:4px 4px 0 0 var(--tranche-bouton);
}
.cgt-carte-modale .cgt-carte-attente h3{
  margin:0 0 8px;
  font-family:var(--police-texte);
  font-size:var(--fs-20);
  font-weight:var(--fw-800);
  color:var(--texte);
}
.cgt-carte-modale .cgt-carte-attente p{ margin:0; font-size:var(--fs-15); line-height:var(--lh-para); color:var(--texte-2); }

/* Très petits écrans (320 px) : la carte se resserre */
@media (max-width: 360px){
  .cgt-carte-modale .cgt-carte-adh{ padding:14px 14px 20px; gap:12px; }
  .cgt-carte-modale .cgt-carte-haut{ gap:9px; }
  .cgt-carte-modale .cgt-carte-logo img{ height:40px; }
  .cgt-carte-modale .cgt-carte-nom{ font-size:22px; }
  .cgt-carte-modale .cgt-carte-sous{ font-size:10px; letter-spacing:.06em; }
  .cgt-carte-modale .cgt-carte-annee{ padding:3px 6px; font-size:var(--fs-11); letter-spacing:.03em; }
  .cgt-carte-modale .cgt-carte-depuis{ font-size:var(--fs-11); letter-spacing:.04em; }
  .cgt-carte-modale .cgt-carte-titulaire{ font-size:18px; }
  .cgt-carte-modale .cgt-carte-qr{ width:80px; height:80px; padding:5px; }
  .cgt-carte-modale .cgt-carte-qr :is(img, canvas){ width:70px !important; height:70px !important; }
}
