/* Badge CO2 avec background image SVG */
.plik-co2-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1.8rem;

  /* dimensions par défaut */
  width: 248px;
  height: 74px;
  box-sizing: border-box;

  /* background SVG */
  background: url('../assets/bg-green.svg') no-repeat center / cover;

  border-radius: 12px;
  overflow: hidden;

  /* texte blanc + ombres */
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  border: 4px solid rgba(255,255,255,0.2);

  transition:all 0.3s ease;

  text-decoration: none;
  text-align: right;
}

.plik-co2-link-wrapper:hover .plik-co2-badge {
  
  border: solid 4px #FFF101;

}

.plik-co2-icon {
  height: 32px;
}

.plik-co2-text { display: flex; flex-direction: column; line-height: 1; text-align: end; }
.plik-co2-label { font-weight: 700; letter-spacing: .02em; opacity: .95;    color: #000;     margin-bottom: 6px;   font-size: 18px; }
.plik-co2-value { font-weight: 800; font-size: 30px;     text-align: end;}
.plik-co2-unit { font-weight: 700; font-size: 14px; margin-left: .25rem; opacity: .95;     text-align: end; }

/* Option : redimension via attribut [data-width] */
.plik-co2-badge[data-width] {
  width: attr(data-width px);
}

@media (max-width:480px){
  /*.plik-co2-label{ display:none; }*/
}


.co2-map{
    position: relative;
    width: 383px;
    height: 373px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("../assets/world-co2.png");
}

.co2-map .pin{
    position: absolute;
    width: 33px;
    height: 45px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("../assets/pin-co2.png");
    top: calc(50% - 30px);
    left: calc(50% - 11px);
    z-index: 2;
    transform: scale(1);
    
}
.co2-map.active .pin{
    animation: co2Bounce 0.8s ease-out forwards;
}

@keyframes co2Bounce {
    0% {
        transform: translate(0,0) scale(1);
    }
    20% {
        transform: translate(4px,-8px) scale(1.2);
    }
    40% {
        transform: translate(0,0) scale(0.95);
    }
    60% {
        transform: translate(2px, -3px) scale(1.1);
    }
    80% {
        transform: translate(0,0) scale(0.98);
    }
    100% {
        transform: translate(0,0) scale(1);
    }
}

.co2-map .needle{
    position: absolute;
    width: 74px;
    height: 200px;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("../assets/needle-co2.png");
    top: calc(50% - 160px);
    left: calc(50% - 38px);
    transform-origin: 36px 170px;
    transform: rotate(0deg);
    transition: all 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1;
}
.co2-map.active .needle{
  transform: rotate(var(--pin-angle));
}

.co2-title{
    font-size: 36px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}