/* ═══════════════════════════════════════════════════════════════
   CamiBijoux — Menu mobile

   Deux niveaux de lecture. Les entrées de premier rang sont des
   titres : grandes, aérées, sans image. Leurs enfants sont des
   raccourcis : une vignette, un libellé, rien d'autre.

   Le !important est systématique : Hello Elementor pose ses propres
   règles sur les listes et les liens, et sans lui la moitié d'entre
   elles reprendraient la main.
   ═══════════════════════════════════════════════════════════════ */

.cbmn {
    --cbmn-ink: #3A2317;
    --cbmn-muted: #8f817b;
    --cbmn-line: rgba(58, 35, 23, .12);
    --cbmn-radius: 10px;

    display: block !important;
    width: 100% !important;
    /* Aucun fond : le menu prend celui du panneau qui l'accueille —
       Off-Canvas Elementor, popup ou page. Un fond propre imposerait sa
       teinte à un conteneur déjà habillé. */
    background: transparent !important;
    color: var(--cbmn-ink) !important;
    font-family: "DM Sans", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* Réservé au pouce : au-delà, le menu du thème reprend la main. */
@media (min-width: 1025px) {
    .cbmn--mobile-only { display: none !important; }
}

.cbmn ul,
.cbmn li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.cbmn-list { display: block !important; }

/* ── La ligne, commune au lien et au bouton ──────────────────── */
.cbmn-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    text-align: left !important;
    text-decoration: none !important;
    font: inherit !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
}

.cbmn-label { flex: 1 1 auto !important; min-width: 0 !important; }

/* ── Ligne d'une entrée à sous-menu ──────────────────────────────
   Deux gestes sur une même ligne : le texte mène à la page, le reste
   déroule. Pour que « à côté du texte » existe vraiment, le lien ne
   prend que la largeur de ses mots — d'où flex: 0 1 auto, là où une
   entrée simple s'étend sur toute la ligne. La marge automatique
   repousse le signe +/- contre le bord. */
.cbmn-row--parent { cursor: pointer !important; }

.cbmn-row--parent > .cbmn-label {
    flex: 0 1 auto !important;
    margin-right: auto !important;
}

a.cbmn-label {
    color: inherit !important;
    text-decoration: none !important;
}

/* ── Premier niveau : des titres ─────────────────────────────── */
.cbmn-list--0 > .cbmn-item {
    border-bottom: 1px solid var(--cbmn-line) !important;
}

/* Playfair Display pour les entrées de premier rang, qui se lisent
   comme des titres. */
.cbmn-list--0 > .cbmn-item > .cbmn-row {
    padding: 22px 20px !important;
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: 27px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: .01em !important;
}

/* Une entrée sans enfants ni image se lit comme un titre de section :
   on lui donne les capitales et la lettre espacée qui vont avec. */
.cbmn-list--0 > .cbmn-item:first-child > .cbmn-row {
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}

/* ── Le signe plus / moins ─────────────────────────────────────
   C'est un vrai <button> : il porte l'état d'ouverture et donne au
   clavier un arrêt distinct de celui du lien. D'où les remises à zéro
   ci-dessous, les thèmes habillant volontiers tous les boutons. */
.cbmn-sign {
    position: relative !important;
    flex: 0 0 auto !important;
    width: 18px !important;
    height: 18px !important;
    opacity: .75 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent;
}

.cbmn-sign::before,
.cbmn-sign::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    width: 100% !important;
    height: 1.5px !important;
    background: currentColor !important;
    transform: translateY(-50%) !important;
    transition: transform .22s ease, opacity .22s ease !important;
}

/* La barre verticale disparaît en pivotant : le plus devient un moins
   d'un seul geste, sans que rien ne saute. */
.cbmn-sign::after { transform: translateY(-50%) rotate(90deg) !important; }

.cbmn-sign[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(0deg) !important;
    opacity: 0 !important;
}

/* ── Tiroir ──────────────────────────────────────────────────── */
.cbmn-drawer {
    overflow: hidden !important;
    /* La hauteur est posée en JavaScript : une valeur mesurée s'anime,
       « auto » ne s'anime pas. */
    transition: height .3s cubic-bezier(.4, 0, .2, 1) !important;
}

.cbmn-drawer[hidden] { display: none !important; }

/* ── Niveaux profonds : vignette et libellé ──────────────────── */
.cbmn-list--1 { padding: 2px 0 18px !important; }

/* DM Sans pour tout ce qui est en dessous : ce sont des raccourcis,
   pas des titres, et la sobriété les rend plus rapides à parcourir. */
.cbmn-list--1 > .cbmn-item > .cbmn-row,
.cbmn-list--2 > .cbmn-item > .cbmn-row {
    font-family: "DM Sans", Arial, sans-serif !important;
}

.cbmn-list--1 > .cbmn-item > .cbmn-row {
    padding: 8px 20px !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

.cbmn-list--2 > .cbmn-item > .cbmn-row {
    padding: 7px 20px 7px 40px !important;
    font-size: 15px !important;
    color: var(--cbmn-muted) !important;
}

.cbmn-thumb {
    flex: 0 0 auto !important;
    display: block !important;
    width: 74px !important;
    height: 74px !important;
    border-radius: var(--cbmn-radius) !important;
    overflow: hidden !important;
}

.cbmn-thumb__img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: inherit !important;
}

/* Une ligne sans vignette s'aligne quand même sur les autres : sans
   ce retrait, les libellés formeraient un escalier. */
.cbmn-list--1 > .cbmn-item:not(.cbmn-item--illustrated) > .cbmn-row {
    padding-left: 110px !important;
}

/* ── Bouton d'ouverture ──────────────────────────────────────── */
.cbmn-burger {
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
}

.cbmn-burger__bar {
    display: block !important;
    width: 22px !important;
    height: 1.6px !important;
    margin: 0 auto !important;
    border-radius: 2px !important;
    background: #3A2317 !important;
}

/* ── Panneau ─────────────────────────────────────────────────── */
.cbmn-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
}

.cbmn-panel[hidden] { display: none !important; }

.cbmn-panel__veil {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(28, 20, 15, .38) !important;
    opacity: 0 !important;
    transition: opacity .3s ease !important;
}

.cbmn-panel__sheet {
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: min(92vw, 460px) !important;
    /* Le panneau, lui, DOIT être opaque : il flotte au-dessus de la
       page. Blanc neutre, pour ne rien imposer au menu qu'il contient. */
    background: #fff !important;
    box-shadow: 0 0 40px rgba(28, 20, 15, .18) !important;
    transform: translateX(-100%) !important;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1) !important;
}

.cbmn-panel.is-open .cbmn-panel__veil { opacity: 1 !important; }
.cbmn-panel.is-open .cbmn-panel__sheet { transform: translateX(0) !important; }

.cbmn-panel__head {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 20px !important;
    border-bottom: 1px solid rgba(58, 35, 23, .12) !important;
}

.cbmn-panel__title {
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: 20px !important;
    color: #3A2317 !important;
}

.cbmn-panel__close {
    display: inline-flex !important;
    padding: 6px !important;
    border: 0 !important;
    background: transparent !important;
    color: #3A2317 !important;
    cursor: pointer !important;
}

.cbmn-panel__close svg {
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.6 !important;
    stroke-linecap: round !important;
}

/* Le corps défile, l'en-tête reste : sur un menu long, la croix de
   fermeture ne doit jamais partir hors de portée du pouce. */
.cbmn-panel__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom) !important;
}

/* La page derrière ne défile plus tant que le menu est ouvert. */
html.cbmn-open, body.cbmn-open { overflow: hidden !important; }

.cbmn-empty {
    margin: 0 !important;
    padding: 18px 20px !important;
    color: #8f817b !important;
    font-size: 14px !important;
}
