/* ============================================================
   Sensathe Loyalty — Feuilles de fidelite
   Couleurs officielles Sensathe
   Compatible PrestaShop 1.6 / Transformer v4.8.0
   ============================================================ */

:root {
    --loyalty-green:       #516244;
    --loyalty-green-light: #d3dbb8;
    --loyalty-green-bg:    #eef1e6;
    --loyalty-cream:       #fbf7ee;
    --loyalty-text:        #2e3a2e;
    --loyalty-muted:       #7a8a72;
    --loyalty-border:      #d3dbb8;
    --loyalty-radius:      6px;
    --loyalty-shadow:      0 2px 8px rgba(81,98,68,0.10);
}

/* ── Page principale ────────────────────────────────────────── */
.loyalty-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 15px 40px;
    font-family: inherit;
    color: var(--loyalty-text);
}

/* ── Carte solde ────────────────────────────────────────────── */
.loyalty-balance-card {
    background: var(--loyalty-green);
    color: #fff;
    border-radius: var(--loyalty-radius);
    padding: 32px 36px;
    margin: 25px 0;
    text-align: center;
    box-shadow: var(--loyalty-shadow);
}

.loyalty-balance-card__greeting {
    font-size: 1em;
    opacity: 0.85;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.loyalty-balance-card__points {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.loyalty-balance-card__number {
    font-size: 3.4em;
    font-weight: 700;
    line-height: 1;
}

.loyalty-balance-card__unit {
    font-size: 1.3em;
    opacity: 0.8;
    font-weight: 400;
}

.loyalty-balance-card__equiv {
    font-size: 0.92em;
    opacity: 0.85;
    margin-top: 6px;
}

/* ── Sections ───────────────────────────────────────────────── */
.loyalty-section {
    background: #fff;
    border: 1px solid var(--loyalty-border);
    border-radius: var(--loyalty-radius);
    padding: 26px 30px;
    margin-bottom: 18px;
    box-shadow: var(--loyalty-shadow);
}

.loyalty-section__title {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--loyalty-green);
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--loyalty-green-bg);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Alertes ────────────────────────────────────────────────── */
.loyalty-alert {
    border-radius: var(--loyalty-radius);
    padding: 18px 22px;
    margin-bottom: 20px;
}

.loyalty-alert--success {
    background: var(--loyalty-cream);
    border: 1px solid var(--loyalty-green-light);
    border-left: 4px solid var(--loyalty-green);
}

.loyalty-alert--error {
    background: #fdf5f5;
    border: 1px solid #dbb8b8;
    border-left: 4px solid #a05050;
    color: #7a3030;
}

.loyalty-alert__body { line-height: 1.6; }

.loyalty-voucher-code {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px dashed var(--loyalty-green);
    border-radius: var(--loyalty-radius);
    padding: 10px 20px;
    margin: 14px 0 8px;
}

.loyalty-voucher-code__label {
    font-size: 0.85em;
    color: var(--loyalty-muted);
}

.loyalty-voucher-code__value {
    font-size: 1.3em;
    font-weight: 700;
    font-family: monospace;
    color: var(--loyalty-green);
    letter-spacing: 3px;
}

.loyalty-voucher-hint {
    font-size: 0.82em;
    color: var(--loyalty-muted);
    margin: 4px 0 0;
}

/* ── Formulaire conversion ──────────────────────────────────── */
.loyalty-convert-info {
    color: var(--loyalty-muted);
    margin-bottom: 18px;
    line-height: 1.6;
}

.loyalty-slider-wrap { margin-bottom: 22px; }

.loyalty-slider-label {
    display: block;
    font-size: 0.95em;
    margin-bottom: 12px;
    color: var(--loyalty-text);
}

.loyalty-slider {
    width: 100%;
    height: 6px;
    accent-color: var(--loyalty-green);
    cursor: pointer;
    border-radius: 3px;
}

.loyalty-convert-btn {
    background-color: var(--loyalty-green) !important;
    border-color: var(--loyalty-green) !important;
    color: #fff !important;
    padding: 10px 28px !important;
    font-size: 0.95em !important;
    border-radius: var(--loyalty-radius) !important;
    letter-spacing: 0.03em;
    transition: background-color 0.2s, border-color 0.2s;
}

.loyalty-convert-btn:hover {
    background-color: #3e4e33 !important;
    border-color: #3e4e33 !important;
}

/* ── Verrouille ─────────────────────────────────────────────── */
.loyalty-locked {
    background: var(--loyalty-cream);
    border: 1px solid var(--loyalty-border);
    border-radius: var(--loyalty-radius);
    padding: 20px 25px;
}

.loyalty-locked__progress {
    color: var(--loyalty-muted);
    font-size: 0.9em;
    display: block;
    margin-top: 6px;
}

/* ── Comment ca marche ──────────────────────────────────────── */
.loyalty-howto {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--loyalty-border);
    border-radius: var(--loyalty-radius);
    overflow: hidden;
}

.loyalty-howto__item {
    flex: 1;
    background: var(--loyalty-cream);
    padding: 18px 16px;
    text-align: center;
}

.loyalty-howto__item + .loyalty-howto__item {
    border-left: 1px solid var(--loyalty-border);
}

.loyalty-howto__text {
    font-size: 0.88em;
    line-height: 1.6;
    color: var(--loyalty-text);
}

.loyalty-howto__arrow {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--loyalty-cream);
    color: var(--loyalty-green);
    font-size: 1.2em;
    font-weight: 700;
    border-left: 1px solid var(--loyalty-border);
    border-right: 1px solid var(--loyalty-border);
}

.loyalty-bonuses {
    background: var(--loyalty-green-bg);
    border-radius: var(--loyalty-radius);
    padding: 16px 20px;
    font-size: 0.9em;
    border: 1px solid var(--loyalty-border);
}

.loyalty-bonuses__title {
    font-weight: 700;
    color: var(--loyalty-green);
    margin-bottom: 10px;
    font-size: 0.92em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.loyalty-bonuses ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}

.loyalty-bonuses ul li { padding: 3px 0; }

/* ── Historique ─────────────────────────────────────────────── */
.loyalty-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.loyalty-history-table th {
    background: var(--loyalty-green);
    color: #fff;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.loyalty-history-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--loyalty-green-bg);
    vertical-align: top;
}

.loyalty-history-table tr:last-child td { border-bottom: none; }
.loyalty-history-table tr:hover td { background: var(--loyalty-cream); }

.loyalty-row--positive .loyalty-history-points {
    color: var(--loyalty-green);
    font-weight: 700;
}

.loyalty-row--negative .loyalty-history-points {
    color: var(--loyalty-muted);
    font-weight: 600;
}

.loyalty-history-date { color: var(--loyalty-muted); white-space: nowrap; }
.loyalty-history-desc {
    display: block;
    color: var(--loyalty-muted);
    font-size: 0.82em;
    margin-top: 2px;
}

.loyalty-empty {
    color: var(--loyalty-muted);
    text-align: center;
    padding: 24px 0;
    font-style: italic;
}

/* ── Mon compte — bloc ──────────────────────────────────────── */
.loyalty-account-block { margin-bottom: 15px; }

.loyalty-account-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--loyalty-cream);
    border: 1px solid var(--loyalty-border);
    border-radius: var(--loyalty-radius);
    color: var(--loyalty-text);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.loyalty-account-link:hover {
    background: var(--loyalty-green-bg);
    border-color: var(--loyalty-green);
    text-decoration: none;
    color: var(--loyalty-text);
}

.loyalty-account-link__label {
    flex: 1;
    font-weight: 500;
    color: var(--loyalty-green);
}

.loyalty-account-link__badge {
    background: var(--loyalty-green);
    color: #fff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.loyalty-account-link__euros {
    opacity: 0.85;
    font-size: 0.85em;
    margin-left: 5px;
}

/* ── Page produit ───────────────────────────────────────────── */
.loyalty-product-points {
    background: var(--loyalty-cream);
    border: 1px solid var(--loyalty-border);
    border-left: 3px solid var(--loyalty-green);
    border-radius: 0 var(--loyalty-radius) var(--loyalty-radius) 0;
    padding: 8px 14px;
    margin: 10px 0;
    font-size: 0.9em;
    color: var(--loyalty-text);
}

.loyalty-product-points strong { color: var(--loyalty-green); }

/* ── Lien retour ────────────────────────────────────────────── */
.loyalty-back-link { margin-top: 25px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .loyalty-balance-card   { padding: 22px 18px; }
    .loyalty-balance-card__number { font-size: 2.6em; }
    .loyalty-section        { padding: 18px 15px; }
    .loyalty-howto          { flex-direction: column; }
    .loyalty-howto__item + .loyalty-howto__item { border-left: none; border-top: 1px solid var(--loyalty-border); }
    .loyalty-howto__arrow   { display: none; }
    .loyalty-history-table  { font-size: 0.8em; }
    .loyalty-history-table th,
    .loyalty-history-table td { padding: 8px 8px; }
}
