/* STI Card CSS - Frontend */

/* Grille de cartes */
.sti-cards-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

.sti-cards-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
}

.sti-cards-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.sti-cards-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Carte individuelle */
.sti-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(29, 43, 104, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sti-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ea1b75 0%, #ff5001 100%);
}

.sti-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(29, 43, 104, 0.18);
}

/* Icône et badge */
.sti-card-icon-wrapper {
    padding: 30px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(29, 43, 104, 0.03) 0%, rgba(234, 27, 117, 0.03) 100%);
}

.sti-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1d2b68 0%, #2a3f8f 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.sti-card:hover .sti-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.sti-card-icon i {
    font-size: 35px;
    color: white;
}

.sti-card-category {
    display: inline-block;
    background: linear-gradient(135deg, #ea1b75 0%, #ff5001 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenu */
.sti-card-content {
    padding: 25px;
}

.sti-card-title {
    color: #1d2b68;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Description avec scroll si trop long */
.sti-card-description-wrapper {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.sti-card-description-wrapper::-webkit-scrollbar {
    width: 6px;
}

.sti-card-description-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sti-card-description-wrapper::-webkit-scrollbar-thumb {
    background: #ea1b75;
    border-radius: 3px;
}

.sti-card-description-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ff5001;
}

.sti-card-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.7;
    margin: 0;
}

/* Bouton CTA principal - EN HAUT */
.sti-card-cta-wrapper {
    margin-bottom: 20px;
}

.sti-card-cta {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1d2b68 0%, #2a3f8f 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1em;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 43, 104, 0.3);
    position: relative;
    overflow: hidden;
}

.sti-card-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sti-card-cta:hover::before {
    width: 300px;
    height: 300px;
}

.sti-card-cta:hover {
    background: linear-gradient(135deg, #ea1b75 0%, #ff5001 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(234, 27, 117, 0.4);
    color: white;
}

.sti-card-cta i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.sti-card-cta:hover i {
    transform: translateX(5px);
}

/* Liens secondaires */
.sti-card-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sti-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #1d2b68;
    font-weight: 600;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sti-card-link:hover {
    background: #1d2b68;
    color: white;
    border-color: #1d2b68;
    transform: translateX(5px);
}

.sti-card-link i {
    font-size: 0.9em;
    flex-shrink: 0;
}

.sti-card-link-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .sti-cards-grid[data-columns="4"] {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .sti-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .sti-card-content {
        padding: 20px;
    }
    
    .sti-card-title {
        font-size: 1.2em;
    }
    
    .sti-card-icon {
        width: 60px;
        height: 60px;
    }
    
    .sti-card-icon i {
        font-size: 30px;
    }
    
    .sti-card-description-wrapper {
        max-height: 150px;
    }
}
