/* Variables CSS pour faciliter la personnalisation */
:root {
    --primary-color: #2c5f8d;
    --secondary-color: #4a9fd8;
    --accent-color: #7bc5ae;
    --text-dark: #333333;
    --text-light: #666666;
    --background-light: #f8fafb;
    --white: #ffffff;
    --border-color: #e0e6ed;
    --hover-color: #1e4a6d;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Header et Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- Header : Logo en haut, Navigation en dessous --- */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column; /* Aligne les éléments verticalement (empilés) */
    align-items: center;    /* Centre tout horizontalement */
    gap: 1.5rem;            /* Espace entre le logo et le menu */
}

.logo h1 {
    color: var(--primary-color);
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
}

.logo p {
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center; /* AJOUT : Centre les liens horizontalement */
    gap: 1.5rem;             /* AJUSTÉ : Un peu moins d'espace pour tenir sur une ligne */
    flex-wrap: wrap;         /* AJOUT : Permet de passer sur 2 lignes sur petit écran */
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}
nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    background-color: rgba(74, 159, 216, 0.1);
}

/* Section Hero */
.hero {
    background: linear-gradient(135deg, rgba(44, 95, 141, 0.95), rgba(74, 159, 216, 0.9)), 
                url('../images/hero.jpg') center/cover;
    color: var(--white);
    padding: 1rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(123, 197, 174, 0.3);
}

.cta-button:hover {
    background-color: #66b399;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 197, 174, 0.4);
}

/* Conteneur principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Cartes d'information */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(74, 159, 216, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Section équipe */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.team-member {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-8px);
}

.team-member-photo {
    width: 100%;
    height: 300px;
    background-color: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
}

.team-member-info {
    padding: 2rem;
}

.team-member-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.team-member-info .role {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-member-info p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Section pathologies */
.pathologies-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pathology-item {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: background-color 0.3s ease;
}

.pathology-item:hover {
    background-color: rgba(123, 197, 174, 0.1);
}

.pathology-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.pathology-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Section tarifs */
.tarifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tarif-card {
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.tarif-card:hover {
    border-color: var(--accent-color);
}

.tarif-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tarif-price {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 700;
    margin: 1.5rem 0;
}

.tarif-card ul {
    list-style: none;
    margin-top: 1.5rem;
}

.tarif-card li {
    padding: 0.7rem 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.tarif-card li:last-child {
    border-bottom: none;
}

/* Section contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
}

.contact-item {
    display: flex;
    align-items: start;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-light);
    line-height: 1.8;
}

.map-container {
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Horaires */
.horaires-table {
    width: 100%;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.horaires-table table {
    width: 100%;
    border-collapse: collapse;
}

.horaires-table th,
.horaires-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.horaires-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.horaires-table tr:hover {
    background-color: var(--background-light);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Images de présentation */
.presentation-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.presentation-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.presentation-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.presentation-image:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .info-cards,
    .team-grid,
    .pathologies-list,
    .tarifs-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Styles spécifiques à la page ARTICLES --- */

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 5rem; /* Espace entre les articles */
}

.article-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
    background-color: var(--white);
}

.article-card.reverse {
    direction: rtl; /* Inverse l'image et le texte */
}

.article-card.reverse .article-body {
    direction: ltr; /* Remet le texte dans le bon sens de lecture */
}

.article-img img {
    width: 100%;
    height: 350px; /* Force une hauteur fixe pour l'harmonie */
    object-fit: cover; /* Recadre proprement sans déformer l'image */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: block;
}

.category-tag {
    display: inline-block;
    background-color: var(--background-light);
    color: var(--accent-color);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.article-body h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.article-body p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Version Mobile */
@media (max-width: 768px) {
    .article-card, .article-card.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.5rem;
    }
}

/* --- Système de Lightbox (Agrandissement d'image) --- */

/* Le conteneur de fond (caché par défaut) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fond noir très opaque */
    z-index: 2000; /* Par-dessus le header sticky */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 2rem;
}

/* Affichage de la lightbox quand l'ancre (#lightbox-x) est ciblée */
.lightbox:target {
    opacity: 1;
    visibility: visible;
}

/* Conteneur de l'image centrée */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* L'image agrandie */
.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh; /* 90% de la hauteur de l'écran */
    border: 4px solid var(--white);
    border-radius: 4px;
    display: block;
}

/* Le bouton fermer (X) */
.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 2010;
}

.lightbox-close:hover {
    background-color: #66b399;
}

/* Zone cliquable sur tout le fond pour fermer */
.lightbox-close-full {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: default;
}

/* Style de curseur pour indiquer que l'image est cliquable */
.article-img a {
    cursor: zoom-in;
    display: block; /* Évite les décalages de grille */
}