/* Grille de services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
    gap: 2em;
    margin-bottom: 3em;
}

.service-card {
    position: relative;
    display: grid;
    grid-template-rows: 3fr 1fr;
    background: var(--color0);
    border: 1px solid rgba(var(--color4_rgb), 0.08);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(var(--color4_rgb), 0.12);
    border-color: rgba(var(--color1_rgb), 0.2);
}

/* Barre latérale accent */
.service-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--color1), var(--color2));
    transition: height 0.4s ease;
    z-index: 3;
}

.service-card:hover::before {
    height: 100%;
}

/* Image */
.service-image {
    position: relative;
    width: 100%;
    min-height: 40vh;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.service-card:hover .service-image {
    box-shadow: 0 6px 20px rgba(var(--color2_rgb), 0.15);
}


.service-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(var(--color4_rgb), 0.4) 0%, transparent 60%);
}

.service-card:hover .service-image::after {
    background: linear-gradient(to top, rgba(var(--color1_rgb), 0.5) 0%, transparent 60%);
}

/* Wrapper titre + sous-titre - en position absolue au-dessus de l'image */
.service-title-wrapper {
    position: absolute;
    top: 70%;
    left: 10%;
    width: 80%;
    padding: 1em 1.2em;
    border-radius: var(--border-radius);
    background: rgba(var(--color0_rgb), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    z-index: 2;
    transform: translateY(-50%);
}

.service-card:hover .service-title-wrapper {
    background: rgba(var(--color0_rgb), 0.95);
    box-shadow: 0 8px 24px rgba(var(--color4_rgb), 0.2);
}

.service-title {
    text-align: center;
    font-family: var(--font_family_1);
    font-size: calc(var(--taille_font) * 2);
    color: var(--color1);
    margin: 0 0 0.5em 0;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(var(--color4_rgb), 0.15);
}

.service-title .titre-secondaire {
    display: block;
    margin: 0;
    font-family: var(--font_family_2);
    font-size: calc(var(--taille_font) * 1.2);
    color: var(--color4);
    /* text-shadow: 0 1px 6px rgba(var(--color4_rgb), 0.12); */
}

/* Contenu texte */
.service-content {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 4em 1.8em 1em;
    font-size: calc(var(--taille_font));
}

.service-excerpt {
    color: var(--color4);
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 1.5em;
    opacity: 0.85;
    flex-grow: 1;
}

/* Lien */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--color1);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.service-link::after {
    content: '→';
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.service-link:hover {
    color: var(--color2);
    gap: 0.8em;
}

.service-link:hover::after {
    transform: translateX(3px);
}

/* Call to action */
.services-cta {
    text-align: center;
    padding: 3em 2em;
    margin: 3em 0 2em;
    background: rgba(var(--color4_rgb), 0.02);
    border: 1px solid rgba(var(--color4_rgb), 0.05);
    border-radius: var(--border-radius);
}

.services-cta h2 {
    font-family: var(--font_family_1);
    font-size: 2em;
    color: var(--color1);
    margin-bottom: 0.5em;
}

.services-cta p {
    font-size: 1.1em;
    color: var(--color4);
    opacity: 0.8;
    margin-bottom: 1.5em;
}

.cta-button {
    display: inline-block;
    padding: 1em 2.5em;
    background: var(--color1);
    color: var(--color0);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: calc(var(--border-radius) * 2);
    border: 2px solid var(--color1);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--color0);
    color: var(--color1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color1_rgb), 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }

    .page-title {
        font-size: 2.5em;
    }

    .service-content {
        padding: 3em 1.5em 1.5em;
    }

    .service-title {
        font-size: 1.4em;
    }

    .service-title-wrapper {
        padding: 1.2em 1.5em;
        left: 5%;
        width: 90%;
    }
}