:root {
    --yamm-country-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --yamm-country-line: rgba(17, 17, 17, .13);
    --yamm-country-muted: rgba(17, 17, 17, .56);
    --yamm-country-ease: cubic-bezier(.22, .7, .25, 1);
}

html.yamm-country-is-open,
body.yamm-country-is-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* Déclencheur commun : footer bureau et mobile. */
.yamm-country-footer-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    text-align: inherit;
}

.yamm-country-footer-trigger:hover,
.yamm-country-footer-trigger:focus-visible {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.yamm-country-footer-trigger:focus-visible {
    outline: 1px solid #111;
    outline-offset: 4px;
}

.yamm-country-footer-trigger__value {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.yamm-country-pin {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yamm-country-chevron {
    display: block;
    width: 10px;
    height: 7px;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Ligne légale Divi bureau : un vrai bouton et le lien confidentialité. */
.yamm-footer-legal-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin: 0 !important;
}

.yamm-footer-legal-row > a {
    flex: 0 0 auto;
}

@media (max-width: 980px) {
    .yamm-footer-legal-row {
        display: none !important;
    }

    .yamm-country-footer-trigger--mobile {
        font: 400 14px/1.2 var(--yamm-country-font);
    }
}

/* Sélecteur utilisé dans l'inscription et le canvas connecté. */
.yamm-account-country-field {
    display: grid;
    gap: 7px;
    width: 100%;
    margin: 0;
}

.yamm-account-country-field__label {
    color: #111;
    font: 500 13px/1.35 var(--yamm-country-font);
}

.yamm-account-country-select {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid rgba(17, 17, 17, .20);
    border-radius: 0;
    background: #fff;
    color: #111;
    cursor: pointer;
    font: 400 15px/1.25 var(--yamm-country-font);
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.yamm-account-country-select:hover {
    border-color: rgba(17, 17, 17, .55);
    background: #fcfcfc;
}

.yamm-account-country-select:focus-visible {
    outline: 0;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .07);
}

.yamm-account-country-select__main,
.yamm-account-country-select__side {
    display: inline-flex;
    align-items: center;
}

.yamm-account-country-select__main {
    gap: 10px;
    min-width: 0;
}

.yamm-account-country-select__side {
    gap: 11px;
    flex: 0 0 auto;
    color: rgba(17, 17, 17, .52);
    font-size: 12px;
    letter-spacing: .08em;
}

/* Bloc connecté placé en dur juste avant la déconnexion. */
#yamm-account-overlay .yamm-logout-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}

#yamm-account-overlay .yamm-logout-wrapper > .yamm-account-country-field {
    width: 100%;
}

#yamm-account-overlay .yamm-logout-wrapper > .yamm-logout-button {
    flex: 0 0 auto;
}

/*
 * Dialogue natif : placé dans la top layer du navigateur.
 * Il reste donc devant les CTA fixes et galeries des fiches produit,
 * même lorsque ces composants utilisent déjà le z-index maximal.
 */
dialog.yamm-country-dialog {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
    font-family: var(--yamm-country-font);
    color: #111;
}

dialog.yamm-country-dialog::backdrop {
    background: transparent;
}

.yamm-country-dialog[hidden] {
    display: none !important;
}

.yamm-country-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .34);
    opacity: 0;
    backdrop-filter: blur(6px);
    transition: opacity .22s ease;
}

.yamm-country-dialog__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: min(1440px, 100vw);
    height: min(900px, 100dvh);
    max-height: 100dvh;
    overflow: hidden;
    background: #fff;
    opacity: 0;
    transform: translateY(12px) scale(.995);
    transition: opacity .22s ease, transform .28s var(--yamm-country-ease);
}

.yamm-country-dialog.is-open .yamm-country-dialog__backdrop {
    opacity: 1;
}

.yamm-country-dialog.is-open .yamm-country-dialog__panel {
    opacity: 1;
    transform: none;
}

.yamm-country-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 94px;
    padding: 26px clamp(28px, 4vw, 64px);
    border-bottom: 1px solid var(--yamm-country-line);
}

.yamm-country-dialog__header h2 {
    margin: 0;
    color: #111;
    font-family: "Intrepid", "Nicolas Cochin", Georgia, serif;
    font-size: clamp(27px, 2.2vw, 38px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: .004em;
}

.yamm-country-dialog__close {
    appearance: none;
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.yamm-country-dialog__close:hover,
.yamm-country-dialog__close:focus-visible {
    background: #f4f4f4;
    outline: 0;
}

.yamm-country-dialog__close span::before,
.yamm-country-dialog__close span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 23px;
    height: 1.5px;
    background: #111;
}

.yamm-country-dialog__close span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.yamm-country-dialog__close span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.yamm-country-dialog__toolbar {
    display: flex;
    justify-content: center;
    padding: 28px clamp(28px, 4vw, 64px) 22px;
}

.yamm-country-search {
    display: flex;
    align-items: center;
    gap: 13px;
    width: min(620px, 100%);
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(17, 17, 17, .45);
    border-radius: 999px;
    background: #fff;
}

.yamm-country-search:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

.yamm-country-search svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    stroke: #111;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.yamm-country-search input {
    width: 100%;
    height: 52px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #111;
    font: 400 16px/1.25 var(--yamm-country-font);
}

.yamm-country-search input::placeholder {
    color: rgba(17, 17, 17, .43);
}

.yamm-country-dialog__body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    gap: 0;
    padding: 0 clamp(28px, 4vw, 64px) 48px;
}

.yamm-country-group {
    min-width: 0;
    padding: 20px clamp(18px, 2vw, 34px) 28px;
    border-left: 1px solid var(--yamm-country-line);
}

.yamm-country-group:nth-child(4n + 1) {
    border-left: 0;
}

.yamm-country-group h3 {
    margin: 0 0 18px;
    color: #111;
    font-family: "Intrepid", "Nicolas Cochin", Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
}

.yamm-country-group__list {
    display: grid;
    gap: 2px;
}

.yamm-country-option {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #111;
    cursor: pointer;
    font: 400 15px/1.35 var(--yamm-country-font);
    text-align: left;
    transition: background .14s ease;
}

.yamm-country-option:hover,
.yamm-country-option:focus-visible {
    background: #f5f5f3;
    outline: 0;
}

.yamm-country-option.is-current {
    background: #f1f1ef;
}

.yamm-country-option__label {
    min-width: 0;
}

.yamm-country-option__suffix {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.yamm-country-option__code {
    color: rgba(17, 17, 17, .50);
    font-size: 12px;
    letter-spacing: .08em;
}

.yamm-country-option__check {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.yamm-country-dialog__empty {
    grid-column: 1 / -1;
    margin: 42px 0;
    color: var(--yamm-country-muted);
    text-align: center;
}

.yamm-country-dialog__feedback {
    display: none;
    min-height: 44px;
    padding: 12px 28px;
    border-top: 1px solid var(--yamm-country-line);
    background: #fff;
    font: 400 13px/1.4 var(--yamm-country-font);
    text-align: center;
}

.yamm-country-dialog__feedback.is-visible {
    display: block;
}

.yamm-country-dialog__feedback.is-error {
    color: #741b1b;
    background: #fff8f8;
}

.yamm-country-transition {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, .96);
    color: #111;
    opacity: 0;
    pointer-events: none;
    font: 400 14px/1.4 var(--yamm-country-font);
    transition: opacity .18s ease;
}

.yamm-country-transition[hidden] {
    display: none !important;
}

.yamm-country-transition.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.yamm-country-transition__spinner {
    width: 30px;
    height: 30px;
    border: 1.5px solid rgba(17, 17, 17, .18);
    border-top-color: #111;
    border-radius: 50%;
    animation: yammCountrySpin .72s linear infinite;
}

@keyframes yammCountrySpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .yamm-country-dialog__body {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .yamm-country-group:nth-child(4n + 1) {
        border-left: 1px solid var(--yamm-country-line);
    }
    .yamm-country-group:nth-child(3n + 1) {
        border-left: 0;
    }
}

@media (max-width: 760px) {
    .yamm-country-dialog {
        display: block;
    }

    .yamm-country-dialog__backdrop {
        display: none;
    }

    .yamm-country-dialog__panel {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        transform: translateY(18px);
    }

    .yamm-country-dialog__header {
        min-height: 0;
        padding: max(22px, env(safe-area-inset-top)) 24px 20px;
    }

    .yamm-country-dialog__header h2 {
        max-width: calc(100% - 54px);
        font-size: 27px;
    }

    .yamm-country-dialog__close {
        width: 38px;
        height: 38px;
    }

    .yamm-country-dialog__toolbar {
        padding: 24px 24px 18px;
    }

    .yamm-country-search {
        min-height: 52px;
    }

    .yamm-country-dialog__body {
        display: block;
        min-height: 0;
        padding: 0 24px max(34px, env(safe-area-inset-bottom));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .yamm-country-group,
    .yamm-country-group:nth-child(n) {
        padding: 24px 0 22px;
        border-left: 0;
        border-top: 1px solid var(--yamm-country-line);
    }

    .yamm-country-group:first-child {
        border-top: 0;
    }

    .yamm-country-group h3 {
        margin-bottom: 12px;
        font-size: 22px;
    }

    .yamm-country-option {
        min-height: 58px;
        padding: 12px 8px;
        font-size: 16px;
    }

    .yamm-country-dialog__feedback {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .yamm-country-dialog__backdrop,
    .yamm-country-dialog__panel,
    .yamm-country-transition,
    .yamm-country-transition__spinner {
        transition: none !important;
        animation: none !important;
    }
}

/* ========================================================================== 
   Footer Maison YAMM — selectors sémantiques, indépendants des numéros Divi
   ========================================================================== */
.et-l--footer .yamm-footer-brand,
.et-l--footer .yamm-footer-brand a,
.et-l--footer .yamm-footer-geneve,
.et-l--footer .yamm-footer-geneve a {
    font-family: "NicolasCochin-regula", "NicolasCochin-Regular", "Nicolas Cochin TT", "Nicolas Cochin", "Cochin", "Bodoni 72", "Didot", "Times New Roman", serif !important;
    font-weight: 400 !important;
    font-synthesis: none !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    color: #000000 !important;
}

.et-l--footer .yamm-footer-brand,
.et-l--footer .yamm-footer-geneve {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.et-l--footer .yamm-footer-brand,
.et-l--footer .yamm-footer-brand a {
    font-size: clamp(28px, 2.2vw, 37px) !important;
    line-height: .88 !important;
    letter-spacing: .055em !important;
}

.et-l--footer .yamm-footer-geneve,
.et-l--footer .yamm-footer-geneve a {
    font-size: 11px !important;
    line-height: 1 !important;
    letter-spacing: .27em !important;
}

@media (min-width: 981px) {
    .et-l--footer .yamm-footer-geneve {
        margin-top: 5px !important;
    }

    /* Une seule ligne légale parfaitement centrée verticalement. */
    .et-l--footer .et_pb_row_3_tb_footer {
        display: flex !important;
        align-items: center !important;
    }

    .et-l--footer .et_pb_row_3_tb_footer > .et_pb_column {
        display: flex !important;
        align-items: center !important;
        min-height: 34px !important;
    }

    .et-l--footer .et_pb_row_3_tb_footer .et_pb_text,
    .et-l--footer .et_pb_row_3_tb_footer .et_pb_text_inner,
    .et-l--footer .et_pb_row_3_tb_footer h5 {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .et-l--footer .et_pb_row_3_tb_footer h5 > br,
    .et-l--footer .yamm-footer-country-slot br,
    .et-l--footer .yamm-footer-privacy-slot br {
        display: none !important;
    }

    .et-l--footer .yamm-footer-country-slot {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        white-space: nowrap !important;
    }

    .et-l--footer .yamm-footer-privacy-slot {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        white-space: nowrap !important;
    }

    .et-l--footer .yamm-country-footer-trigger--desktop {
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 7px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 980px) {
    .et-l--footer .yamm-footer-geneve {
        display: none !important;
    }

    .et-l--footer .yamm-footer-brand::after {
        content: "GENEVE" !important;
        display: block !important;
        width: 100% !important;
        margin: 6px auto 0 !important;
        padding: 0 !important;
        text-align: center !important;
        font-family: "NicolasCochin-regula", "NicolasCochin-Regular", "Nicolas Cochin TT", "Nicolas Cochin", "Cochin", "Bodoni 72", "Didot", "Times New Roman", serif !important;
        font-size: 11px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        letter-spacing: .27em !important;
        color: #000000 !important;
        text-transform: uppercase !important;
        font-synthesis: none !important;
    }
}

@media (max-width: 767.98px) {
    .et-l--footer .yamm-footer-brand,
    .et-l--footer .yamm-footer-brand a {
        font-size: clamp(20px, 5.75vw, 26px) !important;
        line-height: .88 !important;
        letter-spacing: .045em !important;
    }

    .et-l--footer .yamm-footer-brand::after {
        margin-top: 4px !important;
        font-size: 8px !important;
        letter-spacing: .24em !important;
    }
}

.yamm-country-footer-trigger {
    flex-wrap: nowrap;
    white-space: nowrap;
}


/* V2.0.3 — compatibilité légère des anciens footers Divi mis en cache. */
.et-l--footer .yamm-footer-legacy-combined {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    width: 100% !important;
}

.yamm-country-dialog,
.yamm-country-transition {
    isolation: isolate;
}
