/* --- Couleur --- */
:root {
    --primary-color: #4A7C59;
    --accent-color: #C6AD8F;
    --pastel-pink: rgba(255, 182, 193, 0.4);
    --bg-color: #f9fdfa;
    --card-bg: rgba(255, 255, 255, 0.45);
    --text-main: #333;
    --nav-bg: rgba(255, 255, 255, 0.55);
    --border-color: rgba(74, 124, 89, 0.12);
    --nav-pill-height: 48px;
}

[data-theme="dark"] {
    --primary-color: #8FBC8F;
    --bg-color: #1a1a1a;
    --card-bg: rgba(60, 60, 60, 0.45);
    --text-main: #e0e0e0;
    --nav-bg: rgba(30, 30, 30, 0.55);
    --border-color: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; transition: background 0.3s, color 0.3s, transform 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 10% 20%, var(--pastel-pink) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, var(--pastel-pink) 0%, transparent 30%);
    background-attachment: fixed;
    line-height: 1.6;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed; top: 20px;
    left: calc(50% - 30px); transform: translateX(-50%);
    width: min(90vw - 96px, 920px);
    background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 999px;
    height: var(--nav-pill-height);
    min-height: var(--nav-pill-height);
    padding: 0 35px;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.4);
    box-sizing: border-box;
}

.logo-container {
    height: 34px;
    display: flex;
    align-items: center;
    justify-self: start;
}
.logo-img { height: 100%; width: auto; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
    height: 100%;
}
.nav-links li {
    display: flex;
    align-items: center;
    height: 100%;
}
.nav-links a {
    text-decoration: none; color: var(--text-main);
    font-weight: 500; font-size: 0.9rem; text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 2px 2px;
    line-height: 1;
}
.nav-links a::after {
    content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background-color: var(--primary-color); transition: 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* --- BURGER (bouton flottant indépendant) --- */
.burger-btn {
    position: fixed; top: 20px;
    left: calc(50% - 30px + min(45vw - 48px, 460px) + 8px);
    width: var(--nav-pill-height);
    height: var(--nav-pill-height);
    background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    cursor: pointer; z-index: 1001;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px;
    padding: 0;
}

.burger-btn span {
    display: block;
    width: 20px; height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}

.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- MENU BURGER (dropdown glass indépendant) --- */
.burger-menu {
    position: fixed;
    top: calc(20px + var(--nav-pill-height) + 10px);
    left: calc(50% - 30px + min(45vw - 48px, 460px) + 56px);
    min-width: 220px;
    background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 10px;
    z-index: 1000;
    display: flex; flex-direction: column; gap: 6px;
    opacity: 0; transform: translate(-100%, -8px); pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.burger-menu.open {
    opacity: 1; transform: translate(-100%, 0); pointer-events: auto;
}

.theme-toggle {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: inherit; font-size: 0.85rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.04em;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.theme-toggle .theme-icon { font-size: 1rem; line-height: 1; }
.theme-toggle .theme-label { flex: 1; text-align: left; }

.burger-link {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.burger-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- LAYOUT & CARDS --- */
.container { max-width: 1000px; margin: 140px auto 60px; padding: 0 20px; }

.card {
    background: var(--card-bg); padding: 40px; border-radius: 25px;
    margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    animation: fadeIn 0.8s ease-out;
}

/* --- SECTION BIENVENUE (accueil) --- */
.welcome-section { text-align: center; }
.main-title { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--primary-color); margin: 10px 0; }
.subtitle { text-transform: uppercase; letter-spacing: 4px; font-size: 0.9rem; color: var(--accent-color); }
.role { font-style: italic; font-weight: 300; font-size: 1.1rem; opacity: 0.9; }
.divider { width: 50px; height: 2px; background: var(--accent-color); margin: 20px auto; }

/* --- GRILLE D'INFOS (PETITES CARTES) --- */
.info-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.small-card {
    width: 280px;
    flex: none;
    min-height: 380px;
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.small-card p {
    width: 100%;
    text-align: center;
}

.small-card .btn-rdv {
    margin-top: auto;
}

.small-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(74, 124, 89, 0.15);
    border-color: var(--primary-color);
}

.small-card .icon { font-size: 2.5rem; margin-bottom: 15px; display: block; }
.small-card h4 { 
    color: var(--primary-color); 
    font-family: 'Playfair Display', serif; 
    margin-bottom: 10px; 
    text-transform: uppercase;
}

/*lien de telechargement pdf*/

/* Ajout d'un effet au survol pour le bouton plein */
.btn-rdv:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
    filter: brightness(1.1);
}

/* --- LISTE DE CARTES (accueil) --- */
.card-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.card-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px 20px 20px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    animation: fadeIn 0.9s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-item h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-item p {
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.btn-more {
    align-self: flex-start;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 24px rgba(74, 124, 89, 0.16);
    border-color: var(--primary-color);
}

.btn-more:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- BOUTONS & FOOTER --- */
.action-area { text-align: center; margin: 30px 0 50px; }
.btn-rdv {
    display: inline-block; padding: 15px 50px; background: var(--primary-color);
    color: white; text-decoration: none; font-weight: bold; border-radius: 50px;
}

footer { text-align: center; padding: 40px 0; opacity: 0.7; font-weight: bold; }

/* --- PHOTO GRID (info.html) --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.photo-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    aspect-ratio: 4/3;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .container {
        margin-top: 110px; 
        padding: 0 15px;
    }

    .card {
        padding: 25px 20px; 
    }

    .main-title {
        font-size: 1.8rem; 
    }

    .navbar {
        height: var(--nav-pill-height);
        min-height: var(--nav-pill-height);
        padding: 0 20px;
        max-width: none;
        left: 16px;
        right: 88px;
        transform: none;
        width: auto;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .burger-btn {
        left: auto;
        right: 16px;
        width: var(--nav-pill-height);
        height: var(--nav-pill-height);
    }

    .burger-menu {
        top: calc(20px + var(--nav-pill-height) + 10px);
        left: auto;
        right: 16px;
        transform: translateY(-8px);
    }

    .burger-menu.open {
        transform: translateY(0);
    }
}

/* Mobiles (Portrait) */
@media (max-width: 480px) {
    :root {
        --nav-pill-height: 44px;
    }

    .logo-container {
        display: none;
    }

    .navbar {
        flex-direction: row;
        gap: 10px;
        border-radius: 999px;
        top: 10px;
        left: 16px;
        right: 80px;
        transform: none;
        max-width: none;
        width: auto;
        height: var(--nav-pill-height);
        min-height: var(--nav-pill-height);
        padding: 0 18px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.25);
    }

    [data-theme="dark"] .navbar {
        background: rgba(0, 0, 0, 0.45);
    }

    .nav-links {
        gap: 15px;
        padding: 0;
    }

    .burger-btn {
        top: 10px;
        right: 16px;
        left: auto;
        width: var(--nav-pill-height);
        height: var(--nav-pill-height);
    }

    .burger-menu {
        top: calc(10px + var(--nav-pill-height) + 8px);
        right: 16px;
        left: 16px;
        min-width: 0;
        transform: translateY(-8px);
    }

    .burger-menu.open {
        transform: translateY(0);
    }

    .info-grid {
        flex-direction: column;
        align-items: center;
    }

    .small-card {
        max-width: 100%;
        width: 100%;
        min-height: 280px;
    }

    .btn-rdv {
        width: 100%; 
        text-align: center;
    }
    
    .card-list {
        margin-top: 20px;
    }

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

/* --- CAROUSEL MOBILE --- */
@media (max-width: 768px) {
    .photo-grid {
        display: block;
        position: relative;
        overflow: hidden;
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        margin: 40px 0;
        aspect-ratio: 4/3;
    }

    .photo-grid .photo-item {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        border-radius: 0;
        box-shadow: none;
        opacity: 0;
        transition: opacity 0.5s ease;
        pointer-events: none;
    }

    .photo-grid .photo-item.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Dots */
    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
    }

    .carousel-dot {
        width: 7px; height: 7px;
        border-radius: 999px;
        background: var(--border-color);
        border: 1px solid var(--primary-color);
        transition: background 0.3s, width 0.3s;
        cursor: pointer;
    }

    .carousel-dot.active {
        background: var(--primary-color);
        width: 20px;
    }

    /* Flèches */
    .carousel-prev,
    .carousel-next {
        position: absolute;
        top: 50%; transform: translateY(-50%);
        background: rgba(255,255,255,0.35);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.5);
        border-radius: 999px;
        width: 36px; height: 36px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        z-index: 10;
        color: var(--primary-color);
        font-size: 1rem;
        transition: background 0.2s;
    }

    [data-theme="dark"] .carousel-prev,
    [data-theme="dark"] .carousel-next {
        background: rgba(0,0,0,0.35);
    }

    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }

    .carousel-prev:hover,
    .carousel-next:hover {
        background: var(--primary-color);
        color: #fff;
    }
}

/* Cacher les dots sur desktop */
@media (min-width: 769px) {
    .carousel-dots { display: none; }
    .carousel-prev, .carousel-next { display: none; }
}