/* =====================================================================
   CLUB MARAVELE — Espace membre
   Mobile-first · Noir & Or · Bodoni Moda (chiffres, titres) + Manrope (UI)
   ===================================================================== */

:root {
    --noir:        #000000;
    --charbon:     #1A1714;   /* surfaces sombres chaudes */
    --charbon-2:   #2A2622;
    --or:          #D4AF37;
    --or-clair:    #EAD18A;
    --or-fonce:    #9C7C1E;
    --fond:        #F4F3F0;
    --blanc:       #FFFFFF;
    --texte:       #1C1B19;
    --texte-doux:  #6E6A63;
    --trait:       #E4E1DA;
    --gain:        #2F7A4F;
    --perte:       #B23A2E;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;

    --f-display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
    --f-ui:      'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    /* Chiffres des points : sans empattement, largeur fixe (les compteurs ne « sautent » pas) */
    --f-nombres: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --nav-h: 68px;

    /* Surcharges Bootstrap */
    --bs-body-font-family: var(--f-ui);
    --bs-body-color: var(--texte);
    --bs-body-bg: var(--fond);
    --bs-link-color: var(--noir);
    --bs-link-color-rgb: 0, 0, 0;
    --bs-link-hover-color: var(--or-fonce);
    --bs-border-radius: var(--r-sm);
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--f-ui);
    background: var(--fond);
    color: var(--texte);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

/* Colonne mobile, centrée sur grand écran */
.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--fond);
    position: relative;
}
.app.has-nav { padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }

@media (min-width: 576px) {
    body { background: #E9E7E2; }
    .app { box-shadow: 0 0 0 1px var(--trait); }
}

/* ---------------------------------------------------------------------
   Marque
   --------------------------------------------------------------------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--noir);
}
.brand img { height: 44px; width: auto; display: block; }
.access-head .brand img { height: 74px; }
.welcome .brand img { height: 78px; }
.card-logo { width: 150px; height: auto; display: inline-block; }
/* Logo monochrome : noir sur fond clair, blanc sur fond noir (voir LOGO_MONOCHROME) */
.logo-sur-clair { filter: brightness(0); }
.logo-sur-fonce { filter: brightness(0) invert(1); }
.brand-name {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .28em;
}
.brand.on-dark { color: var(--or-clair); }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--blanc);
    border-bottom: 1px solid var(--trait);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-family: var(--f-ui);
    font-size: 1.05rem;
    letter-spacing: 0;
    margin: 0;
}
.icon-btn {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--noir);
    font-size: 1.25rem;
    text-decoration: none;
    border: 0; background: transparent;
}
.icon-btn:hover { background: var(--fond); color: var(--noir); }

.page { padding: 20px; }

h1, .h-display {
    font-family: var(--f-display);
    font-weight: 600;
    letter-spacing: -.01em;
}

/* ---------------------------------------------------------------------
   Boutons
   --------------------------------------------------------------------- */
.btn { font-weight: 700; border-radius: var(--r-sm); padding: .75rem 1.1rem; }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }

.btn-noir {
    background: var(--noir);
    color: var(--or-clair);
    border: 1px solid var(--noir);
}
.btn-noir:hover, .btn-noir:focus-visible { background: var(--charbon-2); color: var(--or-clair); border-color: var(--charbon-2); }
.btn-noir:disabled { background: #BDB9B1; border-color: #BDB9B1; color: #fff; opacity: 1; }

.btn-or {
    background: var(--or);
    color: var(--noir);
    border: 1px solid var(--or);
}
.btn-or:hover, .btn-or:focus-visible { background: var(--or-clair); border-color: var(--or-clair); color: var(--noir); }

.btn-contour {
    background: transparent;
    color: var(--perte);
    border: 1px solid var(--perte);
}
.btn-contour:hover { background: var(--perte); color: #fff; }

:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(212, 175, 55, .45); }

/* ---------------------------------------------------------------------
   Formulaires
   --------------------------------------------------------------------- */
.form-card {
    background: var(--blanc);
    border-radius: var(--r-lg);
    padding: 28px 22px;
}
.field { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.field > .bi { font-size: 1.2rem; color: var(--or-fonce); margin-top: 30px; width: 20px; flex: none; }
.field > div { flex: 1; }
.form-label { font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.form-label .req { color: var(--or-fonce); }
.form-control, .form-select {
    border-color: var(--trait);
    padding: .7rem .9rem;
    font-size: 16px;               /* évite le zoom iOS */
    border-radius: var(--r-sm);
}
.form-control:focus, .form-select:focus {
    border-color: var(--or);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .25);
}
.form-text { color: var(--texte-doux); font-size: .8rem; }
.form-check-input:checked { background-color: var(--noir); border-color: var(--noir); }

/* ---------------------------------------------------------------------
   En-tête sombre des pages d'accès (inscription / connexion)
   --------------------------------------------------------------------- */
.access-head {
    background: var(--noir);
    color: var(--or-clair);
    padding: 34px 24px 70px;
    text-align: center;
}
.access-head h1 { font-size: 2rem; margin: 18px 0 6px; color: #fff; }
.access-head p { color: #CFC8BB; margin: 0 auto; max-width: 30ch; }
.access-body { padding: 0 16px 32px; margin-top: -48px; }

/* ---------------------------------------------------------------------
   Carte solde — l'élément signature
   --------------------------------------------------------------------- */
.balance {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--noir);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 22px 22px 20px;
    text-decoration: none;
    border: 1px solid #3A332A;
}
.balance::after {                         /* reflet satiné, évoque un flacon */
    content: "";
    position: absolute;
    right: -60px; top: -80px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(234, 209, 138, .22), transparent 65%);
    pointer-events: none;
}
.balance-label { color: #CFC8BB; font-size: .88rem; }
.balance-value {
    font-family: var(--f-nombres);
    font-weight: 800;
    font-size: 3.1rem;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--or);
    font-variant-numeric: lining-nums tabular-nums;
    margin: 8px 0 6px;
}
.balance-value small {
    font-family: var(--f-ui);
    font-size: 1rem;
    font-weight: 600;
    color: var(--or-clair);
    margin-left: 6px;
}
.balance-foot {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #332D25;
    margin-top: 14px; padding-top: 12px;
    font-size: .82rem; color: #CFC8BB;
}
.balance-foot .code { font-family: var(--f-ui); letter-spacing: .08em; color: var(--or-clair); }
.balance:hover { color: #fff; }

/* ---------------------------------------------------------------------
   Accueil membre
   --------------------------------------------------------------------- */
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar {
    width: 52px; height: 52px; flex: none;
    border-radius: 50%;
    background: var(--noir);
    color: var(--or);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-display);
    font-size: 1.35rem;
    font-weight: 700;
}
.hello strong { display: block; font-size: 1.1rem; }
.hello span { color: var(--texte-doux); font-size: .85rem; }

.section-title { font-weight: 800; font-size: 1rem; margin: 26px 0 12px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
    background: var(--blanc);
    border-radius: var(--r-md);
    padding: 16px 8px 14px;
    text-align: center;
    text-decoration: none;
    color: var(--texte);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid transparent;
}
.tiles-2 { grid-template-columns: 1fr 1fr; }
.stat-num { display: block; font-family: var(--f-nombres); font-weight: 800; font-size: 1.9rem; margin-bottom: 2px; }
.tile .bi { display: block; font-size: 1.7rem; color: var(--or-fonce); margin-bottom: 8px; }
.tile:hover { border-color: var(--or); color: var(--texte); }

.promo {
    display: flex; align-items: center; gap: 16px;
    background: var(--charbon);
    color: #fff;
    border-radius: var(--r-md);
    padding: 18px;
    margin-top: 14px;
    text-decoration: none;
}
.promo .bi-gift { font-size: 2rem; color: var(--or); }
.promo strong { display: block; font-size: 1rem; }
.promo span { font-size: .82rem; color: #CFC8BB; }
.promo .bi-chevron-right { margin-left: auto; color: var(--or-clair); }
.promo:hover { color: #fff; background: var(--charbon-2); }

/* ---------------------------------------------------------------------
   Navigation basse
   --------------------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--blanc);
    border-top: 1px solid var(--trait);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 30;
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px;
    color: var(--texte-doux);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 600;
    position: relative;
}
.bottom-nav a .bi { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--noir); }
.bottom-nav a.active::before {
    content: "";
    position: absolute; top: 0;
    width: 28px; height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--or);
}

/* ---------------------------------------------------------------------
   Historique des points
   --------------------------------------------------------------------- */
.tx-list { background: var(--blanc); border-radius: var(--r-md); padding: 4px 16px; }
.tx {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--trait);
}
.tx:last-child { border-bottom: 0; }
.tx-icon {
    width: 42px; height: 42px; flex: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--noir);
    color: var(--or);
    font-size: 1.05rem;
}
.tx-icon.neg { background: var(--fond); color: var(--texte-doux); }
.tx-body { flex: 1; min-width: 0; }
.tx-body strong { display: block; font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-body span { font-size: .78rem; color: var(--texte-doux); }
.tx-pts { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-pts.pos { color: var(--gain); }
.tx-pts.neg { color: var(--perte); }

.total-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--noir);
    color: #CFC8BB;
    border-radius: var(--r-md);
    padding: 16px 18px;
    margin-top: 14px;
}
.total-bar strong {
    font-family: var(--f-nombres);
    font-size: 1.6rem;
    color: var(--or);
}
.total-bar strong small { font-family: var(--f-ui); font-size: .8rem; color: var(--or-clair); }

.note {
    font-size: .82rem;
    color: var(--texte-doux);
    background: var(--blanc);
    border-left: 3px solid var(--or);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 10px 14px;
    margin-bottom: 14px;
}

/* ---------------------------------------------------------------------
   Récompenses
   --------------------------------------------------------------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--trait);
    background: var(--blanc);
    color: var(--texte);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.chip.active { background: var(--noir); border-color: var(--noir); color: var(--or-clair); }

.rewards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reward {
    background: var(--blanc);
    border-radius: var(--r-md);
    padding: 18px 14px 14px;
    display: flex; flex-direction: column;
    text-align: center;
}
.reward .bi { font-size: 2rem; color: var(--or-fonce); }
.reward h3 { font-size: .95rem; font-weight: 700; margin: 10px 0 2px; }
.reward p { font-size: .76rem; color: var(--texte-doux); margin: 0 0 8px; }
.reward .cost {
    font-family: var(--f-nombres);
    font-weight: 800;
    font-size: 1.15rem;
    margin-top: auto;
    margin-bottom: 10px;
}
.reward .cost small { font-family: var(--f-ui); font-size: .75rem; font-weight: 600; color: var(--texte-doux); }
.reward .missing { font-size: .74rem; color: var(--texte-doux); margin-bottom: 6px; }

.voucher {
    display: flex; align-items: center; gap: 14px;
    background: var(--blanc);
    border: 1px dashed var(--or);
    border-radius: var(--r-md);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.voucher > .bi { font-size: 1.6rem; color: var(--or-fonce); }
.voucher-code {
    font-family: var(--f-ui);
    font-weight: 800;
    letter-spacing: .12em;
    font-size: 1rem;
}
.voucher small { color: var(--texte-doux); }
.badge-used { background: var(--fond); color: var(--texte-doux); }
.badge-pending { background: var(--noir); color: var(--or-clair); }

/* ---------------------------------------------------------------------
   Mon compte
   --------------------------------------------------------------------- */
.profile {
    display: flex; align-items: center; gap: 14px;
    background: var(--blanc);
    border-radius: var(--r-md);
    padding: 18px;
    margin-bottom: 16px;
}
.profile strong { display: block; font-size: 1.05rem; }
.profile span { color: var(--texte-doux); font-size: .85rem; }

.menu-list { background: var(--blanc); border-radius: var(--r-md); padding: 0 16px; margin-bottom: 18px; }
.menu-list a {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--trait);
    color: var(--texte);
    text-decoration: none;
    font-weight: 500;
}
.menu-list a:last-child { border-bottom: 0; }
.menu-list a .bi:first-child { color: var(--or-fonce); font-size: 1.15rem; width: 22px; }
.menu-list a .bi-chevron-right { margin-left: auto; color: #B5B0A6; }

/* ---------------------------------------------------------------------
   Carte membre (QR)
   --------------------------------------------------------------------- */
.member-card {
    background: var(--noir);
    border-radius: var(--r-lg);
    padding: 26px 22px;
    text-align: center;
    color: #fff;
    border: 1px solid #3A332A;
}
.member-card .qr-box {
    background: #fff;
    display: inline-block;
    padding: 14px;
    border-radius: var(--r-md);
    margin: 20px 0 16px;
}
.member-card .qr-box canvas, .member-card .qr-box img { display: block; width: 200px; height: 200px; }
.member-card .name { font-size: 1.1rem; font-weight: 700; }
.member-card .code {
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--or);
    font-size: 1.15rem;
    margin-top: 4px;
}

/* ---------------------------------------------------------------------
   Page de bienvenue (après inscription)
   --------------------------------------------------------------------- */
.welcome {
    min-height: 100vh;
    background: var(--noir);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
}
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.welcome-card {
    position: relative; z-index: 2;
    background: var(--blanc);
    border-radius: var(--r-lg);
    padding: 34px 24px 26px;
    text-align: center;
    width: 100%; max-width: 380px;
    margin-top: 22px;
}
.welcome-card h1 { font-size: 2.1rem; margin: 0 0 4px; }
.welcome-card .sub { color: var(--texte-doux); margin-bottom: 22px; }
.welcome-points {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--noir);
    border-radius: var(--r-md);
    padding: 16px 30px 12px;
    margin-bottom: 20px;
    min-width: 200px;
}
.welcome-points .num {
    font-family: var(--f-nombres);
    font-weight: 800;
    font-size: 3.1rem;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--or);
    font-variant-numeric: lining-nums tabular-nums;
}
.welcome-points .lbl { color: var(--or-clair); font-size: .82rem; font-weight: 600; margin-top: 4px; }
.welcome .brand { position: relative; z-index: 2; }
.welcome .gift-mark {
    position: relative; z-index: 2;
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 1px solid var(--or-fonce);
    display: flex; align-items: center; justify-content: center;
    color: var(--or);
    font-size: 2.4rem;
    margin-top: 26px;
}

/* ---------------------------------------------------------------------
   Divers
   --------------------------------------------------------------------- */
.empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--texte-doux);
    background: var(--blanc);
    border-radius: var(--r-md);
}
.empty .bi { font-size: 2rem; color: var(--or); display: block; margin-bottom: 8px; }

.alert { border-radius: var(--r-sm); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------
   Fenêtre de confirmation Oui / Non
   --------------------------------------------------------------------- */
.confirm-modal .modal-content { border: 0; border-radius: var(--r-lg); overflow: hidden; }
.confirm-modal .modal-body { padding: 28px 24px 22px; text-align: center; }
.confirm-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%; background: var(--noir); color: var(--or);
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.confirm-title { font-family: var(--f-ui); font-weight: 800; font-size: 1.15rem; margin-bottom: 8px; }
.confirm-text { color: var(--texte-doux); margin-bottom: 22px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-backdrop.show { opacity: .7; }

/* =====================================================================
   PAGES D'ACCÈS : inscription / connexion
   Fond noir, logo or tel quel, carte sombre ; 2 colonnes à partir de 992 px
   ===================================================================== */
body.page-acces {
    background: var(--noir);
    color: #EDE8DF;
    color-scheme: dark;                          /* sélecteurs natifs (date) en sombre */
}
.acces {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.acces::before {                                  /* halo doré discret derrière le logo */
    content: "";
    position: absolute; z-index: -1;
    top: -180px; left: 50%; transform: translateX(-50%);
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(212, 175, 55, .16), transparent 62%);
    pointer-events: none;
}

/* ----- Colonne marque ----- */
.acces-brand {
    text-align: center;
    padding: 34px 22px 8px;
}
.acces-logo { display: inline-block; }
.acces-logo img { width: 168px; height: auto; display: block; }
.acces-title {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.1;
    color: #fff;
    margin: 20px 0 8px;
}
.acces-lead { color: #B9B2A6; margin: 0 auto; max-width: 34ch; font-size: .95rem; }

.acces-bonus {
    display: inline-flex; align-items: baseline; gap: 8px;
    margin-top: 18px;
    padding: 8px 18px;
    border: 1px solid rgba(212, 175, 55, .55);
    border-radius: 999px;
    color: var(--or-clair);
    font-size: .88rem; font-weight: 600;
}
.acces-bonus strong {
    font-family: var(--f-nombres);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--or);
    letter-spacing: -0.02em;
}

.acces-perks {
    list-style: none; padding: 0; margin: 22px auto 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    max-width: 380px;
}
.acces-perks li { font-size: .74rem; color: #B9B2A6; line-height: 1.3; }
.acces-perks .bi {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0 auto 6px;
    border-radius: 50%;
    border: 1px solid #3A332A;
    color: var(--or); font-size: 1.05rem;
}

/* ----- Colonne formulaire ----- */
.acces-panel {
    width: 100%; max-width: 460px;
    margin: 0 auto;
    padding: 22px 16px 36px;
}
.acces-card {
    background: #12100E;
    border: 1px solid #2A2520;
    border-radius: 22px;
    padding: 22px 18px 24px;
}

/* Sélecteur Inscription | Connexion */
.acces-tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    background: #0A0908;
    border: 1px solid #2A2520;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 22px;
}
.acces-tabs a {
    text-align: center;
    padding: 10px 8px;
    border-radius: 9px;
    color: #9E978B;
    font-weight: 700; font-size: .9rem;
    text-decoration: none;
}
.acces-tabs a:hover { color: #fff; }
.acces-tabs a.active { background: var(--or); color: var(--noir); }

/* Champs */
.fld { margin-bottom: 16px; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld-label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: .8rem; font-weight: 600; color: #CFC8BB;
    margin-bottom: 6px;
}
.fld-label .req { color: var(--or); }
.fld-label a { color: var(--or-clair); font-weight: 600; text-decoration: none; }
.fld-label a:hover { text-decoration: underline; }
.fld-input { position: relative; }
.fld-input > .bi {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--or-fonce); font-size: 1rem; pointer-events: none;
    transition: color .15s;
}
.fld-input .form-control {
    background: #0A0908;
    border: 1px solid #34302A;
    color: #F4F1EA;
    border-radius: 12px;
    padding: .78rem .95rem .78rem 2.6rem;
    font-size: 16px;                               /* pas de zoom iOS */
    transition: border-color .15s, box-shadow .15s;
}
.fld-input .form-control::placeholder { color: #6F695F; }
.fld-input .form-control:hover { border-color: #4A443B; }
.fld-input .form-control:focus {
    background: #0A0908; color: #fff;
    border-color: var(--or);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .22);
}
.fld-input:focus-within > .bi { color: var(--or); }
.fld-input .form-control.has-toggle { padding-right: 3rem; }
.fld-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px;
    border: 0; background: transparent; border-radius: 10px;
    color: #9E978B; font-size: 1.05rem;
}
.fld-toggle:hover, .fld-toggle:focus-visible { color: var(--or); }
.fld-help { font-size: .76rem; color: #8C857A; margin-top: 5px; }
/* Pas d'icône calendrier blanche sur blanc : on garde l'icône native en clair */
.fld-input input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }

/* Code de parrainage repliable */
.fld-more { margin-bottom: 16px; }
.fld-more summary {
    cursor: pointer; list-style: none;
    color: var(--or-clair); font-size: .85rem; font-weight: 600;
}
.fld-more summary::-webkit-details-marker { display: none; }
.fld-more summary .bi { transition: transform .2s; display: inline-block; }
.fld-more[open] summary .bi { transform: rotate(90deg); }
.fld-more .fld { margin: 12px 0 0; }

/* Consentement */
.acces-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; }
.acces-consent .form-check-input {
    flex: none; margin-top: 2px;
    width: 1.15rem; height: 1.15rem;
    background-color: #0A0908; border-color: #4A443B;
}
.acces-consent .form-check-input:checked { background-color: var(--or); border-color: var(--or); }
.acces-consent label { font-size: .8rem; color: #B9B2A6; }

/* Bouton principal or */
.btn-acces {
    width: 100%;
    background: var(--or); color: var(--noir);
    border: 0; border-radius: 12px;
    padding: .9rem 1rem;
    font-weight: 800; font-size: 1rem;
}
.btn-acces:hover, .btn-acces:focus-visible { background: var(--or-clair); color: var(--noir); }
.btn-acces:disabled { background: #6B5A24; color: #1a1a1a; }

.acces-switch { text-align: center; font-size: .88rem; color: #9E978B; margin: 18px 0 0; }
.acces-switch a { color: var(--or); font-weight: 700; text-decoration: none; }
.acces-switch a:hover { text-decoration: underline; }
.acces-foot { text-align: center; font-size: .78rem; color: #6F695F; margin-top: 22px; }
.acces-foot a { color: #9E978B; }

/* Messages sur fond sombre */
.page-acces .alert { border: 0; border-radius: 12px; font-size: .88rem; }
.page-acces .alert-danger  { background: #3A1512; color: #F6C9C2; }
.page-acces .alert-warning { background: #3A2E10; color: #F3DE9E; }
.page-acces .alert-success { background: #12301F; color: #BFE7CD; }
.page-acces .alert-info    { background: #1B2530; color: #C7D8EA; }
.page-acces .alert a { color: inherit; font-weight: 700; }
.page-acces .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* ----- Grand écran : marque à gauche, formulaire à droite ----- */
@media (min-width: 992px) {
    .acces {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        align-items: center;
    }
    .acces::before { left: 26%; top: 50%; transform: translate(-50%, -50%); width: 760px; height: 760px; }
    .acces-brand {
        text-align: left;
        padding: 60px 40px 60px max(48px, 8vw);
        border-right: 1px solid #1E1B17;
        position: sticky; top: 0; align-self: start;   /* reste visible pendant le défilement du formulaire */
        height: 100vh;
        display: flex; flex-direction: column; justify-content: center;
    }
    .acces-logo img { width: 230px; }
    .acces-title { font-size: 3rem; margin-top: 34px; }
    .acces-lead { margin: 0; font-size: 1.05rem; }
    .acces-bonus { align-self: flex-start; }
    .acces-perks {
        grid-template-columns: 1fr; gap: 14px; margin: 34px 0 0; max-width: none;
    }
    .acces-perks li { display: flex; align-items: center; gap: 14px; font-size: .95rem; text-align: left; }
    .acces-perks .bi { margin: 0; flex: none; }
    .acces-panel { padding: 48px 32px; }
    .acces-card { padding: 30px 28px 30px; }
}
@media (max-width: 359.98px) {                   /* très petits écrans : Nom / Prénom empilés */
    .fld-row { grid-template-columns: 1fr; gap: 0; }
}
/* Connexion sur mobile : on va droit au formulaire */
@media (max-width: 991.98px) {
    .acces-brand--connexion .acces-perks { display: none; }
    .acces-brand--connexion { padding-bottom: 0; }
}

/* ---------------------------------------------------------------------
   PWA : carte « Installer l'application »
   --------------------------------------------------------------------- */
.pwa-card {
    display: flex; align-items: center; gap: 12px;
    position: relative;
    background: var(--noir);
    color: #EDE8DF;
    border: 1px solid #3A332A;
    border-radius: var(--r-md);
    padding: 14px 40px 14px 14px;
    margin-top: 16px;
}
.pwa-card[hidden] { display: none; }
.pwa-card img { border-radius: 12px; flex: none; }
.pwa-text { flex: 1; min-width: 0; }
.pwa-text strong { display: block; font-size: .95rem; color: #fff; }
.pwa-text span { display: block; font-size: .78rem; color: #B9B2A6; }
.pwa-text .pwa-ios { color: var(--or-clair); margin-top: 4px; }
.pwa-close {
    position: absolute; top: 6px; right: 6px;
    width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: transparent; color: #8C857A;
}
.pwa-close:hover { color: #fff; }

/* Connexion : sans titre, le texte d'accroche suit directement le logo */
.acces-lead--seule { margin-top: 18px; }
/* Titre lu par les lecteurs d'écran mais invisible (indépendant de Bootstrap) */
.sr-titre {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.fld-opt { color: #7D766B; font-weight: 500; font-size: .74rem; }

/* =====================================================================
   ESPACE CLIENT SIMPLIFIÉ : points + bon d'achat + QR code
   ===================================================================== */
.hello-line { font-size: 1.05rem; color: var(--texte-doux); margin: 4px 0 14px; }
.hello-line strong { color: var(--texte); }

.goal { border-top: 1px solid #332D25; margin-top: 16px; padding-top: 14px; position: relative; z-index: 1; }
.goal-text { margin: 0 0 12px; color: #E4DED3; font-size: .92rem; line-height: 1.45; }
.goal-text strong { color: var(--or-clair); }
.goal-ok { color: #fff; }
.goal-ok .bi { color: var(--or); margin-right: 4px; }
.goal-bar { height: 10px; background: #2A2520; border-radius: 999px; overflow: hidden; }
.goal-bar span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--or-fonce), var(--or), var(--or-clair));
    border-radius: 999px;
    min-width: 10px;
    transition: width .8s ease;
}
.goal-sub { margin: 8px 0 0; font-size: .78rem; color: #9E978B; text-align: right; }

.btn-qr {
    display: flex; align-items: center; gap: 16px;
    width: 100%; margin-top: 16px;
    padding: 18px 20px;
    background: var(--or); color: var(--noir);
    border: 0; border-radius: var(--r-lg);
    text-align: left;
    box-shadow: 0 8px 22px rgba(212, 175, 55, .28);
}
.btn-qr .bi { font-size: 2.2rem; line-height: 1; }
.btn-qr strong { display: block; font-size: 1.1rem; font-weight: 800; }
.btn-qr small { display: block; font-size: .8rem; opacity: .75; font-weight: 600; }
.btn-qr:hover, .btn-qr:focus-visible { background: var(--or-clair); }

.rule { margin: 18px 0 0; text-align: center; font-size: .8rem; color: var(--texte-doux); }
.rule .bi { color: var(--or-fonce); margin-right: 4px; }

/* QR plein écran */
body.qr-open { overflow: hidden; }
.qr-sheet {
    position: fixed; inset: 0; z-index: 1060;
    background: rgba(0, 0, 0, .82);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.qr-sheet[hidden] { display: none; }
.qr-sheet-inner {
    position: relative;
    width: 100%; max-width: 380px;
    background: #fff; color: var(--noir);
    border-radius: 24px;
    padding: 28px 22px 24px;
    text-align: center;
    animation: qr-in .25s ease-out;
}
@keyframes qr-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.qr-close {
    position: absolute; top: 10px; right: 10px;
    width: 42px; height: 42px; border: 0; border-radius: 50%;
    background: var(--fond); color: var(--noir); font-size: 1.1rem;
}
.qr-logo { height: 52px; width: auto; }
.qr-title { font-family: var(--f-ui); font-weight: 800; font-size: 1rem; margin: 12px 0 14px; }
.qr-box { display: flex; justify-content: center; }
.qr-box canvas, .qr-box img { width: min(72vw, 270px) !important; height: min(72vw, 270px) !important; }
.qr-name { font-weight: 700; font-size: 1.05rem; margin-top: 16px; }
.qr-code { font-weight: 800; letter-spacing: .14em; color: var(--or-fonce); font-size: 1.15rem; margin-top: 2px; }
.qr-hint { font-size: .78rem; color: var(--texte-doux); margin: 12px 0 0; }

/* =====================================================================
   ESPACE CLIENT : bandeau noir + « Comment ça marche » + bouton QR fixé
   ===================================================================== */
.app-membre { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* Bandeau noir (se prolonge sous la barre d'état noire du téléphone) */
.hero-noir {
    background: var(--noir);
    color: #EDE8DF;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 0 0 28px 28px;
}
.hero-noir::before {
    content: ""; position: absolute; z-index: -1;
    top: -140px; right: -120px; width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(212, 175, 55, .18), transparent 65%);
}
.topbar-noir {
    background: transparent;
    border-bottom: 0;
    position: static;
    padding: 14px 20px 6px;
    padding-top: max(14px, env(safe-area-inset-top));
}
.topbar-noir .brand img { height: 48px; }
.topbar-noir .icon-btn { color: #CFC8BB; }
.topbar-noir .icon-btn:hover, .topbar-noir .icon-btn:focus-visible { background: #1A1714; color: var(--or); }

.hero-body { padding: 6px 20px 24px; }
.hero-noir .hello-line { color: #B9B2A6; margin: 6px 0 14px; }
.hero-noir .hello-line strong { color: #fff; }

/* Carte de solde dans le bandeau : surface charbon pour se détacher du noir */
.balance-hero { background: #12100E; border-color: #2E2822; }
.goal-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: .76rem; color: #9E978B; }

/* Partie claire */
.page-membre { flex: 1; padding: 22px 20px 12px; }
.page-membre .section-title { margin-top: 0; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: etape; }
.steps li {
    display: flex; align-items: center; gap: 14px;
    background: var(--blanc);
    border-radius: var(--r-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    position: relative;
}
.step-ic {
    flex: none; width: 44px; height: 44px; border-radius: 50%;
    background: var(--noir); color: var(--or);
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
    position: relative;
}
.steps li .step-ic::after {                       /* numéro d'étape en pastille or */
    counter-increment: etape; content: counter(etape);
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--or); color: var(--noir);
    font: 800 .66rem/18px var(--f-ui); text-align: center;
}
.steps strong { display: block; font-size: .95rem; }
.steps span:not(.step-ic) { display: block; font-size: .8rem; color: var(--texte-doux); }

.shop-link {
    display: flex; align-items: center; gap: 14px;
    margin-top: 16px; padding: 14px 16px;
    border: 1px solid var(--trait); border-radius: var(--r-md);
    background: var(--blanc); color: var(--texte); text-decoration: none;
}
.shop-link > .bi:first-child { font-size: 1.3rem; color: var(--or-fonce); }
.shop-link span { flex: 1; }
.shop-link strong { display: block; font-size: .92rem; }
.shop-link small { color: var(--texte-doux); font-size: .78rem; }
.shop-link > .bi:last-child { color: #B5B0A6; }
.shop-link:hover { border-color: var(--or); color: var(--texte); }

.membre-foot { text-align: center; font-size: .74rem; color: #A39D93; margin: 20px 0 0; letter-spacing: .02em; }

/* Bouton QR fixé en bas, avec fondu pour ne pas couper le contenu */
.qr-dock {
    position: sticky; bottom: 0; z-index: 20;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(244, 243, 240, 0), var(--fond) 38%);
}
.qr-dock .btn-qr { margin-top: 0; }
.acces-info { font-size: .75rem; color: #8C857A; text-align: center; margin: 12px 0 0; line-height: 1.45; }
