/* services.css - Styles pour la page Services refonte 2026 */

/* === Smooth scroll global === */
html {
    scroll-behavior: smooth;
}

/* === Hero section === */
.services-hero {
    padding: 0;
}

/* H1 présent dans le DOM pour le SEO, masqué visuellement */
.services-hero h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Hexagone décoratif sur les titres de section (::before) === */

/* === Sections de services === */
.services-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.services-section > h2 {
    color: #b2b298;
    font-weight: 300;
    font-size: calc(1rem + 1.5vmin);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #b2b298;
    text-align: left;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.services-section > h2::before {
    content: '';
    display: inline-block;
    width: 34px;
    height: 30px;
    flex-shrink: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background-color: #b2b298;
}

/* === Grille de cartes : flexbox centré, 2 colonnes desktop === */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}

/* === Carte de service — layout horizontal 1/3 | 2/3 === */
.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-align: left;
    border: 1px solid rgba(178,178,152,0.2);
    min-height: 140px;
    /* 2 cards par ligne avec gap 1.25rem : (100% - 1.25rem) / 2 */
    flex: 0 0 calc(50% - 0.625rem);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.service-card:focus-visible {
    outline: 2px solid #b2b298;
    outline-offset: 2px;
}

/* Image : 1/3 de la largeur, hauteur portée par le contenu */
.service-card-img {
    width: 33%;
    flex-shrink: 0;
    overflow: hidden;
    background: #EBEAF0;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Texte : 2/3 restants */
.service-card-body {
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.service-card-body h3 {
    color: #1e2d47;
    font-size: calc(0.8rem + 0.4vmin);
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.service-card-excerpt {
    color: #666;
    font-size: 0.82rem;
    line-height: 1.5;
    text-indent: 0;
    margin-bottom: 0.75rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

.service-card-cta {
    color: #b2b298;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: auto;
    letter-spacing: 0.03em;
}

/* === Section Tarifs === */
.tarifs-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tarifs-section > h2 {
    color: #b2b298;
    font-weight: 300;
    font-size: calc(1rem + 1.5vmin);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #b2b298;
    text-align: left;
    letter-spacing: 0.04em;
}

.tarifs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.tarif-column {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid #b2b298;
}

.tarif-column.tarif-consultations {
    border-top-color: #b2b298;
}

.tarif-column.tarif-bilans {
    border-top-color: #b2b298;
}

.tarif-column.tarif-groupes {
    border-top-color: #9a9a84;
}

.tarif-column h3 {
    color: #b2b298;
    font-size: calc(0.9rem + 0.5vmin);
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: left;
}

.tarif-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tarif-list li {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0ec;
    text-align: left;
}

.tarif-list li:last-child {
    border-bottom: none;
}

.tarif-label {
    color: #1e2d47;
    font-size: 0.85rem;
    font-weight: 500;
}

.tarif-price-block {
    margin-top: 0.15rem;
}

.tarif-price {
    color: #b2b298;
    font-weight: 700;
    font-size: 0.9rem;
}

.tarif-details {
    display: block;
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.1rem;
}

/* === Ajustement du main de la page services === */
.services-main {
    padding-top: 5rem;
    min-height: 90vh;
}

/* === Responsive === */
@media (max-width: 992px) {
    .tarifs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-hero {
        padding: 5rem 1rem 2rem;
    }

    .services-section,
    .tarifs-section {
        padding: 2rem 1rem;
    }

    .tarifs-grid {
        grid-template-columns: 1fr;
    }

    /* Cards : pleine largeur sur mobile, retour vertical */
    .service-card {
        flex: 0 0 100%;
        flex-direction: column;
        min-height: unset;
    }

    .service-card-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .service-card-img img {
        object-position: center;
    }

    [data-modal="modal-psychotherapies"] .service-card-img img,
    [data-modal="modal-analyse"] .service-card-img img,
    [data-modal="modal-choix"] .service-card-img img {
        object-position: top center;
    }
}

/* === prefers-reduced-motion === */
@media (prefers-reduced-motion: reduce) {
    .service-card {
        transition: none;
    }

    .hex-anchor {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
