/**
 * Styles pour les cartes AMCC avec effet hover de droite à gauche
 */

/* Conteneur principal */
.amcc-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

/* Style de chaque carte */
.amcc-card {
    position: relative;
    width: calc(25% - 15px); /* 4 blocs sur PC */
    height: 575px;
    border-radius: 15px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid #1F386A;
    transition: transform 0.4s ease;
    cursor: pointer;
}

/* Overlay semi-transparent */
.amcc-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Gradient au bas de la carte */
.amcc-card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 44, 95, 0.9), rgba(0, 44, 95, 0));
    z-index: 2;
    transition: height 0.4s ease;
}

/* Contenu de la carte */
.amcc-card-content {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    z-index: 3;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Icône en haut à gauche */
.amcc-card-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #1f386b;
    z-index: 5;
    border-bottom: 1px solid #1f386b;
}

.amcc-card-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Titre en bas */
.amcc-card-title {
    position: absolute;
    bottom: 30px;
    left: 0;
    margin: 0;
    font-weight: 600;
    transition: transform 0.4s ease, opacity 0.3s ease;
    color: #fff !important;
    z-index: 5;
    text-align: center;
    font-size: 21px !important;
    padding: 14px 14px 0;
    font-family: "Wix Madefor Text", Sans-serif;
}


/* Contenu visible au hover */
.amcc-card-hover-content {
    position: absolute;
    top: 0;
    right: -100%; /* Commence hors écran à droite */
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: #fff;
    color: #1F386A;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 4;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .amcc-card-text {
        margin-bottom: 0;
        line-height: 18px;
        font-size: 14px;
    }

    /* Style pour les listes à puces avec points orange */
    .amcc-card-list {
        list-style: none;
        padding-left: 0;
        margin: 10px 0;
        font-size: 14px;
    }

    /* Titre dans le contenu hover */
    .amcc-card-hover-title {
        color: #ef7e0f !important;
        margin-bottom: 15px;
        font-size: 21px !important;
        font-family: "Wix Madefor Text", Sans-serif;
        margin-top: 45px;
    }
}

@media (max-width: 767px) {
    .amcc-card-text {
        margin-bottom: 0;
        line-height: 18px;
        font-size: 12px;
    }

    /* Style pour les listes à puces avec points orange */
    .amcc-card-list {
        list-style: none;
        padding-left: 0;
        margin: 10px 0;
        font-size: 12px;
    }

    /* Titre dans le contenu hover */
    .amcc-card-hover-title {
        color: #ef7e0f !important;
        margin-bottom: 15px;
        font-size: 18px !important;
        font-family: "Wix Madefor Text", Sans-serif;
        margin-top: 45px;
    }
}


.amcc-card-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 0px;
    font-weight: bold;
}

.amcc-card-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: #ef7e0f;
    border-radius: 50%;
}

/* Style pour les textes en gras */
.amcc-card-text strong {
    font-weight: 700;
    color: #1F386A;
}

/* Séparateur de section */
.amcc-section-divider {
    width: 40px;
    height: 3px;
    background-color: #ef7e0f;
    margin: 15px 0;
}

/* Animation d'entrée */
.amcc-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.amcc-card-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Effet hover sur desktop */
@media (min-width: 993px) {
    .amcc-card:hover .amcc-card-hover-content {
        right: 0; /* Glisse vers la gauche au hover */
    }

    .amcc-card:hover .amcc-card-title {
        opacity: 0; /* Cache le titre principal au hover */
    }
}

/* Adaptation pour tablette */
@media (max-width: 992px) and (min-width: 577px) {
    .amcc-cards-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 20px; /* Espace pour le scrollbar */
        gap: 15px;
    }

    .amcc-card {
        min-width: 280px; /* Largeur minimale pour chaque carte */
        width: 280px; /* Largeur fixe */
        flex-shrink: 0; /* Empêche les cartes de rétrécir */
    }

    /* Activation de l'état actif pour les clics sur tablette */
    .amcc-card.active .amcc-card-hover-content {
        right: 0;
    }

    .amcc-card.active .amcc-card-title {
        opacity: 0;
    }

    /* Masquer la scrollbar mais garder la fonctionnalité */
    .amcc-cards-container::-webkit-scrollbar {
        height: 6px;
    }

    .amcc-cards-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .amcc-cards-container::-webkit-scrollbar-thumb {
        background: #1F386A;
        border-radius: 10px;
    }
}

/* Adaptation pour mobile */
@media (max-width: 576px) {
    .amcc-cards-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 20px; /* Espace pour le scrollbar */
        gap: 15px;
    }

    .amcc-card {
        min-width: 260px; /* Légèrement plus petit pour les téléphones */
        width: 260px;
        flex-shrink: 0;
        margin-bottom: 0; /* Supprimer la marge du bas car on scroll horizontalement */
    }

    /* Activation de l'état actif pour les clics sur mobile */
    .amcc-card.active .amcc-card-hover-content {
        right: 0;
    }

    .amcc-card.active .amcc-card-title {
        opacity: 0;
    }

    /* Masquer la scrollbar mais garder la fonctionnalité */
    .amcc-cards-container::-webkit-scrollbar {
        height: 4px;
    }

    .amcc-cards-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .amcc-cards-container::-webkit-scrollbar-thumb {
        background: #1F386A;
        border-radius: 10px;
    }
}