
    /* Remise a zero de la marge par defaut du navigateur (8px sur <body>).
       Sans elle, la page entiere est decalee vers la droite et depasse la
       largeur de l'ecran : sur telephone cela produit un defilement lateral
       de 8px sur tout le module organisateur. Les pages publiques la
       neutralisaient chacune dans leur propre feuille ; le tableau de bord
       ne le faisait pas. On la traite ici, une fois, pour tout le site.

       overflow-x: clip et non hidden : hidden sur un ancetre casse le
       position: sticky des descendants, dont la barre de navigation. */
    html { overflow-x: clip; }
    body { margin: 0; max-width: 100%; }

    .hd-nav {
        --hd-ink: #14110f;
        --hd-ink-soft: #57534e;
        --hd-ink-faint: #a29c94;
        --hd-line: #e7e2db;
        --hd-surface: #ffffff;
        --hd-canvas: #faf8f5;
        --hd-accent: #b5442e;
        --hd-accent-soft: #fbeae5;
        font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--hd-surface);
        border-bottom: 1px solid var(--hd-line);
        box-shadow: 0 1px 0 rgba(20,17,15,0.02);
    }
    .hd-nav *, .hd-nav *::before, .hd-nav *::after { box-sizing: border-box; }

    .hd-container {
        max-width: 1180px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 64px;
    }

    /* Brand */
    .hd-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        text-decoration: none;
        color: var(--hd-ink);
        flex-shrink: 0;
    }
    .hd-brand-logo {
        display: block;
        height: 34px;
        width: auto;
        max-width: 168px;
        object-fit: contain;
    }
    /* Une seule version visible a la fois, selon le theme actif. */
    .hd-logo-sombre { display: none; }
    html.theme-dark .hd-logo-clair { display: none; }
    html.theme-dark .hd-logo-sombre { display: block; }


    /* Toggler mobile */
    .hd-toggler {
        display: none;
        width: 38px;
        height: 38px;
        border: 1px solid var(--hd-line);
        border-radius: 9px;
        background: var(--hd-surface);
        color: var(--hd-ink);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }
    .hd-icon-close { display: none; }
    .hd-toggler.is-open .hd-icon-burger { display: none; }
    .hd-toggler.is-open .hd-icon-close { display: block; }

    /* Links */
    .hd-links {
        display: flex;
        align-items: center;
        gap: 2px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .hd-item { display: flex; align-items: center; }

    .hd-link {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 13px;
        border-radius: 9px;
        font-size: 13.5px;
        font-weight: 600;
        color: var(--hd-ink-soft);
        text-decoration: none;
        transition: background .15s ease, color .15s ease;
        white-space: nowrap;
    }
    .hd-link:hover {
        background: var(--hd-canvas);
        color: var(--hd-ink);
    }
    .hd-link-danger { color: var(--hd-accent); }
    .hd-link-danger:hover { background: var(--hd-accent-soft); color: var(--hd-accent); }

    .hd-link-cart { position: relative; }
    .hd-cart-icon-wrap { position: relative; display: flex; align-items: center; }
    .hd-cart-badge {
        position: absolute;
        top: -7px;
        right: -8px;
        background: var(--hd-accent);
        color: #fff;
        font-size: 9.5px;
        font-weight: 700;
        min-width: 15px;
        height: 15px;
        padding: 0 3px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        border: 1.5px solid var(--hd-surface);
    }

    .hd-item-cta { margin-left: 6px; }

    /* ---------- Menu Boutique ---------- */
    .hd-item-shop { position: relative; }
    .hd-shop-caret { opacity: .6; transition: transform .18s ease; }
    .hd-item-shop.is-open .hd-shop-caret { transform: rotate(180deg); }

    .hd-shop-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        z-index: 300;
        width: 460px;
        background: var(--hd-surface);
        border: 1px solid var(--hd-line);
        border-radius: 14px;
        box-shadow: 0 16px 40px rgba(20,17,15,0.14);
        padding: 10px;
        /* Masque sans display:none pour conserver une transition, et
           pointer-events:none pour qu'il ne capte pas les clics une fois ferme. */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity .17s ease, transform .17s ease, visibility .17s;
    }
    .hd-item-shop.is-open .hd-shop-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .hd-shop-all {
        display: flex; align-items: center; justify-content: space-between;
        gap: 8px; padding: 10px 12px; margin-bottom: 6px;
        border-radius: 9px; background: var(--hd-canvas, rgba(0,0,0,.03));
        font-size: 13.5px; font-weight: 700; color: var(--hd-ink);
        text-decoration: none;
    }
    .hd-shop-all:hover { background: var(--hd-accent); color: #fff; }

    .hd-shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
    .hd-shop-cat {
        display: flex; align-items: center; gap: 9px;
        padding: 9px 11px; border-radius: 9px;
        font-size: 13px; color: var(--hd-ink-soft); text-decoration: none;
        transition: background .15s ease, color .15s ease;
    }
    .hd-shop-cat:hover { background: rgba(0,0,0,.05); color: var(--hd-ink); }
    .hd-shop-cat svg { color: var(--hd-accent); flex-shrink: 0; }
    .hd-shop-cat-nom {
        flex: 1; min-width: 0;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .hd-shop-cat-n { font-size: 11px; opacity: .55; font-weight: 600; flex-shrink: 0; }

    html.theme-dark .hd-shop-all { background: rgba(255,255,255,.06); }
    html.theme-dark .hd-shop-cat:hover { background: rgba(255,255,255,.08); }
    .hd-btn-cta {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        background: var(--hd-ink);
        color: #fff;
        text-decoration: none;
        font-size: 13.5px;
        font-weight: 700;
        padding: 9px 15px;
        border-radius: 9px;
        transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
        white-space: nowrap;
    }
    .hd-btn-cta:hover {
        background: var(--hd-accent);
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(181,68,46,0.25);
        color: #fff;
    }

    /* Responsive */
    @media (max-width: 860px) {
        .hd-toggler { display: flex; }

        .hd-menu {
            display: none;
            position: absolute;
            top: 64px;
            left: 0;
            right: 0;
            background: var(--hd-surface);
            border-bottom: 1px solid var(--hd-line);
            box-shadow: 0 12px 24px rgba(20,17,15,0.08);
        }
        .hd-menu.is-open { display: block; }

        .hd-links {
            flex-direction: column;
            align-items: stretch;
            gap: 2px;
            padding: 10px 14px 16px;
        }
        .hd-item { width: 100%; }
        .hd-link {
            width: 100%;
            padding: 12px 14px;
            border-radius: 10px;
        }
        .hd-item-cta { margin-left: 0; margin-top: 6px; }

        /* Sur mobile le survol n'existe pas et l'espace manque : le menu
           Boutique devient une liste depliable a l'interieur du tiroir,
           en flux normal plutot qu'en positionnement absolu. */
        .hd-item-shop { flex-direction: column; align-items: stretch; }
        .hd-shop-menu {
            position: static;
            width: 100%;
            border: 0;
            box-shadow: none;
            padding: 2px 0 6px 10px;
            transform: none;
            /* display:none ici : sinon le menu ferme occuperait de la
               hauteur dans le tiroir et laisserait un trou. */
            display: none;
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transition: none;
        }
        .hd-item-shop.is-open .hd-shop-menu { display: block; transform: none; }
        .hd-shop-grid { grid-template-columns: 1fr; }
        .hd-shop-cat { padding: 11px 12px; font-size: 13.5px; }
        .hd-btn-cta {
            width: 100%;
            justify-content: center;
            padding: 12px 14px;
        }
    }

    @media (max-width: 480px) {
        .hd-container { padding: 0 14px; height: 58px; }
        .hd-brand-logo { height: 28px; max-width: 132px; }
        .hd-brand-mark { width: 29px; height: 29px; }
    }

    /* ============ Nouveau logo (badge rond) et menu flottant ============ */
    .hd-brand-logo {
        height: 46px; width: 46px; max-width: none; border-radius: 50%; object-fit: cover; flex-shrink: 0;
        transition: transform .3s cubic-bezier(.2,.8,.2,1), filter .3s ease, box-shadow .3s ease;
    }
    /* Theme clair : badge sombre pose sur fond clair, liseré cyan et ombre douce */
    .hd-logo-clair { box-shadow: 0 0 0 1.5px rgba(40,190,255,.55), 0 10px 20px -8px rgba(8,30,50,.55); }
    /* Theme sombre : le contour neon rayonne */
    html.theme-dark .hd-logo-sombre { box-shadow: none; filter: drop-shadow(0 0 10px rgba(40,190,255,.55)); }
    .hd-brand:hover .hd-brand-logo { transform: rotate(-6deg) scale(1.07); }
    html.theme-dark .hd-brand:hover .hd-logo-sombre { filter: drop-shadow(0 0 16px rgba(40,190,255,.8)); }

    @media (min-width: 861px) {
        .hd-nav { background: transparent; border: 0; box-shadow: none; padding: 12px 16px 0; pointer-events: none; }
        .hd-container {
            pointer-events: auto; max-width: 1180px; height: 66px; padding: 0 14px 0 12px; border-radius: 24px;
            background: color-mix(in srgb, var(--hd-surface) 82%, transparent);
            -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
            border: 1px solid color-mix(in srgb, var(--hd-line) 85%, transparent);
            box-shadow: 0 22px 44px -26px rgba(20,17,15,.45), inset 0 1px 0 rgba(255,255,255,.55);
        }
        html.theme-dark .hd-container { box-shadow: 0 22px 44px -22px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.07); }

        .hd-links { gap: 4px; }
        .hd-link { position: relative; padding: 10px 15px; border-radius: 14px; transition: background .2s ease, color .2s ease, transform .2s ease; }
        .hd-link svg { transition: color .2s ease, transform .25s cubic-bezier(.3,1.5,.5,1); }
        .hd-link:hover { background: color-mix(in srgb, var(--hd-accent) 9%, transparent); color: var(--hd-ink); }
        .hd-link:hover svg { transform: translateY(-1px) scale(1.12); color: var(--hd-accent); }
        .hd-link.is-active { color: var(--hd-ink); background: color-mix(in srgb, var(--hd-accent) 12%, transparent); }
        .hd-link.is-active svg { color: var(--hd-accent); }
        .hd-link.is-active::after {
            content: ''; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 3px; margin-left: -9px;
            border-radius: 3px; background: var(--hd-accent); box-shadow: 0 0 10px color-mix(in srgb, var(--hd-accent) 70%, transparent);
        }
        .hd-link-danger.is-active::after { display: none; }

        .hd-btn-cta, html.theme-dark .hd-btn-cta {
            padding: 11px 19px; border-radius: 15px; font-weight: 800; letter-spacing: .01em;
            background: linear-gradient(135deg, #de5b41 0%, #a83a26 100%) !important; border: 1px solid rgba(255,255,255,.22) !important; color: #fff !important;
            box-shadow: 0 14px 24px -12px rgba(168,58,38,.8), inset 0 1px 0 rgba(255,255,255,.28);
        }
        .hd-btn-cta:hover, html.theme-dark .hd-btn-cta:hover {
            background: linear-gradient(135deg, #ea6a50 0%, #b8432d 100%) !important; color: #fff !important;
            transform: translateY(-2px); box-shadow: 0 18px 28px -12px rgba(168,58,38,.9), inset 0 1px 0 rgba(255,255,255,.3);
        }
        .hd-btn-cta svg { transition: transform .2s ease; }
        .hd-btn-cta:hover svg { transform: translateX(3px); }

        .hd-shop-menu {
            top: calc(100% + 16px); border-radius: 22px; padding: 12px; width: 480px;
            background: color-mix(in srgb, var(--hd-surface) 92%, transparent);
            -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
            box-shadow: 0 34px 64px -28px rgba(0,0,0,.55);
        }
    }
    @media (max-width: 860px) {
        .hd-brand-logo { height: 38px; width: 38px; }
    }
    @media (prefers-reduced-motion: reduce) {
        .hd-brand:hover .hd-brand-logo, .hd-link:hover svg { transform: none; }
    }

    /* ============ Experience application (telephone) ============ */
    .hd-tabbar { display: none; }

    @media (max-width: 860px) {
        html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 70px; }
        body {
            padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
            overscroll-behavior-y: none;
            -webkit-font-smoothing: antialiased;
            animation: app-entree .28s cubic-bezier(.2,.7,.3,1) both;
        }
        /* Opacite seule : une transformation sur <body> deplacerait les
           elements fixes (barre d'onglets, panneaux) pendant l'animation. */
        @keyframes app-entree { from { opacity: 0; } to { opacity: 1; } }

        /* Barre superieure : logo a gauche, theme / langue / sortie a droite.
           Plus de menu hamburger : la navigation vit en bas. */
        .hd-nav { background: color-mix(in srgb, var(--hd-surface) 86%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); padding-top: env(safe-area-inset-top, 0px); }
        .hd-container { height: 54px; padding: 0 14px; gap: 10px; }
        .hd-toggler { display: none; }
        .hd-menu, .hd-links { display: contents; }
        .hd-item { display: none; width: auto; }
        .hd-item:has(.app-switcher), .hd-item:has(.hd-link-danger) { display: flex; }
        .hd-item:has(.app-switcher) { margin-left: auto; }
        .hd-link-danger { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
        .hd-link-danger span { display: none; }

        /* Barre d'onglets */
        .hd-tabbar {
            --tb-bg: #ffffff; --tb-line: #e7e2db; --tb-ink: #8b857d; --tb-on: #b5442e; --tb-on-bg: #fbeae5; --tb-on-1: #d2583f; --tb-on-2: #a83a26; --tb-ink-on: #14110f;
            position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
            display: grid; grid-template-columns: repeat(5, 1fr);
            padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
            background: color-mix(in srgb, var(--tb-bg) 92%, transparent);
            -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
            border-top: 1px solid var(--tb-line);
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        }
        html.theme-dark .hd-tabbar { --tb-bg: #14171d; --tb-line: #272c35; --tb-ink: #8f98a6; --tb-on: #f08a73; --tb-on-bg: rgba(240,138,115,.14); --tb-on-1: #e8664c; --tb-on-2: #c4442e; --tb-ink-on: #f1f3f6; }
        .hd-tab {
            display: flex; flex-direction: column; align-items: center; gap: 3px;
            padding: 4px 2px; text-decoration: none; color: var(--tb-ink);
            font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
            transition: color .18s ease, transform .12s ease;
            -webkit-user-select: none; user-select: none;
        }
        .hd-tab:active { transform: scale(.92); }
        .hd-tab-ico {
            position: relative; display: flex; align-items: center; justify-content: center;
            width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
            transition: background .22s ease, transform .22s ease;
        }
        .hd-tab svg { width: 24px; height: 24px; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.3,1.5,.5,1); }
        .hd-tab.is-active { color: var(--tb-on); }
        /* Onglet actif : pastille pleine aux couleurs du site, icone blanche
           remplie, petit rebond a l'arrivee, comme les applications natives. */
        .hd-tab.is-active .hd-tab-ico {
            width: 42px; height: 42px;
            background: linear-gradient(135deg, var(--tb-on-1), var(--tb-on-2));
            box-shadow: 0 8px 16px -8px var(--tb-on-2);
            color: #fff;
            animation: tb-pop .42s cubic-bezier(.3,1.6,.5,1);
        }
        .hd-tab.is-active svg { fill: rgba(255,255,255,.28); stroke-width: 2; }
        .hd-tab.is-active .hd-tab-txt { color: var(--tb-ink-on); font-weight: 800; }
        @keyframes tb-pop { 0% { transform: scale(.78); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
        .hd-tab-txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .hd-tab-badge {
            position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
            border-radius: 999px; background: #e0432f; color: #fff; font-size: 10px; font-weight: 800;
            display: flex; align-items: center; justify-content: center; border: 2px solid var(--tb-bg);
            box-sizing: content-box; line-height: 1;
        }
        @media (prefers-reduced-motion: reduce) {
            body { animation: none; }
            .hd-tab, .hd-tab-ico, .hd-tab svg { transition: none; }
            .hd-tab.is-active .hd-tab-ico { animation: none; }
        }
    }
