/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    --primary: #889E81;      /* Vert Sauge - Apaisant */
    --accent: #D4A373;       /* Sable/Doré - Chaleureux */
    --dark: #2C3639;         /* Anthracite doux */
    --light: #FDFCFB;        /* Blanc cassé / Lin */
    --white: #ffffff;
    --shadow: 0 12px 40px rgba(0,0,0,0.04);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

/* =========================================
   2. HEADER, NAVIGATION & BURGER
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    box-shadow: 0 2px 20px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li { margin-left: 35px; }

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

nav ul li a:hover { color: var(--primary); }
nav ul li a:hover::after { width: 100%; }

/* --- LE MENU BURGER (Caché sur PC) --- */
.menu-burger {
    display: none; /* Masqué sur ordinateur */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-burger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-burger.active span:nth-child(2) { opacity: 0; }
.menu-burger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                url('https://images.unsplash.com/photo-1540555700478-4be289fbecef?w=1200');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto; margin-right: auto;
    font-weight: 300;
}

/* =========================================
   4. COMPOSANTS (BOUTONS & CARTES)
   ========================================= */
.btn, .btn-main {
    background: var(--primary); color: white;
    padding: 14px 35px; border-radius: 50px;
    text-decoration: none; display: inline-block;
    transition: var(--transition); border: none;
    font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 15px rgba(136, 158, 129, 0.3);
}

.btn:hover, .btn-main:hover {
    background: var(--accent); transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 163, 115, 0.4);
}

.btn-outline {
    border: 1.5px solid var(--primary); color: var(--primary);
    padding: 10px 25px; border-radius: 50px;
    text-decoration: none; font-size: 0.9rem; font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover { background: var(--primary); color: white; }

.glass-card {
    background: var(--white); padding: 40px;
    border-radius: 20px; box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
}

/* =========================================
   5. GRILLE EQUIPE (INDEX)
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 100px 5%; }

.section-title {
    text-align: center; font-size: 3rem; margin-bottom: 60px; position: relative;
}

.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: var(--accent); margin: 20px auto 0;
}

.grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px;
}

.card {
    background: var(--white); border-radius: 25px; overflow: hidden;
    transition: var(--transition); box-shadow: var(--shadow);
}

.card:hover { transform: translateY(-15px); }
.card-img { height: 350px; background-size: cover; background-position: center; transition: var(--transition); }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 30px; text-align: center; }

.specialite {
    color: var(--accent); text-transform: uppercase; font-size: 0.8rem;
    letter-spacing: 2px; font-weight: 700; margin-bottom: 10px; display: block;
}

/* =========================================
   6. PAGE PROFIL & CONTACT (DESKTOP)
   ========================================= */
.back-link {
    text-decoration: none; color: var(--primary); font-weight: 600;
    display: inline-block; margin-bottom: 40px; transition: var(--transition);
}

.back-link:hover { transform: translateX(-5px); }

.page-profil { padding-top: 60px; max-width: 1100px; }

.profil-wrapper {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; margin-top: 40px;
}

.profil-visual { position: relative; padding: 20px; height: fit-content; }
.image-frame { position: relative; z-index: 2; }
.image-frame img {
    width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; border-radius: 30px; display: block; box-shadow: var(--shadow);
}

.profil-visual::before {
    content: ""; position: absolute; top: 40px; left: 0; width: 100%; height: 100%;
    border: 1.5px solid var(--accent); border-radius: 30px; z-index: 1;
}

.job-badge { color: var(--accent); font-weight: 600; letter-spacing: 3px; font-size: 0.85rem; }
.praticien-name { font-size: 4rem; margin: 10px 0 30px; color: var(--dark); }

.bio-card { background: white; padding: 40px; border-radius: 25px; box-shadow: 0 20px 60px rgba(0,0,0,0.03); }
.description { font-size: 1.2rem; color: #555; margin-bottom: 20px; }
.sub-description { font-size: 1rem; color: #888; line-height: 1.8; }
.cta-wrapper { margin-top: 40px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }

input, textarea, select {
    width: 100%; padding: 18px; margin-bottom: 20px;
    border: 1px solid #eee; border-radius: 12px; background: #fcfcfc;
    font-family: inherit; transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--primary); background: white;
    box-shadow: 0 0 0 4px rgba(136, 158, 129, 0.1);
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background: var(--dark); color: white; padding: 80px 5% 40px; margin-top: 100px;
}

.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-content h3 { font-size: 2rem; margin-bottom: 20px; }

/* =========================================
   8. BOUTON RETOUR EN HAUT (DESKTOP)
   ========================================= */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    
    /* Caché par défaut */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--accent);
    transform: translateY(-5px);
}

/* =========================================
   9. RESPONSIVE (MOBILES & TABLETTES UNIFIÉ)
   ========================================= */

/* --- TABLETTES & PETITS ÉCRANS PC (Moins de 1100px) --- */
@media (max-width: 1100px) {
    .profil-wrapper, .profil-grid, .contact-grid {
        grid-template-columns: 1fr; gap: 40px;
    }
    .profil-visual { max-width: 450px; margin: 0 auto; }
}

/* --- SMARTPHONES (Moins de 768px) --- */
@media (max-width: 768px) {
    /* Menu & Navigation Mobile */
    header { padding: 15px 5%; }
    .menu-burger { display: flex; } /* Affiche le burger */
    
    nav ul { 
        position: absolute; top: 100%; left: 0; width: 100%;
        background: rgba(255, 255, 255, 0.98); flex-direction: column;
        padding: 0; max-height: 0; overflow: hidden;
        transition: max-height 0.4s ease-out; box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    nav ul.active { max-height: 300px; padding: 20px 0; }
    nav ul li { margin: 15px 0; text-align: center; }

    /* Accueil Mobile */
    .hero { height: 60vh; }
    .hero-content h1 { font-size: 2.2rem; }
    .section-title { font-size: 2rem; margin-bottom: 40px; }
    .container { padding: 50px 5%; }

    /* Page Profil Mobile - Version Épurée */
    .page-profil { padding-top: 10px; }
    .profil-wrapper { gap: 20px; margin-top: 10px; }
    .profil-visual { padding: 0; }
    .profil-visual::before { display: none; } /* Suppression du cadre décalé sur mobile */
    
    .image-frame img {
        height: auto; aspect-ratio: 4/5; border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .praticien-name { font-size: 2.4rem; margin-bottom: 10px; text-align: center; }
    .job-badge { text-align: center; display: block; margin-bottom: 10px; }
    
    .bio-card { padding: 20px 10px; box-shadow: none; background: transparent; text-align: center; }
    .description { font-size: 1.05rem; }
    .cta-wrapper { display: flex; justify-content: center; }
    .btn-main { width: 100%; padding: 18px; text-align: center; }

    /* Ajustement du bouton retour en haut pour Mobile */
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}