/* Design modernisé pour la section Counter */
.counter-section {
    position: relative;
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
    overflow: hidden;
}

/* Superposition d'arrière-plan dégradé */
.counter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 29, 68, 0.9) 0%, rgba(0, 98, 204, 0.85) 100%);
    z-index: -1;
}

/* Particules animées en arrière-plan */
.counter-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.counter-particle {
    position: absolute;
    display: block;
    pointer-events: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

/* Titre de la section */
.counter-section-title {
    text-align: center;
    margin-bottom: 60px;
}

.counter-section-title h2 {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.counter-section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.3));
    border-radius: 3px;
}

.counter-section-title p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 17px;
    max-width: 700px;
    margin: 0 auto;
}

/* Container principal */
.counter-wrap {
    position: relative;
    z-index: 2;
}

/* Items de compteur */
.counter-item {
    position: relative;    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px 20px;
    margin-bottom: 30px;
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Animation au survol */
.counter-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Design de l'icône de compteur */
.counter-icon {
    position: relative;
    margin-bottom: 20px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-icon::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    animation: pulse 2s infinite;
}

.counter-icon img {
    max-height: 60px;
    position: relative;
    z-index: 1;
    filter: brightness(0) invert(1);
    transition: all 0.5s ease;
}

.counter-item:hover .counter-icon img {
    transform: scale(1.1);
}

/* Texte du compteur */
.counter-text {
    position: relative;
}

.counter-text span {
    font-size: 50px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    display: block;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #00a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.counter-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    position: relative;
    padding-bottom: 15px;
}

.counter-text p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), #fff, rgba(255, 255, 255, 0.3));
    border-radius: 3px;
}

/* Animation des compteurs */
@keyframes count-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.counter-animated {
    animation: count-up 1s ease-out forwards;
}

/* Formes géométriques décoratives */
.counter-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1;
}

.counter-shape {
    position: absolute;
    opacity: 0.15;
}

.counter-shape-1 {
    top: 20%;
    right: 10%;
    width: 150px;
    height: 150px;
    border: 5px solid #fff;
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.counter-shape-2 {
    bottom: 15%;
    right: 20%;
    width: 80px;
    height: 80px;
    background: #fff;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: rotate 20s infinite linear;
}

.counter-shape-3 {
    top: 30%;
    left: 10%;
    width: 100px;
    height: 100px;
    border: 5px solid #fff;
    transform: rotate(45deg);
    animation: float 12s infinite ease-in-out reverse;
}

.counter-shape-4 {
    bottom: 20%;
    left: 5%;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(15px, -15px) rotate(5deg); }
    50% { transform: translate(0, -25px) rotate(0); }
    75% { transform: translate(-15px, -15px) rotate(-5deg); }
}

@keyframes rotate {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

/* Animation de soulignement au survol pour les compteurs */
.counter-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00a8ff, transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s ease;
}

.counter-item:hover::after {
    transform: scaleX(1);
}

/* Responsive */
@media (max-width: 991px) {
    .counter-section {
        padding: 80px 0;
    }
    
    .counter-section-title h2 {
        font-size: 30px;
    }
    
    .counter-text span {
        font-size: 40px;
    }
}

@media (max-width: 767px) {
    .counter-section {
        padding: 60px 0;
    }
    
    .counter-section-title h2 {
        font-size: 26px;
    }
    
    .counter-item {
        margin-bottom: 20px;
    }
    
    .counter-text span {
        font-size: 36px;
    }
}
