/* ============================================
   BREAKPOINTS DE RÉFÉRENCE
   Desktop large : 1440px (base)
   Laptop        : max-width: 1024px
   Tablette      : max-width: 768px
   Mobile L      : max-width: 425px
   Mobile M      : max-width: 375px
   Mobile S      : max-width: 320px
   ============================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

.theme-services {
    background-image: url('/images/background_pine.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--pine);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / Nav */
.mj-nav {
    background-color: var(--pine);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
}

.mj-nav-logo img {
    height: 80px;
    width: auto;
    display: block;
}

.mj-nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.mj-nav-link {
    text-decoration: none;
    color: var(--craie);
    font-family: var(--soustitres);
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    overflow: hidden;
    height: 1.4em;
    display: inline-block;
}

.mj-nav-link-inner {
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease;
}

.mj-nav-link-inner span {
    display: block;
    line-height: 1.4em;
    color: inherit;
}

.mj-nav-link:hover .mj-nav-link-inner {
    transform: translateY(-1.4em);
    color: var(--aura);
}

.mj-nav-dropdown {
    position: relative;
}

.mj-nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: var(--craie);
    padding: 1rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.mj-nav-dropdown:hover .mj-nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mj-nav-dropdown-panel a {
    color: var(--winery);
    text-decoration: none;
    font-family: var(--paragraphes);
    font-size: 0.9rem;
    white-space: nowrap;
}

.mj-nav-dropdown-panel a:hover {
    color: var(--aura);
}

.mj-lang-switch {
    display: flex;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.mj-lang-switch a {
    display: inline-block;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    line-height: 0;
}

.mj-lang-switch a img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.mj-lang-switch a.active,
.mj-lang-switch a:hover {
    opacity: 1;
}

/* Corps de page */
.mj-section-body {
    flex: 1;
    padding: 3rem 2.5rem;
    color: var(--craie);
}

/* Footer */
.mj-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto auto; /* 3 lignes au lieu de 2 */
    align-items: center;
    row-gap: 0.75rem;
    column-gap: 1.5rem;
    padding: 1.5rem 2.5rem;
    background-color: var(--craie);
}

.mj-footer-nav {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.mj-footer-link {
    text-decoration: none;
    color: var(--winery);
    font-family: var(--soustitres);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mj-footer-link:hover {
    color: var(--aura);
}

/* Dropdown "Services" au survol */
.mj-footer-dropdown {
    position: relative;
}

.mj-footer-dropdown-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background-color: var(--craie);
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.12);
    z-index: 10;
    white-space: nowrap;
}

.mj-footer-dropdown:hover .mj-footer-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mj-footer-dropdown-panel a {
    color: var(--winery);
    text-decoration: none;
    font-family: var(--paragraphes);
    font-size: 0.85rem;
}

.mj-footer-dropdown-panel a:hover {
    color: var(--aura);
}

.mj-footer-socials {
    grid-column: 1;
    grid-row: 2;              /* nouvelle ligne, sous la nav */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin: 0;                /* retire le margin 1.5rem qui n'a plus lieu d'être */
}

.mj-footer-socials img {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.mj-footer-socials a:hover img {
    transform: scale(1.5);
}

/* Copyright */
.mj-footer-copyright {
    grid-column: 1;
    grid-row: 3;               /* passe de 2 à 3 */
    justify-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    text-align: left;
}

.mj-footer-copyright p {
    margin: 0;
    color: var(--pine);
    font-family: var(--paragraphes);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.mj-footer-credit {
    color: var(--aura);
    text-decoration: none;
    font-family: var(--paragraphes);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.mj-footer-credit:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Bouton CTA  */
.mj-footer-cta {
    grid-column: 3;
    grid-row: 1 / 4;            /* s'étend sur les 3 lignes maintenant */
    align-self: center;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--pine);
    color: var(--craie);
    text-decoration: none;
    font-family: var(--soustitres);
    font-size: 1rem;
    padding: 0.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
    white-space: nowrap;
}

.mj-footer-cta:hover {
    transform: translateX(3px);
}

.mj-footer-cta-arrow img {
    width: 14px;
    height: auto;
    display: block;
}

/* MEDIA QUERIES */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    .mj-nav {
        padding: 1rem 1.5rem;
    }
    .mj-nav-menu {
        gap: 1.75rem;
    }
    .mj-footer {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .mj-nav {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem;
    }
    .mj-nav-menu {
        gap: 1.25rem;
        flex-wrap: wrap;
        min-width: 0;
        row-gap: 0.5rem;
    }
    .mj-nav-logo img {
        height: 42px;
    }
    .mj-footer {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        justify-items: start;
        text-align: left;
    }
    .mj-footer-nav {
        grid-column: 1;
        grid-row: 1;
        justify-content: flex-start;
        flex-wrap: wrap;
        row-gap: 0.5rem;
        min-width: 0;
    }
    .mj-footer-socials {
        grid-column: 1;
        grid-row: 2;
        justify-content: flex-start;
    }
    .mj-footer-copyright {
        grid-column: 1;
        grid-row: 3;
        align-items: flex-start;
    }
    .mj-footer-cta {
        grid-column: 1;
        grid-row: 4;
        justify-self: start;
    }
}

@media (max-width: 425px) {
    .mj-nav-menu {
        gap: 1rem;
        font-size: 0.85rem;
    }
    .mj-nav-link {
        font-size: 0.85rem;
    }
    .mj-footer-nav {
        gap: 0.75rem;
        row-gap: 0.5rem;
    }
    .mj-footer-link {
        font-size: 0.75rem;
    }
}