/* =========================================
   YourMariage — MENU V4
   ========================================= */

:root {
    --ym-bg: #fbf8f2;
    --ym-text: #111713;
    --ym-green: #073a33;
    --ym-green-hover: #052d28;
    --ym-line: rgba(17, 23, 19, .10);
    --ym-container: 1660px;
    --ym-green-soft: #68b3a4;
    --ym-nav-font: "Cormorant Garamond", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--ym-bg);
    color: var(--ym-text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font: inherit;
}

/* HEADER */

.ym-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: var(--ym-bg);
    border-top: 1px solid rgba(0, 0, 0, .22);
    border-bottom: 1px solid var(--ym-line);
}

.ym-header__inner {
    width: min(var(--ym-container), calc(100% - 96px));
    height: 82px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto minmax(310px, 1fr);
    align-items: center;
    gap: 32px;
}

/* LOGO */

.ym-brand {
    justify-self: start;
    display: flex;
    align-items: center;
    height: 100%;
}

.ym-brand__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 305px;
    max-height: 48px;
    object-fit: contain;
}

/* NAVIGATION */

.ym-nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 100%;
    gap: 46px;
    white-space: nowrap;
}

.ym-nav a {
    position: relative;
    display: flex;
    align-items: center;
    height: 82px;
    padding: 0;
    font-family: var(--ym-nav-font);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    transition: color .2s ease;
}

.ym-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 0;
    height: 2px;
    background: var(--ym-green);
    transform: translateX(-50%);
    transition: width .25s ease;
}

.ym-nav a:hover {
    color: var(--ym-green);
}

.ym-nav a:hover::after {
    width: 100%;
}

/* ACTIONS */

.ym-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 13px;
}

.ym-icon-btn {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.ym-icon-btn:hover {
    color: var(--ym-green);
    transform: translateY(-1px);
}

.ym-icon-btn svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* CTA : le style visuel est centralisé dans css/buttons.css */

.ym-actions > .ym-btn-primary {
    margin-left: 38px;
    min-width: 172px;
}

/* BURGER */

.ym-burger {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.ym-burger span {
    display: block;
    width: 23px;
    height: 1px;
    margin: 5px auto;
    background: var(--ym-green);
}

/* MOBILE NAV */

.ym-mobile-nav {
    display: none;
}

/* Responsive intermédiaire */

@media (max-width: 1320px) {
    .ym-header__inner {
        width: calc(100% - 52px);
        grid-template-columns: auto 1fr auto;
        gap: 28px;
    }

    .ym-nav {
        gap: 25px;
    }

    .ym-nav a {
        font-size: 16.5px;
    }

    .ym-brand__logo {
        max-width: 275px;
        max-height: 44px;
    }
    .ym-actions > .ym-btn-primary {
        min-width: 164px;
    }
}

/* Tablette / mobile */

@media (max-width: 1020px) {
    .ym-header__inner {
        width: calc(100% - 30px);
        height: 68px;
        grid-template-columns: 1fr auto;
    }

    .ym-brand__logo {
        max-width: 220px;
        max-height: 40px;
    }

    .ym-nav,
    .ym-actions > .ym-btn-primary,
    .ym-hide-mobile {
        display: none;
    }

    .ym-burger {
        display: block;
    }

    .ym-mobile-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 18px 22px 25px;
        background: var(--ym-bg);
        border-top: 1px solid var(--ym-line);
        box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
    }

    .ym-header.is-open .ym-mobile-nav {
        display: flex;
        flex-direction: column;
    }

    .ym-mobile-nav > a:not(.ym-btn-primary) {
        padding: 15px 3px;
        border-bottom: 1px solid var(--ym-line);
        font-family: var(--ym-nav-font);
        font-size: 19px;
        font-weight: 500;
        line-height: 1.15;
        letter-spacing: -.012em;
    }
    .ym-mobile-nav .ym-btn-primary {
        margin-top: 14px;
        width: 100%;
    }
}
