/* --- VARIABLES DE COULEURS (Charte médicale) --- */
:root {
    --bleu-marine: #0F2C59; /* Confiance, sérieux, institutionnel */
    --bleu-celadon: #4A6E60; /* Apaisement, soin, médical */
    --fond-clair: #F8F9FA;
    --texte-sombre: #333333;
    --blanc: #FFFFFF;
}

/* --- REINITIALISATION DE BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--fond-clair);
    color: var(--texte-sombre);
    line-height: 1.6;
    padding-top: 80px; /* Espace pour le menu fixe */
}

/* --- MENU DE NAVIGATION (Header) --- */
header {
    background-color: var(--blanc);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}

/* --- STYLE DU NOUVEAU LOGO IMAGE --- */
/* Le lien qui entoure l'image */
.logo-lien {
    display: flex;
    align-items: center;
    height: 100%; /* Prend toute la hauteur du menu */
    text-decoration: none; /* Pas de soulignement si jamais */
}

/* L'image du logo elle-même */
.logo-lien img {
    height: 60px; /* On fixe la hauteur à 60px pour qu'il rentre bien dans le header de 80px */
    width: auto;  /* La largeur s'adapte automatiquement pour ne pas déformer le logo */
    transition: transform 0.3s ease; /* Petit effet sympa au survol */
}

/* Petit effet bonus : le logo grossit très légèrement au survol de la souris */
.logo-lien:hover img {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px; /* Espacement ajusté entre les blocs */
}

nav ul li a {
    text-decoration: none;
    color: var(--bleu-marine); /* Plus sérieux et lisible que le gris foncé */
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px; /* Crée une vraie "boîte" invisible autour du texte */
    border-radius: 20px; /* Forme arrondie et douce, très moderne */
    border: 1px solid transparent; /* Bordure invisible par défaut pour éviter les sauts d'image */
    transition: all 0.3s ease;
}

/* L'effet design et professionnel au survol */
nav ul li a:hover {
    color: var(--bleu-celadon);
    background-color: rgba(74, 110, 96, 0.05); /* Fond vert d'eau extrêmement discret */
    border: 1px solid rgba(74, 110, 96, 0.2); /* Bordure subtile qui délimite parfaitement le lien */
}

/* --- PAGE D'ACCUEIL (Hero Section avec Photo Blanchie) --- */
.hero {
    position: relative; /* Indispensable pour superposer le voile */
    background: url('images/fond-accueil.jpeg') no-repeat center center/cover;
    text-align: center;
    padding: 100px 20px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Pour que le voile ne dépasse pas des arrondis si besoin */
}

/* Le voile blanc "discrétion" */
.hero::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75); /* 75% de blanc - Montez à 0.85 si vous voulez plus de discrétion */
    z-index: 1;
}

/* On force le contenu à passer au premier plan (devant le voile) */
.hero h1, 
.hero p, 
.hero .btn {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--bleu-marine); /* Texte foncé sur fond clair */
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin-bottom: 40px;
    color: #2D3748; /* Gris ardoise foncé pour la lisibilité */
    animation: fadeInUp 1s ease-out;
}

/* --- BOUTONS D'APPEL A L'ACTION --- */
.bouton-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-primaire {
    background-color: var(--bleu-celadon);
    color: var(--blanc);
    border: 2px solid var(--bleu-celadon);
}

.btn-primaire:hover {
    background-color: var(--blanc);
    color: var(--bleu-celadon);
}

.btn-secondaire {
    background-color: transparent;
    color: var(--blanc);
    border: 2px solid var(--blanc);
}

.btn-secondaire:hover {
    background-color: var(--blanc);
    color: var(--bleu-marine);
}

/* --- CORRECTIF POUR L'ACCUEIL (Fond clair) --- */
.hero .btn-secondaire {
    background-color: rgba(255, 255, 255, 0.85); /* Ajoute un fond blanc semi-opaque pour garantir la lisibilité */
    color: var(--bleu-marine);      
    border-color: var(--bleu-marine); 
}

.hero .btn-secondaire:hover {
    background-color: var(--bleu-marine); 
    color: var(--blanc);                 
}

/* --- PIED DE PAGE (Footer) --- */
footer {
    background-color: var(--bleu-marine);
    color: var(--blanc);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

footer a {
    color: var(--bleu-celadon);
    text-decoration: none;
}

/* --- RESPONSIVE (Smartphones) --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* --- CORRECTIF POUR LES TITRES MASQUÉS --- */
    .page-entete {
        padding-top: 160px !important; /* Pousse le titre bleu vers le bas */
        padding-bottom: 40px;
    }

    .hero {
        padding-top: 180px !important; /* Pousse le contenu de l'accueil vers le bas */
    }

    .hero h1 {
        font-size: 1.8rem; /* Un peu plus petit pour éviter de manger tout l'écran */
    }
}

/* Animations simples */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- STYLES POUR LES PAGES INTERNES --- */
.page-entete {
    background-color: var(--bleu-marine);
    color: var(--blanc);
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 40px;
}

.page-entete h1 {
    font-size: 2.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.contenu-principal {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: var(--blanc);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 50px;
}

.contenu-principal p, 
.contenu-principal li {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #444;
    text-align: justify; /* Aligne le texte à gauche ET à droite */
    hyphens: auto; /* Active la coupure des mots intelligente selon le dictionnaire français */
    -webkit-hyphens: auto; /* Pour que ça marche parfaitement sur iPhone/Safari */
    -ms-hyphens: auto;
}

/* --- GRILLE DE L'ÉQUIPE --- */
.equipe-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.medecin-carte {
    text-align: center;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.medecin-carte:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.photo-placeholder {
    width: 150px;
    height: 150px;
    background-color: #E2E8F0;
    border-radius: 50%; /* Fait un rond parfait */
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
    border: 3px solid var(--bleu-celadon);
}

.photo-medecin {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Crée le rond parfait */
    object-fit: cover; /* Centre et coupe l'image sans la déformer */
    margin: 0 auto 15px;
    display: block;
    border: 3px solid var(--bleu-celadon);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.medecin-carte h3 {
    color: var(--bleu-marine);
    margin-bottom: 5px;
}

/* Force le centrage du texte sous la photo des médecins (annule la justification globale) */
.medecin-carte p {
    text-align: center;
    margin-bottom: 0;
}

/* --- BOITE DE TÉLÉCHARGEMENT PDF --- */
.pdf-box {
    background-color: #F0F4F8;
    border-left: 5px solid var(--bleu-celadon);
    padding: 25px;
    margin-top: 40px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-box p {
    margin: 0;
    font-weight: bold;
    color: var(--bleu-marine);
    text-align: left; /* Annule la justification pour éviter la collision avec le bouton */
}

.btn-pdf {
    background-color: var(--bleu-celadon);
    color: var(--blanc);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-pdf:hover {
    background-color: var(--bleu-marine);
}

@media (max-width: 768px) {
    .pdf-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* --- ACCORDÉON (Questions Fréquentes) --- */
.faq-container {
    margin-top: 30px;
}

.faq-item {
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background-color: #F8F9FA;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--bleu-marine);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #E2E8F0;
}

.faq-question.active {
    background-color: var(--bleu-marine);
    color: var(--blanc);
}

/* L'icône + et - */
.faq-question::after {
    content: '\002B'; /* Symbole Plus */
    font-size: 1.5rem;
    font-weight: normal;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    content: '\2212'; /* Symbole Moins */
    transform: rotate(180deg);
}

.faq-reponse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* L'animation fluide d'ouverture */
    background-color: var(--blanc);
}

.faq-reponse-contenu {
    padding: 20px;
    color: #444;
    line-height: 1.7;
}

.faq-reponse-contenu ul {
    padding-left: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.faq-reponse-contenu li {
    margin-bottom: 10px;
}

/* --- CARTE GOOGLE MAPS --- */
.carte-container {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden; /* Permet de garder les bords arrondis avec la carte à l'intérieur */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
    margin-bottom: 30px;
}

.carte-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.btn-itineraire {
    display: inline-block;
    text-align: center;
    margin-bottom: 20px;
}

/* --- PAGE CONTACT --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.avertissement-medical {
    background-color: #FFF3CD;
    border-left: 5px solid #FFC107;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    color: #856404;
    font-weight: 500;
}

.form-groupe {
    margin-bottom: 20px;
}

.form-groupe label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--bleu-marine);
}

.form-groupe input, .form-groupe textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-groupe input:focus, .form-groupe textarea:focus {
    outline: none;
    border-color: var(--bleu-celadon);
    box-shadow: 0 0 5px rgba(92, 131, 116, 0.3);
}

.btn-submit {
    width: 100%;
    cursor: pointer;
}

.coordonnees {
    background-color: #F8F9FA;
    padding: 30px;
    border-radius: 8px;
    border-top: 5px solid var(--bleu-marine);
}

.coordonnees h3 {
    color: var(--bleu-marine);
    margin-bottom: 15px;
}

.coordonnees p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Le "Honeypot" (pot de miel) : un champ invisible pour piéger les robots spammeurs */
.champ-cache {
    display: none;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* --- PAGE PROFESSIONNELS (Connexion) --- */
.login-container {
    max-width: 450px;
    margin: 50px auto;
    background-color: var(--blanc);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-top: 5px solid var(--bleu-marine);
    text-align: center;
}

.login-container h2 {
    color: var(--bleu-marine);
    margin-bottom: 10px;
}

.login-container p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 2px;
}

.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--bleu-celadon);
    box-shadow: 0 0 5px rgba(92, 131, 116, 0.3);
}

.msg-erreur {
    color: #D8000C;
    background-color: #FFBABA;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* =========================================
   FINITIONS UX / UI (Animations et Mobile)
   ========================================= */

/* 1. Optimisation de l'équipe sur très petits écrans (ex: iPhone SE) */
@media (max-width: 480px) {
    .equipe-grille {
        grid-template-columns: 1fr; /* Force 1 seule colonne au lieu de tasser */
        gap: 20px;
    }
    .photo-medecin, .photo-placeholder {
        width: 120px; /* Réduit un peu la taille de la bulle pour respirer */
        height: 120px;
    }
}

/* 2. Classes pour l'animation au défilement (Scroll) */
.anim-fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform; /* Optimisation pour les performances */
}

/* Classe ajoutée par le Javascript quand l'élément apparait à l'écran */
.anim-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}