.services-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 20px;
    width: 90%;
    margin: 0px auto;
    margin-top: 0em;
    margin-bottom: 20px;
}

/* --- Style de la carte cliquable --- */
.services-container .card-link {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    -webkit-transition: -webkit-box-shadow 0.3s, -webkit-transform 0.3s;
    transition: -webkit-box-shadow 0.3s, -webkit-transform 0.3s;
    -o-transition: box-shadow 0.3s, transform 0.3s;
    transition: box-shadow 0.3s, transform 0.3s;
    transition: box-shadow 0.3s, transform 0.3s, -webkit-box-shadow 0.3s, -webkit-transform 0.3s;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

/* Effet de survol général (soulèvement de la carte) */
.services-container .card-link:hover {
    -webkit-box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    -webkit-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    transform: translateY(-3px);
}

.services-container .service-card {
    background-color: #ffffff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    position: relative;
    min-height: 450px;
    width: 100%;
}

/* Conteneur de l'image (hauteur fixe) */
.services-container .card-image-wrapper {
    position: relative;
    height: 200px;
    z-index: 2;
}

/* Zone pour l'image de fond */
.services-container .card-image-placeholder {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-transition: -webkit-transform 0.3s ease-out;
    transition: -webkit-transform 0.3s ease-out;
    -o-transition: transform 0.3s ease-out;
    transition: transform 0.3s ease-out;
    transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
}

/* --- Styles pour les images en format WebP (moderne) --- */
.services-container .placeholder-divorce-amiable {
    background-image: url('../images/services/avocat-divorce-amiable-grenoble.webp');
}
.services-container .placeholder-divorce-contentieux {
    background-image: url('../images/services/avocat-divorce-contentieux-grenoble.webp');
}
.services-container .placeholder-droit-famille {
    background-image: url('../images/services/avocat-droit-famille-grenoble.webp');
}
.services-container .placeholder-droit-penal {
    background-image: url('../images/services/avocat-droit-penal-grenoble.webp');
}
.services-container .placeholder-dommage-corporel {
    background-image: url('../images/services/avocat-dommage-corporel-grenoble.webp');
}
.services-container .placeholder-droit-mineur {
    background-image: url('../images/services/avocat-droit-mineur-grenoble.webp');
}

/* --- Styles de remplacement pour les images en format JPG (si .webp non supporté) --- */
html.no-webp .services-container .placeholder-divorce-amiable {
    background-image: url('../images/services/avocat-divorce-amiable-grenoble.jpg');
}
html.no-webp .services-container .placeholder-divorce-contentieux {
    background-image: url('../images/services/avocat-divorce-contentieux-grenoble.jpg');
}
html.no-webp .services-container .placeholder-droit-famille {
    background-image: url('../images/services/avocat-droit-famille-grenoble.jpg');
}
html.no-webp .services-container .placeholder-droit-penal {
    background-image: url('../images/services/avocat-droit-penal-grenoble.jpg');
}
html.no-webp .services-container .placeholder-dommage-corporel {
    background-image: url('../images/services/avocat-dommage-corporel-grenoble.jpg');
}
html.no-webp .services-container .placeholder-droit-mineur {
    background-image: url('../images/services/avocat-droit-mineur-grenoble.jpg');
}


/* Contenu sous l'image */
.services-container .card-content {
    padding: 20px;
    padding-top: 10px;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-transition: padding-top 0.3s ease-out;
    -o-transition: padding-top 0.3s ease-out;
    transition: padding-top 0.3s ease-out;
}

.services-container h3 {
    text-align: center;
    margin-top: 5px;
    color: #333;
    /*color: rgb(50, 92, 121);*/
    /*font-weight: bold;*/
    font-size: 25px;
    line-height: 30px;
}

.services-container h3 span {
    font-size: 16px;
    line-height: 20px;
    color: rgb(106,0,27);
    font-weight: 500;
}

.services-container p {
    font-size: 1em;
    color: #333;
    line-height: 1.4;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    margin-bottom: 0px;
}

/* --- NOUVEAUX STYLES POUR LE LIEN ET LE TRAIT ANIMÉ --- */
.services-container .more-info-style {
    text-decoration: none;
    font-size: 1em;
    color:#333; /* Vert clair */

    /* Retrait de la bordure au profit du pseudo-élément */
    border-bottom: none;

    display: inline-block;
    padding-bottom: 10px;

    /* Indispensable pour positionner le trait (::after) en bas du lien */
    position: relative;

    -webkit-transition: color 0.3s;

    -o-transition: color 0.3s;

    transition: color 0.3s; /* Transition uniquement pour la couleur du texte */

    /*font-weight: 500;*/
    margin-top: 30px;
}

/* Le Trait (initialement court) */
.services-container .more-info-style::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;

    /* Largeur initiale courte */
    width: 20px;

    height: 2px; /* Épaisseur initiale fine */
    background-color: rgb(106,0,27); /* Couleur initiale très claire */

    /* Transition pour l'animation de la largeur et de la couleur */
    -webkit-transition: width 0.3s ease-out, background-color 0.3s, height 0.3s;
    -o-transition: width 0.3s ease-out, background-color 0.3s, height 0.3s;
    transition: width 0.3s ease-out, background-color 0.3s, height 0.3s;
}

/* Au survol de la carte, le trait s'allonge et s'épaissit */
.services-container .card-link:hover .more-info-style {
    color: rgb(106,0,27); /* Couleur du texte change aussi */
}

.services-container .card-link:hover .more-info-style::after {
    /* Largeur maximale (s'allonge) */
    width: 90px;

    height: 2px; /* L'épaisseur augmente légèrement */
    background-color: rgb(106,0,27); /* Couleur principale plus foncée */
}
/* --- FIN DES NOUVEAUX STYLES --- */

@media (max-width: 1250px) {
    .services-container h3 {
        min-height: 4.5em;
    }
}


/* Styles pour les petits écrans (responsive) */
@media (max-width: 900px) {

    .services-container {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 30px;
        max-width: 650px;
    }

    .services-container h3 {
        min-height: auto;
    }
}