@font-face {
    font-display: swap;
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: local('Montserrat'), url('../font/montserrat-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    src: local('Montserrat'), url('../font/montserrat-600.woff2') format('woff2');
}

html {
    font-family: 'Montserrat', sans-serif;
    font-size: 62.5%;
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    box-sizing: border-box;
    color: #1a1a1a;
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

:focus-visible {
    outline: 3px solid #FFC107;
    outline-offset: 2px;
}

body.overlay {
    overflow: hidden;
}

body.overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Header */
.header-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .8rem 1.6rem;
    box-sizing: border-box;
    z-index: 1000;
    background: rgba(58, 58, 58, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.header-menu.scrolled {
    background: linear-gradient(135deg, rgba(58, 58, 58, 0.95) 0%, rgba(90, 90, 90, 0.95) 50%, rgba(58, 58, 58, 0.95) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-menu a#btnMenu {
    color: #ffffff;
    display: inline-block;
    height: 2.5rem;
    vertical-align: middle;
    width: 2.5rem;
}

.header-menu a#btnMenu img {
    height: 2.5rem;
    width: 2.5rem;
}

.header-menu #logo {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    width: calc(100% - 4.8rem);
}

.header-menu #logo a {
    color: #ffffff;
    display: inline-block;
    height: 100%;
    text-decoration: none;
    vertical-align: middle;
}

.header-menu nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 40rem;
    height: 100vh;
    z-index: 999;
    transition: left 0.3s ease;
}

.header-menu nav.actif {
    left: 0;
}

.header-menu nav.inactif {
    left: -100%;
}

.header-menu #btnMenu,
.header-menu #logo {
    position: relative;
    z-index: 997;
}

.header-menu nav div.flex {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.header-menu nav a {
    color: #ffffff;
    margin: 1em 0;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

@media (min-width: 1280px) {
    .header-menu nav a.nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 3px;
        bottom: 0;
        left: 50%;
        background-color: #8BC34A;
        transition: all 0.3s ease;
        transform: translateX(-50%);
        border-radius: 2px;
    }

    .header-menu nav a.nav-link:hover::after {
        width: 100%;
    }
}

.header-menu nav #fermerMenu {
    color: #fff;
    display: inline-block;
    height: 25px;
    margin: .8em;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    width: 25px;
}

.header-menu nav #fermerMenu img {
    height: 25px;
    width: 25px;
}

.header-menu #logoNav>a {
    text-decoration: none;
}

.header-menu #logoNav img {
    display: inline-block;
    height: 45px;
    vertical-align: middle;
    width: 64px;
}

.header-menu #logo span,
.header-menu #logoNav span {
    color: #ffffff;
    display: inline-block;
    font-weight: 600;
    vertical-align: middle;
}

.header-menu nav ul {
    margin: 1.6rem 0 0 1.6rem;
    padding: 0;
}

.header-menu nav a.btn-client-area {
    background-color: #2E7D32;
    color: #ffffff;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
    transition: all 0.3s ease;
}

.header-menu nav a.btn-client-area svg {
    flex-shrink: 0;
}

.header-menu nav a.btn-client-area:hover {
    background-color: #1B5E20;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.6);
}

/* Global */

*:focus-visible {
    outline: 3px solid #8BC34A;
    outline-offset: 2px;
}

.center {
    text-align: center;
}

strong {
    color: #1B5E20;
    font-weight: 600;
}

section {
    background-color: #ffffff;
    line-height: 2.4rem;
    margin: auto;
    max-width: 1400px;
    overflow: hidden;
    padding: 3.2rem 0;
}

section.boxMisEnAvant {
    align-items: center;
    background: linear-gradient(135deg, #3a3a3a 0%, #5a5a5a 50%, #3a3a3a 100%);
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

section#bloc-impots,
section#bloc-impots article {
    padding: 0;
}

section#presentation {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../img/cours-collectifs.webp');
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 12rem 1.6rem 3.2rem 1.6rem;
    /* Top padding to offset fixed header */
    max-width: none;
    width: calc(100% - 3.2rem);
}

section#presentation .flex {
    gap: 4.8rem;
}

section article {
    padding: 1.6rem;
}

section article h2 {
    margin-top: 0;
}

section#presentation article h1 {
    line-height: 4rem;
}

section#presentation article h2 {
    line-height: 3.2rem;
}

section.boxMisEnAvant article {
    color: #ffffff;
}

section.boxMisEnAvant article h3 {
    margin-top: 0;
}

section.boxMisEnAvant article strong {
    color: #9EE19C;
}

section article ol,
section article ul {
    margin: 0 0 0 1.6rem;
    padding: 0;
}

section article ol li,
section article ul li {
    margin: 1.6rem 0;
}

section article .boxImage {
    flex-flow: column-reverse;
}

section .boxImage img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top;
    max-width: 345px;
    width: 100%;
}

section#bloc-impots .boxImage img {
    aspect-ratio: inherit;
    margin-bottom: 1.6rem;
}

section#bloc-impots .boxImage div:first-child {
    text-align: center;
}

section#bloc-impots .boxImage div:last-child {
    padding: 1.6rem;
}

/* Card */

.blocCard {
    display: flex;
    flex-wrap: wrap;
    gap: 3.2rem;
    justify-content: center;
    width: 100%;
}

.blocCard.cardContact img {
    height: 4.8rem;
    margin: 0 auto 1.6rem auto;
    width: 4.8rem;
}

.blocCard .card {
    background-color: #F1F8F4;
    border: .2rem solid #2E7D32;
    border-radius: .8rem;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 330px;
    overflow: hidden;
    padding: 1.6rem;
    position: relative;
    width: 100%;
}

.blocCard.cardContact .card {
    background-color: #F1F8F4;
    border-color: #F1F8F4;
    color: #1a1a1a;
    font-weight: 600;
    max-width: 200px;
    text-decoration: none;
}

.blocCard.cardContact .card:hover,
.blocCard.cardContact .card:focus,
.blocCard.cardContact .card:focus-visible {
    border-color: #2E7D32;
}

.btnAction {
    background-color: #2E7D32;
    color: #ffffff;
    border: 2px solid #2E7D32;
    border-radius: .4rem;
    display: flex;
    font-weight: 600;
    justify-content: center;
    margin: auto;
    max-width: 150px;
    padding: 1.6rem;
    text-decoration: none;
}

.btnAction:hover,
.btnAction:focus,
.btnAction:focus-visible,
.btnAction:visited {
    background-color: #1B5E20;
}

.blocCard .card h3 {
    text-align: center;
    margin-bottom: 0;
}

.blocCard .card .visuelCard {
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    object-position: center;
}

.blocCard .card .visuelCard img {
    max-width: 330px;
    width: 100%;
}

/* Photos */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3.2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: .8rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item a {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item a:hover img {
    transform: scale(1.15);
}

.gallery-item a:before {
    content: '';
    position: absolute;
    inset: 0;
    background: #8BC34A;
    opacity: 0;
    z-index: 1;
}

.gallery-item a:hover:before {
    opacity: .7;
}

.gallery-item a:hover:after {
    background: url('/img/icone-loupe.png') no-repeat center center;
    content: '';
    height: 3.2rem;
    left: calc(50% - 1.6rem);
    position: absolute;
    top: calc(50% - 1.6rem);
    width: 3.2rem;
    z-index: 2;
}


/* Lightbox CSS pur */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s, z-index 0s 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox:target {
    opacity: 1;
    z-index: 9999;
    transition: opacity 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox:target .lightbox-content {
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #8BC34A;
    color: #1a1a1a;
    border-radius: 50%;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    background: #7CB342;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(139, 195, 74, 0.9);
    color: #1a1a1a;
    border-radius: 50%;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
}

.lightbox-nav:hover {
    background: #8BC34A;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem 2rem;
    border-radius: .8rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 2.4rem;
    }

    .lightbox-close {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 1.5em;
        top: 1rem;
        right: 1rem;
    }

    .lightbox-nav {
        width: 5rem;
        height: 5rem;
        font-size: 1.5em;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}

/* Footer */
footer {
    background: linear-gradient(135deg, #3a3a3a 0%, #5a5a5a 50%, #3a3a3a 100%);
    padding: 1.6rem 0 .8rem 0;
    text-align: center;
}

footer a {
    color: #ffffff;
    text-underline-offset: .2rem;
}

footer #logo-footer {
    padding: 0 .8rem;
}

footer ul {
    margin: 0;
    padding: 0;
}

footer ul li {
    list-style: none;
    margin-right: 1.6rem;
    padding: 1.6rem 0;
}

footer #rs {
    margin: 1.6rem;
}

footer #rs a {
    text-decoration: none;
}

footer #rs img {
    margin: 0 1.6rem;
    height: 3.2rem;
    width: 3.2rem;
}

footer #liensMentions {
    color: #ffffff;
    margin: 1.6rem 0;
    text-align: center;
}

footer #liensMentions a {
    color: #ffffff;
    display: block;
}

@media (min-width: 768px) {
    .header-menu {
        align-items: center;
        display: flex;
        justify-content: flex-start;
    }

    .header-menu nav {
        height: 100vh;
        max-width: 40rem;
    }

    .header-menu #logoNav img,
    footer #logo-footer img {
        height: 100px;
        width: 142px;
    }

    .header-menu #logoNav span {
        line-height: 2.4rem;
        margin-left: 1.6rem;
    }

    .flex {
        align-items: center;
        display: flex;
        justify-content: center;
    }

    section#presentation .flex {
        gap: 4.8rem;
        /* Original gap */
    }

    section#presentation article {
        padding: 0;
    }

    section#presentation article h3 {
        margin-bottom: 0;
    }

    section article h2 {
        margin-bottom: 2.4rem;
    }

    .blocCard {
        justify-content: flex-start;
    }

    section article .boxImage {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        flex-flow: row;
    }

    section#bloc-impots .boxImage img {
        margin-bottom: 0;
    }

    section.boxMisEnAvant article .boxImage {
        align-items: center;
    }

    section .boxImage img {
        aspect-ratio: inherit;
        display: block;
        max-width: none;
        width: 400px;
    }

    section article .boxImage>div:first-child {
        margin-right: 3.2rem;
    }

    .blocAvis {
        justify-content: flex-start;
    }

    section article>#me-contacter {
        justify-content: space-evenly;
        margin: 1em 0;
    }

    section article>#me-contacter>div>img,
    section article>#me-contacter>div>h3,
    section article>#me-contacter>div>span {
        display: block;
        text-align: center;
    }

    section article>#me-contacter img {
        margin: 0 auto 1em auto;
    }

    section article #imgFooter img {
        width: 50%;
    }

    footer {
        padding: 1em 0;
    }

    footer #liensMentions a {
        margin: 1.6rem;
    }
}

@media (max-width: 1280px) {
    .header-menu nav {
        transform: translate3d(-100%, 0, 0);
        -webkit-transform: translate3d(-100%, 0, 0);
        -webkit-transition: -webkit-transform .4s;
        transition: transform .4s;
    }

    .header-menu nav.inactif {
        overflow: visible;
        z-index: -1;
    }

    .header-menu nav.actif {
        background: linear-gradient(135deg, #3a3a3a 0%, #5a5a5a 50%, #3a3a3a 100%);
        padding: 1.6rem;
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        overflow-y: auto;
        width: calc(100% - 3.2rem);
    }
}

@media (min-width: 1280px) {
    .header-menu {
        position: fixed;
        justify-content: space-around;
    }

    .header-menu #logo {
        text-align: left;
        width: auto;
    }

    .header-menu nav {
        height: auto;
        position: relative;
        top: unset;
        max-width: initial;
        width: auto;
    }

    .header-menu nav.inactif {
        left: 0;
    }

    .header-menu nav ul {
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 2.5rem;
    }

    .header-menu nav li {
        list-style: none;
        vertical-align: middle;
    }

    .header-menu a#btnMenu,
    .header-menu nav #fermerMenu {
        display: none;
    }

    .header-menu #logoNav {
        display: block;
        margin-right: 2rem;
    }

    section#presentation {
        padding-bottom: 4.8rem;
        padding-top: 18rem;
        /* Offset for larger desktop header */
    }

    .blocCard {
        justify-content: space-between;
    }

    .blocCard.cardContact {
        justify-content: flex-start;
    }

    footer ul {
        margin: 0 0 0 1.5em;
        padding: 0 0 0 1em;
    }
}