/* ==========================================================================
   Hanout Bladi — Espace client : « Zellige & Safran »
   Vert émeraude profond, safran, terre cuite et sable : l'esprit d'une épicerie marocaine chic.
   ========================================================================== */
.hanout-compte-page-bg {
    --hb-green: #14392a;
    --hb-green-2: #1f5a3b;
    --hb-saffron: #c89b3c;
    --hb-saffron-soft: #f3e6c6;
    --hb-terra: #b4532a;
    --hb-sand: #f4ecdd;
    --hb-cream: #fbf8f2;
    --hb-ink: #25322b;
    --hb-muted: #7a7160;
    --hb-line: #e8dcc6;
    --hb-zellige: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='56'%20height='56'%20viewBox='0%200%2056%2056'%3E%3Cg%20fill='none'%20stroke='%23c89b3c'%20stroke-opacity='.30'%20stroke-width='1'%3E%3Crect%20x='14'%20y='14'%20width='28'%20height='28'/%3E%3Crect%20x='14'%20y='14'%20width='28'%20height='28'%20transform='rotate%2845%2028%2028%29'/%3E%3Ccircle%20cx='28'%20cy='28'%20r='3.5'/%3E%3C/g%3E%3C/svg%3E");
}

body, html, .site, .site-content, .content-area, .site-main, .l-main, .l-submain, .entry-content, .page-content, .ast-container, .container, #primary, #content, .post-content {
    background-color: #fbf8f2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hanout-compte-page-bg {
    background: radial-gradient(900px 380px at 50% -80px, #efe6d2 0%, rgba(239, 230, 210, 0) 70%), #fbf8f2 !important;
    width: 100% !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 14px 0 60px 0 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--hb-ink);
}
.hanout-compte-page-bg *, .hanout-compte-page-bg *::before, .hanout-compte-page-bg *::after { box-sizing: border-box; }

.hanout-compte-wrapper { max-width: 460px !important; width: 100%; margin: 0 auto; padding: 0 16px; }
.hanout-compte-wrapper.is-dashboard { max-width: 880px !important; }

.hanout-compte-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 44px 38px 34px;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(20, 57, 42, .09);
}
/* Frise zellige en tête de carte */
.hanout-compte-box::before {
    content: '';
    position: absolute; inset: 0 0 auto 0; height: 14px;
    background: var(--hb-green) var(--hb-zellige) center / 28px 28px;
    border-bottom: 2px solid var(--hb-saffron);
}
.hanout-compte-box.is-dashboard { padding: 0; }
.hanout-compte-box.is-dashboard::before { display: none; }

.hanout-compte-titre {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 27px; line-height: 1.2; margin: 0 0 8px;
    color: var(--hb-green); font-weight: 800; text-align: center; letter-spacing: -.2px;
}
.hanout-compte-desc { font-size: 13.5px; color: var(--hb-muted); margin: 0 0 26px; line-height: 1.55; text-align: center; }

/* ----- Messages ----- */
.hanout-error-notice, .msp-inline-my-account-12 {
    padding: 12px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-bottom: 20px; text-align: center; border: 1px solid;
}
.hanout-error-notice { background: #fdf1ec; border-color: #efc9b9; color: #8f3516; }
.msp-inline-my-account-12 { background: #eef6ef; border-color: #c3dcc8; color: #1d5a35; }
.hanout-compte-box.is-dashboard .hanout-error-notice,
.hanout-compte-box.is-dashboard .msp-inline-my-account-12,
.hanout-compte-box.is-dashboard .hanout-block-notice { margin: 16px 22px 0; }

.hanout-block-notice {
    margin-bottom: 22px; padding: 15px 18px; border-radius: 12px; background: #fffaf0;
    border: 1px solid #ecd9a6; border-left: 4px solid var(--hb-saffron); text-align: left;
}
.hanout-block-title { display: block; font-size: 13.5px; line-height: 1.45; color: #7a4a0a; margin-bottom: 6px; }
.hanout-block-fix { margin: 0; font-size: 13px; line-height: 1.55; color: #44403c; }
.hanout-block-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hanout-block-actions a { padding: 8px 14px; border-radius: 9px; font-size: 12px; font-weight: 700; text-decoration: none; color: #fff; background: var(--hb-green); }
.hanout-block-actions a:hover { background: var(--hb-saffron); }
.hanout-hint { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: var(--hb-saffron-soft); color: var(--hb-green); font-size: 12px; font-weight: 700; line-height: 1.5; }
.hanout-error-notice .hanout-hint, .msp-inline-my-account-12 .hanout-hint { display: block; width: fit-content; margin: 6px auto 0; }

/* ----- Formulaires ----- */
.hanout-form-group { margin-bottom: 18px; }
.hanout-form-group label { display: block; margin-bottom: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--hb-green); }
.hanout-form-group input, .hanout-form-group textarea {
    width: 100%; padding: 12px 15px; border: 1.5px solid #e4d9c4; border-radius: 12px; background: #fdfbf7;
    font: inherit; font-size: 14px; font-weight: 500; color: var(--hb-ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
.hanout-form-group input:focus, .hanout-form-group textarea:focus { outline: none; background: #fff; border-color: var(--hb-saffron); box-shadow: 0 0 0 4px rgba(200, 155, 60, .16); }
.hanout-form-group input.hanout-field-error { border-color: var(--hb-terra); background: #fff8f5; box-shadow: 0 0 0 3px rgba(180, 83, 42, .12); }
.hanout-field-link { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.4; color: #8a7a5c; text-align: end; text-decoration: none; }
a.hanout-field-link:hover { color: var(--hb-green); text-decoration: underline; }

.hanout-btn-action, .hb-btn {
    display: block; width: 100%; padding: 14px 20px; border: 0; border-radius: 12px; cursor: pointer; text-align: center; text-decoration: none;
    font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.hanout-btn-action, .hb-btn-primary { color: #fff; background: linear-gradient(135deg, var(--hb-green-2), var(--hb-green)); box-shadow: 0 8px 20px rgba(20, 57, 42, .2); }
.hanout-btn-action:hover, .hb-btn-primary:hover { transform: translateY(-1px); background: linear-gradient(135deg, #c89b3c, #b4862a); color: #fff; box-shadow: 0 10px 22px rgba(200, 155, 60, .32); }
.hb-btn-ghost { color: var(--hb-green); background: transparent; border: 1.5px solid var(--hb-green); box-shadow: none; }
.hb-btn-ghost:hover { background: var(--hb-green); color: #fff; }

.msp-inline-my-account-04, .msp-inline-my-account-06, .msp-inline-my-account-08 { text-align: center; margin: 20px 0 0; font-size: 13px; color: var(--hb-muted); }
.msp-inline-my-account-05, .msp-inline-my-account-07, .msp-inline-my-account-09, .msp-inline-my-account-32 { color: var(--hb-green); font-weight: 700; text-decoration: none; border-bottom: 1.5px solid var(--hb-saffron); }
.msp-inline-my-account-05:hover, .msp-inline-my-account-07:hover, .msp-inline-my-account-09:hover, .msp-inline-my-account-32:hover { color: var(--hb-saffron); }

/* ==========================================================================
   Tableau de bord : bandeau, onglets, panneaux compacts
   ========================================================================== */
.hb-hero {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 46px 30px 26px;
    color: #fff; background: linear-gradient(135deg, #123325 0%, #14392a 55%, #1f5a3b 100%);
}
.hb-hero::before { content: ''; position: absolute; inset: 0; background: var(--hb-zellige) center / 56px 56px; opacity: .55; pointer-events: none; }
.hb-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--hb-saffron), transparent); }
.hb-hero > * { position: relative; z-index: 1; }
.hb-hero-id { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 0 1 auto; }
.hb-avatar {
    flex: 0 0 auto; width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', Georgia, serif; font-size: 27px; font-weight: 800; color: var(--hb-green);
    background: linear-gradient(135deg, #e3bf6a, #c89b3c); box-shadow: 0 0 0 4px rgba(227, 191, 106, .25);
}
.hb-hello { margin: 0; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #e3c98a; font-weight: 700; }
.hb-name { margin: 2px 0 7px; font-family: 'Playfair Display', Georgia, serif; font-size: 26px; line-height: 1.15; color: #fff; font-weight: 800; overflow-wrap: anywhere; }
.hb-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #f3e6c6; background: rgba(255, 255, 255, .1); border: 1px solid rgba(227, 201, 138, .45); }
.hb-points { flex: 0 0 auto; width: 84px; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px; text-align: center; border-radius: 14px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(227, 201, 138, .5); }
.hb-points span { display: block; font-size: 8.5px; line-height: 1.25; letter-spacing: .8px; text-transform: uppercase; color: #e3c98a; font-weight: 700; }
.hb-points strong { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; line-height: 1; color: #fff; }
.hb-logout { position: absolute; top: 12px; right: 14px; margin: 0; }
.hb-logout button { padding: 5px 11px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #f0d9d0; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: all .15s; }
.hb-logout button:hover { background: rgba(180, 83, 42, .6); border-color: transparent; color: #fff; }

.hb-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hb-tabs { display: flex; gap: 4px; margin: 20px 22px 0; padding: 5px; border-radius: 14px; background: var(--hb-sand); }
.hb-tabs label {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 10px; border-radius: 10px; cursor: pointer;
    font-size: 13px; font-weight: 700; color: var(--hb-muted); transition: background .2s, color .2s, box-shadow .2s; user-select: none;
}
.hb-tabs label:hover { color: var(--hb-green); }
.hb-tabs label em { font-style: normal; font-size: 11px; min-width: 20px; padding: 1px 6px; border-radius: 999px; color: #fff; background: var(--hb-terra); }
#hb-tab-apercu:checked ~ .hb-tabs label[for="hb-tab-apercu"],
#hb-tab-filleuls:checked ~ .hb-tabs label[for="hb-tab-filleuls"],
#hb-tab-profil:checked ~ .hb-tabs label[for="hb-tab-profil"] { background: #fff; color: var(--hb-green); box-shadow: 0 3px 10px rgba(20, 57, 42, .1); }
#hb-tab-apercu:focus-visible ~ .hb-tabs label[for="hb-tab-apercu"],
#hb-tab-filleuls:focus-visible ~ .hb-tabs label[for="hb-tab-filleuls"],
#hb-tab-profil:focus-visible ~ .hb-tabs label[for="hb-tab-profil"] { outline: 2px solid var(--hb-saffron); outline-offset: 2px; }

.hb-panels { padding: 20px 22px 26px; }
.hb-panel { display: none; animation: hb-fade .25s ease; }
#hb-tab-apercu:checked ~ .hb-panels .hb-panel-apercu,
#hb-tab-filleuls:checked ~ .hb-panels .hb-panel-filleuls,
#hb-tab-profil:checked ~ .hb-panels .hb-panel-profil { display: block; }
@keyframes hb-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hb-card { padding: 20px 22px; border-radius: 16px; background: var(--hb-cream); border: 1px solid var(--hb-line); }
.hb-card h2 { margin: 0 0 12px; font-family: 'Playfair Display', Georgia, serif; font-size: 17px; color: var(--hb-green); font-weight: 800; }
.hb-card-actions { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, #fffdf8, #f8efd9); border-color: #ecd9a6; }
.hb-card-actions { justify-content: flex-start; }
.hb-card-actions h2 { margin-bottom: 6px; }
.hb-card-actions form { margin: 0; }
.hb-muted { margin: 0; color: var(--hb-muted); font-size: 13px; line-height: 1.55; }
.hb-small { font-size: 12px; text-align: center; }
.hb-order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.hb-order-top strong { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; color: var(--hb-green); }
.hb-status { padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #7a5a14; background: var(--hb-saffron-soft); border: 1px solid #e5cf92; }
.hb-order-total { margin: 10px 0; padding: 10px 0; border-top: 1px dashed var(--hb-line); border-bottom: 1px dashed var(--hb-line); font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 800; color: var(--hb-green); }
.hb-order-total small { font-size: 13px; color: var(--hb-muted); font-family: inherit; }

/* Filleuls */
.hb-filleuls-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 6px; padding: 14px 18px; border-radius: 14px; background: var(--hb-saffron-soft); color: #6f5314; font-size: 13px; font-weight: 600; }
.hb-filleuls-total strong { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; color: var(--hb-green); }
.hanout-filleul-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 340px; overflow-y: auto; }
.hanout-filleul-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--hb-line); }
.hanout-filleul-list li:last-child { border-bottom: 0; }
.hanout-filleul-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hanout-filleul-main strong { color: var(--hb-green); font-size: 14.5px; }
.hanout-filleul-main span { font-size: 12px; color: var(--hb-muted); }
.hanout-filleul-state.is-active { color: #1d6b3a; font-weight: 700; }
.hanout-filleul-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.hanout-filleul-side > span { font-weight: 800; color: #8a6a1f; font-size: 14px; }
.hanout-filleul-side small { color: var(--hb-muted); font-size: 11px; }
.hanout-filleul-wa { margin-top: 6px; padding: 6px 12px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: #fff; background: #25a55a; text-decoration: none; }
.hanout-filleul-wa:hover { background: #1c8a49; }

/* Profil */
.hb-contact { list-style: none; margin: 0 0 18px; padding: 4px 18px; border-radius: 14px; background: var(--hb-cream); border: 1px solid var(--hb-line); }
.hb-contact li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--hb-line); font-size: 13.5px; }
.hb-contact li:last-child { border-bottom: 0; }
.hb-contact span { font-size: 11px; letter-spacing: .7px; text-transform: uppercase; font-weight: 700; color: var(--hb-muted); }
.hb-contact strong { color: var(--hb-green); overflow-wrap: anywhere; text-align: right; }
.hb-fields { gap: 0 16px; }
.hb-form textarea { resize: vertical; }
.hb-security { margin: 0 0 18px; border: 1px solid var(--hb-line); border-radius: 12px; background: var(--hb-cream); }
.hb-security summary { padding: 13px 16px; cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--hb-green); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.hb-security summary::-webkit-details-marker { display: none; }
.hb-security summary::after { content: '+'; font-size: 19px; line-height: 1; color: var(--hb-saffron); }
.hb-security[open] summary::after { content: '–'; }
.hb-security[open] summary { border-bottom: 1px solid var(--hb-line); }
.hb-security .hanout-form-group { margin: 16px 16px 0; }
.hb-security .hanout-form-group:last-child { margin-bottom: 16px; }
.hb-form > .hb-btn { max-width: 320px; margin: 0 auto; }

/* Pages parentes : on retire l'espace au-dessus du bloc connexion */
body:has(.hanout-compte-page-bg) .page-header,
body:has(.hanout-compte-page-bg) .entry-header,
body:has(.hanout-compte-page-bg) .entry-title { display: none !important; }
body:has(.hanout-compte-page-bg) .site-main,
body:has(.hanout-compte-page-bg) .page-content,
body:has(.hanout-compte-page-bg) .elementor-widget-container,
body:has(.hanout-compte-page-bg) .elementor-widget-wrap,
body:has(.hanout-compte-page-bg) .elementor-column-wrap { padding-top: 0 !important; margin-top: 0 !important; }
body:has(.hanout-compte-page-bg) .elementor-section,
body:has(.hanout-compte-page-bg) .e-con { padding-top: 0 !important; margin-top: 0 !important; }

/* ----- Mobile ----- */
@media (max-width: 720px) {
    .hanout-compte-box { padding: 40px 22px 28px; border-radius: 18px; }
    .hanout-compte-box.is-dashboard { padding: 0; }
    .hb-hero { flex-wrap: nowrap; gap: 12px; padding: 44px 16px 22px; }
    .hb-avatar { width: 52px; height: 52px; font-size: 22px; }
    .hb-hero-id { gap: 12px; }
    .hb-points { width: 78px; height: 78px; }
    .hb-points strong { font-size: 20px; }
    .hb-name { font-size: 22px; }
    .hb-tabs { margin: 16px 14px 0; }
    .hb-tabs label { font-size: 12px; padding: 10px 6px; }
    .hb-panels { padding: 16px 14px 22px; }
    .hb-grid-2 { grid-template-columns: 1fr; }
    .hb-fields { gap: 0; }
}

/* ----- Arabe / RTL ----- */
[dir="rtl"] .hb-contact strong, [dir="rtl"] .hanout-filleul-side { text-align: left; }
[dir="rtl"] .hanout-filleul-side { align-items: flex-start; }
[dir="rtl"] .hb-logout { right: auto; left: 14px; }
[dir="rtl"] .hanout-block-notice { text-align: right; border-left: 1px solid #ecd9a6; border-right: 4px solid var(--hb-saffron); }
@media (prefers-reduced-motion: reduce) { .hb-panel { animation: none; } .hanout-btn-action, .hb-btn { transition: none; } }

/* ===== Parcours de connexion : liens au-dessus des champs, Afficher/Masquer, boutons d'aide ===== */
.hanout-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.hanout-label-row label { margin-bottom: 0; }
.hanout-mini-link { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: #78716c; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.hanout-mini-link:hover { color: var(--hb-saffron); text-decoration: underline; }

.hanout-password-wrapper { position: relative; display: flex; align-items: center; }
.hanout-password-wrapper input { width: 100%; padding-inline-end: 78px; }
.hanout-toggle-pass { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); padding: 4px 2px; border: 0; background: none; cursor: pointer; font-size: 11.5px; font-weight: 700; color: #78716c; text-transform: none; letter-spacing: 0; }
.hanout-toggle-pass:hover { color: var(--hb-saffron); }

.hanout-inline-action { display: inline; margin: 0; }
.hanout-block-actions button { padding: 8px 14px; border: 0; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; color: #fff; background: var(--hb-green); }
.hanout-block-actions button:hover { background: var(--hb-saffron); }
.msp-inline-my-account-12 .hanout-block-actions, .hanout-error-notice .hanout-block-actions { justify-content: center; }

/* Suivi d'avancement de la commande */
.hb-steps { list-style: none; margin: 14px 0 12px; padding: 0; display: flex; align-items: flex-start; }
.hb-steps li { position: relative; flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--hb-muted); }
.hb-steps li::before { content: ''; position: absolute; top: 9px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--hb-line); z-index: 0; }
.hb-steps li:first-child::before { display: none; }
.hb-steps li span { position: relative; z-index: 1; display: block; width: 20px; height: 20px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 2px solid var(--hb-line); box-sizing: border-box; }
.hb-steps li em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hb-steps-caption { margin: 0 0 10px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--hb-green-2); }
.hb-steps li.is-done::before, .hb-steps li.is-current::before { background: var(--hb-green-2); }
.hb-steps li.is-done span { background: var(--hb-green-2); border-color: var(--hb-green-2); }
.hb-steps li.is-current span { background: var(--hb-saffron); border-color: var(--hb-saffron); box-shadow: 0 0 0 4px rgba(200, 155, 60, .22); }
.hb-steps li.is-current { color: var(--hb-green); }
.hb-steps li.is-done { color: var(--hb-green-2); }
