/* ============================================
   COMITARI - GUARANTEES SECTION REDESIGN
   Section "Nos Engagements" - Design Premium
   ============================================ */

/* ===== SECTION PRINCIPALE ===== */
.guarantees-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

/* Effet de fond avec formes géométriques */
.guarantees-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(55, 142, 86, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.guarantees-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(26, 82, 136, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.guarantees-section .container {
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
.guarantees-section .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(55, 142, 86, 0.1) 0%, rgba(77, 175, 110, 0.1) 100%);
    border: 2px solid var(--secondary-green);
    border-radius: 50px;
    color: var(--secondary-green);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

.guarantees-section .badge::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--secondary-green);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(55, 142, 86, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(55, 142, 86, 0);
    }
}

.guarantees-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--surface-dark);
    margin: 1.5rem 0 1rem;
    position: relative;
    display: inline-block;
}

.guarantees-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--secondary-green) 50%, transparent 100%);
    border-radius: 10px;
}

/* ===== GRID LAYOUT ===== */
.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* ===== GUARANTEE CARDS - NOUVEAU DESIGN ===== */
.guarantee-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 2px solid transparent;
}

/* Effet de brillance au hover */
.guarantee-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.guarantee-card:hover::before {
    opacity: 1;
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.guarantee-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-green);
}

/* Icône */
.guarantee-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s ease;
}

/* Cercle animé autour de l'icône */
.guarantee-icon::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all 0.4s ease;
}

.guarantee-card:hover .guarantee-icon {
    transform: rotateY(360deg);
}

.guarantee-card:hover .guarantee-icon::before {
    border-color: currentColor;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Variantes de couleur pour les icônes */
.guarantee-icon.green {
    background: linear-gradient(135deg, rgba(55, 142, 86, 0.1) 0%, rgba(77, 175, 110, 0.2) 100%);
    color: var(--secondary-green);
}

.guarantee-icon.blue {
    background: linear-gradient(135deg, rgba(26, 82, 136, 0.1) 0%, rgba(45, 108, 168, 0.2) 100%);
    color: var(--primary-blue);
}

.guarantee-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(167, 139, 250, 0.2) 100%);
    color: #8B5CF6;
}

.guarantee-icon.orange {
    background: linear-gradient(135deg, rgba(55, 142, 86, 0.1) 0%, rgba(77, 175, 110, 0.2) 100%);
    color: var(--secondary-green);
}

/* Nombre/Stat */
.guarantee-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s ease;
}

.guarantee-card:hover .guarantee-number {
    transform: scale(1.1);
}

/* Label */
.guarantee-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--surface-dark);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.guarantee-card:hover .guarantee-label {
    color: var(--secondary-green);
}

/* Description */
.guarantee-desc {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: center !important;
    margin: 0;
}

/* ===== ANIMATIONS D'ENTRÉE ===== */
.guarantee-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.guarantee-card:nth-child(1) {
    animation-delay: 0.1s;
}

.guarantee-card:nth-child(2) {
    animation-delay: 0.2s;
}

.guarantee-card:nth-child(3) {
    animation-delay: 0.3s;
}

.guarantee-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== COMPTEUR ANIMÉ ===== */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guarantee-number {
    animation: countUp 0.8s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .guarantees-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .guarantee-card {
        padding: 2rem 1.5rem;
    }

    .guarantee-number {
        font-size: 2.5rem;
    }

    .guarantees-section::before,
    .guarantees-section::after {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .guarantees-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== VARIANTE DARK (OPTIONNEL) ===== */
.guarantees-section.dark {
    background: linear-gradient(180deg, #0F172A 0%, #1A5288 100%);
}

.guarantees-section.dark .guarantee-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
}

.guarantees-section.dark .guarantee-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-green);
}

.guarantees-section.dark h2,
.guarantees-section.dark .guarantee-label {
    color: white;
}

.guarantees-section.dark .guarantee-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== EFFET PARALLAX (OPTIONNEL) ===== */
@media (prefers-reduced-motion: no-preference) {
    .guarantee-card {
        transform-style: preserve-3d;
    }

    .guarantee-card:hover {
        transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    }
}

/* ===== BADGE PREMIUM SUR CERTAINES CARTES ===== */
.guarantee-card.premium::after {
    content: 'Premium';
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--secondary-green) 0%, #4DAF6E 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
    letter-spacing: 0.5px;
}