/* Container principal avec grille responsive */
.casino-card-widget-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Carte individuelle */
.casino-card-widget-card {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 400px;
    overflow: hidden;
    max-width: 350px;
    max-height: 569px;

}

/* Bandeau diagonal en haut à droite */
.casino-card-ribbon {
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--ribbon-color, #007bff);
    color: white;
    padding: 10px 4px 8px 30px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(29deg);
    z-index: 10;
    min-width: 195px;
    text-align: center;
}

.casino-card-ribbon,
.casino-card-ribbon span,
body.light-mode .casino-card-widget-card .casino-card-ribbon span,
.light-mode .casino-card-widget-card .casino-card-ribbon span {
    color: white !important;
}

/* Logo du casino */
.casino-card-logo {
    width: 120px;
    height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: 20px 0 15px 0;
}

.casino-card-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.casino-card-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

/* Nom du casino */
.casino-card-name {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: #333;
    padding-bottom: 10px;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

h3.casino-card-name,
.casino-card-widget-card h3.casino-card-name {
    font-size: 20px !important;
    font-weight: bold !important;
}

.casino-card-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(224, 224, 224, 0.9) 50%, 
        transparent 100%);
}

/* Accroche commerciale */
.casino-card-commercial {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.4;
    padding-bottom: 10px;
    position: relative;
    width: 100%;
    justify-content: center;
}

.casino-card-commercial::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(224, 224, 224, 0.9) 50%, 
        transparent 100%);
}

/* Liste des avantages */
.casino-card-features {
    flex: 1;
    width: 100%;
    margin-bottom: 20px;
}

.casino-card-feature {
    display: flex;
    align-items: start;
    gap: 10px;
    margin-bottom: 10px;
    text-align: left;
}

.casino-card-feature-icon {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
}

.casino-card-feature-icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.casino-card-feature-icon-default {
    width: 20px;
    height: 20px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.casino-card-feature-description {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* Bouton CTA */
.casino-card-cta {
    width: 100%;
    margin-top: auto;
}

.casino-card-button {
    display: block;
    width: 100%;
    padding: 20px 20px;
    background: var(--button-color, #007bff);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    color: white !important;
}

.casino-card-button:hover {
    background: var(--button-hover, var(--button-color, #007bff));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white !important;
}

/* gestion avec HAS SIDEBAR */
.has-sidebar .casino-card-widget-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.has-sidebar .casino-card-widget-card {
    width: calc(50% - 15px);
    max-width: 350px;
    flex-shrink: 0;
}

/* Force les 2 premières cartes à être espacées */
.has-sidebar .casino-card-widget-card:nth-child(1) {
    margin-right: auto;
}

.has-sidebar .casino-card-widget-card:nth-child(2) {
    margin-left: 0;
}

@media (max-width: 1024px) {
    .casino-card-widget-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;
        justify-content: center;
    }
    
    .casino-card-widget-card {
        width: calc(50% - 15px);
        max-width: 350px;
        flex-shrink: 0;
    }
    
    /* Force les 2 premières cartes à être espacées */
    .casino-card-widget-card:nth-child(1) {
        margin-right: auto;
    }
    
    .casino-card-widget-card:nth-child(2) {
        margin-left: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .casino-card-widget-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        padding: 15px;
    }
    
    .casino-card-widget-card {
        padding: 25px 15px;
        min-height: 350px;
    }
    
    .casino-card-logo {
        width: 120px;
        height: 120px;
        margin: 15px 0 12px 0;
    }
    
    .casino-card-name {
        font-size: 18px;
    }
    
    .casino-card-commercial {
        font-size: 13px;
    }
    
    .casino-card-button {
        padding: 17px 16px;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .has-sidebar .casino-card-widget-wrapper,
    .casino-card-widget-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .has-sidebar .casino-card-widget-card,
    .casino-card-widget-card {
        width: 100%;
        max-width: 320px;
    }
    
    /* Retire les marges personnalisées en mode mobile */
    .has-sidebar .casino-card-widget-card:nth-child(1),
    .has-sidebar .casino-card-widget-card:nth-child(2),
    .casino-card-widget-card:nth-child(1),
    .casino-card-widget-card:nth-child(2) {
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .casino-card-widget-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    .casino-card-widget-card {
        padding: 20px 12px;
        min-height: 320px;
    }
    
    .casino-card-logo {
        width: 100px;
        height: 100px;
        margin: 12px 0 10px 0;
    }
    
    .casino-card-name {
        font-size: 16px;
    }
    
    .casino-card-commercial {
        font-size: 12px;
    }
    
    .casino-card-feature {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .casino-card-feature-icon,
    .casino-card-feature-icon-default {
        width: 18px;
        height: 18px;
    }
    
    .casino-card-feature-description {
        font-size: 13px;
    }
    
    .casino-card-button {
        padding: 18px 14px;
        font-size: 14px;
    }
    
    .casino-card-ribbon {
    top: 4px;
    right: -41px;
    padding: 10px 4px 8px 30px;
    font-size: 18px;
    min-width: 195px;

}
}

/* Dark mode support */
body.dark-mode .casino-card-widget-wrapper .casino-card-widget-card {
    background-color: #17191D !important;
    color: white;
}

body.dark-mode .casino-card-widget-wrapper .casino-card-name {
    color: white;
}

body.dark-mode .casino-card-widget-wrapper .casino-card-commercial {
    color: #ffffff;
}

body.dark-mode .casino-card-widget-wrapper .casino-card-feature-description {
    color: white;
}