/**
 * Hub commander — glass premium, full-bleed desktop, bento
 */

.gx-public-body.gx-page-commander {
    /* fond géré par gx-app-bg.css */
}

/* Mobile : pleine largeur, pas de carte glass qui « double-boxe » */
.gx-public-main--commander {
    background: transparent;
    max-width: 100%;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-top: 8px;
}

.gx-hub--glass {
    --hub-ink: #0d1b2a;
    --hub-muted: #64748b;
    --hub-accent: #f97316;
    --hub-radius: 22px;
    max-width: 100%;
    padding-bottom: 16px;
}

.gx-hub__shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* Mobile : board plat (pas de glass / pas de marge intérieure inutile) */
.gx-hub__board {
    display: grid;
    gap: 18px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: 100%;
    box-sizing: border-box;
}

.gx-hub__board-main,
.gx-hub__board-side,
.gx-hub__place-form {
    min-width: 0;
    width: 100%;
}

.gx-hub__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-accent);
}

.gx-hub__intro {
    margin-bottom: 14px;
}

.gx-hub__title {
    margin: 0 0 4px;
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--hub-ink);
}

.gx-hub__lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--hub-muted);
}

/* Bannière */
.gx-hub__banniere {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 18px;
    background: rgba(255, 247, 237, 0.9);
    border: 1px solid rgba(249, 115, 22, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-ink);
    text-decoration: none;
    box-sizing: border-box;
}

.gx-hub__banniere-ico {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hub-accent);
    color: #fff;
    flex-shrink: 0;
}

.gx-hub__banniere-text { flex: 1; min-width: 0; line-height: 1.35; }
.gx-hub__banniere-text span { font-weight: 500; color: var(--hub-muted); }
.gx-hub__banniere-chev { color: var(--hub-accent); }

/* Active order */
.gx-hub__active-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(236, 253, 245, 0.92);
    border: 1px solid rgba(22, 163, 74, 0.28);
    text-decoration: none;
    color: #15803d;
    font-weight: 700;
    font-size: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gx-hub__active-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
    animation: gx-hub-pulse-dot 1.8s ease-in-out infinite;
}

@keyframes gx-hub-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.gx-hub__active-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Search bar */
.gx-hub__where {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 12px 12px 12px 14px;
    margin-bottom: 12px;
    border-radius: var(--hub-radius);
    /* fond glass : gx-app-bg.css */
    border: 1.5px solid rgba(13, 27, 42, 0.08);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.gx-hub__where:active { transform: scale(0.985); }

.gx-hub__where-ico {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff7ed, #ffedd5);
    flex-shrink: 0;
}

.gx-hub__where-ico img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.gx-hub__where-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gx-hub__where-label {
    font-size: 16px;
    font-weight: 800;
    color: var(--hub-ink);
    letter-spacing: -0.02em;
}

.gx-hub__where-hint {
    font-size: 12.5px;
    color: var(--hub-muted);
}

.gx-hub__where-go {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hub-ink);
    color: #fff;
    flex-shrink: 0;
    font-size: 14px;
}

/* Places list */
.gx-hub__places {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: var(--hub-radius);
    overflow: hidden;
    /* fond glass : gx-app-bg.css */
    border: 1px solid rgba(13, 27, 42, 0.07);
    box-sizing: border-box;
}

.gx-hub__place {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid rgba(13, 27, 42, 0.06);
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease;
}

.gx-hub__places li:last-child .gx-hub__place {
    border-bottom: 0;
}

.gx-hub__place:hover:not(:disabled) {
    background: rgba(255, 247, 237, 0.55);
}

.gx-hub__place.is-selected {
    background: rgba(255, 237, 213, 0.65);
}

.gx-hub__place:disabled {
    opacity: 0.85;
    cursor: wait;
}

.gx-hub__place.is-denied {
    opacity: 1;
    cursor: pointer;
}

.gx-hub__place.is-idle .gx-hub__place-sub {
    color: var(--hub-accent);
    font-weight: 600;
}

.gx-hub__place-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
}

.gx-hub__place.is-selected .gx-hub__place-radio {
    border-color: var(--hub-accent);
}

.gx-hub__place.is-selected .gx-hub__place-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--hub-accent);
}

.gx-hub__place-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
    font-size: 15px;
}

.gx-hub__place-ico--gps {
    background: linear-gradient(145deg, #ffedd5, #fed7aa);
    color: #ea580c;
}

.gx-hub__place-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gx-hub__place-label {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--hub-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gx-hub__place-sub {
    font-size: 12.5px;
    color: var(--hub-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gx-hub__place-map {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 7px 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    /* fond glass : gx-app-bg.css */
    color: var(--hub-ink, #0f172a);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.gx-hub__place-map:hover:not(:disabled) {
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--hub-accent, #f97316);
}

.gx-hub__place-map:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.gx-hub__place-map.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.gx-hub__place-badge {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: #fff7ed;
    color: #ea580c;
}

.gx-hub__place-eta {
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
}

.gx-hub__place.is-loading .gx-hub__place-ico--gps {
    animation: gx-hub-spin-soft 1.2s ease-in-out infinite;
}

@keyframes gx-hub-spin-soft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

/* Continue CTA */
.gx-hub__continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 48%, #ea580c 100%);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
    box-sizing: border-box;
}

.gx-hub__continue:hover:not(:disabled) {
    filter: brightness(1.04);
}

.gx-hub__continue:active:not(:disabled) {
    transform: scale(0.985);
}

.gx-hub__continue:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.15);
}

.gx-hub__gps-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 247, 237, 0.92);
    border: 1px solid rgba(249, 115, 22, 0.22);
    font-size: 13px;
    font-weight: 600;
    color: #9a3412;
    line-height: 1.35;
}

.gx-hub__gps-hint[hidden] {
    display: none !important;
}

.gx-hub__gps-hint-pulse {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45);
    animation: gx-hub-gps-pulse 1.4s ease-out infinite;
}

.gx-hub__gps-hint.is-ready {
    background: rgba(220, 252, 231, 0.92);
    border-color: rgba(22, 163, 74, 0.25);
    color: #166534;
}

.gx-hub__gps-hint.is-ready .gx-hub__gps-hint-pulse {
    background: #16a34a;
    animation: none;
    box-shadow: none;
}

.gx-hub__gps-hint.is-error {
    background: rgba(254, 242, 242, 0.95);
    border-color: rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

.gx-hub__gps-hint.is-error .gx-hub__gps-hint-pulse {
    background: #ef4444;
    animation: none;
}

@keyframes gx-hub-gps-pulse {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* Section / bento */
.gx-hub__section-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--hub-ink);
    letter-spacing: -0.02em;
}

.gx-hub__promos-head {
    margin-bottom: 4px;
}

.gx-hub__bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gx-hub__bento--1 { grid-template-columns: 1fr; }

.gx-hub__pcard--feature,
.gx-hub__pcard--slot-large {
    grid-column: 1 / -1;
    min-height: 176px;
}

.gx-hub__pcard--slot-small_top,
.gx-hub__pcard--slot-small_bottom,
.gx-hub__pcard--slot-small_extra {
    min-height: 150px;
}

.gx-hub__bento--4 .gx-hub__pcard--slot-small_extra {
    grid-column: 1 / -1;
    min-height: 132px;
}

.gx-hub__pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: #1e293b;
    min-width: 0;
    box-shadow: 0 12px 28px rgba(13, 27, 42, 0.14);
    transition: transform 0.18s ease;
    border: 0;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.gx-hub__pcard:hover {
    transform: translateY(-2px);
}

.gx-hub__pcard-visual {
    position: absolute;
    inset: 0;
}

.gx-hub__pcard-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gx-hub__pcard-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.08) 15%, rgba(13, 27, 42, 0.82) 100%);
}

.gx-hub__pcard-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 16px;
}

.gx-hub__pcard-kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.88;
}

.gx-hub__pcard-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gx-hub__pcard-title--lg { font-size: 22px; }

.gx-hub__pcard-sub {
    font-size: 12.5px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.35;
}

.gx-hub__pcard-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
}

.gx-hub__pcard--livreur { background: linear-gradient(145deg, #fb923c, #ea580c); }
.gx-hub__pcard--depot { background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.gx-hub__pcard--comment { background: linear-gradient(145deg, #34d399, #059669); }
.gx-hub__pcard--info { background: linear-gradient(145deg, #64748b, #334155); }
.gx-hub__pcard--livraison { background: linear-gradient(145deg, #f97316, #c2410c); }

.gx-hub__title span {
    color: var(--hub-accent);
}

.gx-hub--ready .gx-hub__intro,
.gx-hub--ready .gx-hub__where,
.gx-hub--ready .gx-hub__places,
.gx-hub--ready .gx-hub__continue,
.gx-hub--ready .gx-hub__board-side {
    animation: gx-hub-rise 0.55s var(--gx-ease-out, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

.gx-hub--ready .gx-hub__where { animation-delay: 0.06s; }
.gx-hub--ready .gx-hub__places { animation-delay: 0.12s; }
.gx-hub--ready .gx-hub__continue { animation-delay: 0.18s; }
.gx-hub--ready .gx-hub__board-side { animation-delay: 0.14s; }

@keyframes gx-hub-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.gx-hub__footer-auth {
    margin: 4px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--hub-muted);
}

.gx-hub__footer-auth a {
    color: var(--hub-accent);
    font-weight: 700;
    text-decoration: none;
}

/* ——— Desktop : ambiance vitrine (orange) + dynamisme ——— */
@media (min-width: 992px) {
    .gx-public-main--commander {
        position: relative;
        z-index: 1;
        max-width: none;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 28px 0 48px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        min-height: auto;
    }

    .gx-public-header__inner {
        max-width: none;
        width: 100%;
    }

    .gx-hub__board {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        align-items: start;
        gap: 28px;
        padding: 30px;
        border-radius: 32px;
    }

    .gx-hub__board-main {
        padding: 6px 4px 0;
    }

    .gx-hub__where,
    .gx-hub__places {
        /* glass : gx-app-bg.css */
    }

    .gx-hub__where:hover {
        border-color: rgba(249, 115, 22, 0.35);
        box-shadow: 0 14px 32px rgba(234, 88, 12, 0.14);
        transform: translateY(-1px);
    }

    .gx-hub__title {
        font-size: 40px;
    }

    .gx-hub__continue {
        max-width: 320px;
        animation: gx-hub-cta-pulse 2.8s ease-in-out infinite;
    }

    @keyframes gx-hub-cta-pulse {
        0%, 100% { box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35); }
        50% { box-shadow: 0 16px 36px rgba(249, 115, 22, 0.5); }
    }

    .gx-hub__pcard {
        transition: transform 0.22s ease, box-shadow 0.22s ease;
    }

    .gx-hub__pcard:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 18px 40px rgba(13, 27, 42, 0.22);
    }

    .gx-hub__pcard--feature,
    .gx-hub__pcard--slot-large {
        min-height: 210px;
    }

    .gx-hub__pcard--slot-small_top,
    .gx-hub__pcard--slot-small_bottom {
        min-height: 168px;
    }

    .gx-hub--ready .gx-hub__pcard {
        animation: gx-hub-rise 0.6s var(--gx-ease-out, cubic-bezier(0.22, 1, 0.36, 1)) both;
    }

    .gx-hub--ready .gx-hub__pcard:nth-child(1) { animation-delay: 0.16s; }
    .gx-hub--ready .gx-hub__pcard:nth-child(2) { animation-delay: 0.24s; }
    .gx-hub--ready .gx-hub__pcard:nth-child(3) { animation-delay: 0.32s; }
    .gx-hub--ready .gx-hub__pcard:nth-child(4) { animation-delay: 0.4s; }
}

@media (min-width: 720px) and (max-width: 991.98px) {
    .gx-hub__board {
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gx-hub__active-dot,
    .gx-hub__place.is-loading .gx-hub__place-ico--gps,
    .gx-public-body.gx-page-commander::before,
    .gx-public-body.gx-page-commander::after,
    .gx-hub__continue,
    .gx-hub--ready .gx-hub__intro,
    .gx-hub--ready .gx-hub__where,
    .gx-hub--ready .gx-hub__places,
    .gx-hub--ready .gx-hub__continue,
    .gx-hub--ready .gx-hub__board-side,
    .gx-hub--ready .gx-hub__pcard {
        animation: none !important;
    }
}
