/* Maquettes UI Riverco — landing uniquement (aperçu fidèle à l'app) */
:root {
    --r-blue: #0b5cab;
    --r-blue-dark: #084a8f;
    --r-blue-light: #e8f2fc;
    --r-border: #dde3ea;
    --r-bg: #f5f6f8;
    --r-text: #111;
    --r-muted: #565959;
    --r-orange: #e47911;
    --r-green: #067d62;
}

.ui-browser {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 140, 215, 0.14);
    box-shadow: var(--shadow-lg);
}

.ui-browser__chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--r-border);
}

.ui-browser__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.ui-browser__dot:nth-child(1) { background: #ff6b6b; }
.ui-browser__dot:nth-child(2) { background: #ffc030; }
.ui-browser__dot:nth-child(3) { background: #51cf66; }

.ui-browser__url {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--r-muted);
}

.ui-browser__label {
    margin: 0.65rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ui-browser__viewport {
    font-family: Arial, sans-serif;
    font-size: 10px;
    line-height: 1.35;
    color: var(--r-text);
    background: var(--r-bg);
    overflow: hidden;
}

/* ── Shared app chrome ───────────────────────────────────── */
.r-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border-bottom: 1px solid var(--r-border);
}

.r-header__logo {
    width: 56px;
    height: 20px;
    object-fit: contain;
    object-position: left center;
}

.r-header__search {
    display: flex;
    min-width: 0;
}

.r-header__search input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--r-blue);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 4px 6px;
    font-size: 8px;
    color: #888;
}

.r-header__search button {
    border: 1.5px solid var(--r-blue);
    background: var(--r-blue);
    color: #fff;
    border-radius: 0 4px 4px 0;
    padding: 0 8px;
    font-size: 9px;
}

.r-header__actions {
    display: flex;
    gap: 4px;
}

.r-header__actions span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--r-blue-light);
    border: 1px solid #c5d9ef;
    display: block;
}

/* ── Accueil ─────────────────────────────────────────────── */
.ui-browser__viewport--accueil {
    height: 300px;
}

.ui-browser--hero .ui-browser__viewport--accueil {
    height: 340px;
}

.r-home-layout {
    display: grid;
    grid-template-columns: 72px 1fr 88px;
    gap: 6px;
    padding: 6px;
    height: calc(100% - 33px);
}

.r-sidebar {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 6px 4px;
}

.r-sidebar h4 {
    margin: 0 0 3px;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0 4px;
}

.r-sidebar a {
    display: block;
    padding: 3px 4px;
    font-size: 7px;
    color: var(--r-text);
    text-decoration: none;
    border-radius: 4px;
}

.r-sidebar a:hover {
    background: var(--r-blue-light);
}

.r-home-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.r-home-main h3 {
    margin: 0;
    font-size: 9px;
    color: var(--r-blue);
    padding-bottom: 2px;
    border-bottom: 2px solid var(--r-blue);
    width: fit-content;
}

.r-listing-row {
    display: flex;
    gap: 5px;
    overflow: hidden;
}

.r-listing-card {
    flex: 0 0 72px;
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 4px;
}

.r-listing-card__img {
    height: 44px;
    border-radius: 4px;
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
    margin-bottom: 3px;
}

.r-listing-card__img--2 {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
}

.r-listing-card__img--3 {
    background: linear-gradient(135deg, #bbf7d0, #4ade80);
}

.r-listing-card__badge {
    display: inline-block;
    font-size: 5.5px;
    font-weight: 700;
    color: var(--r-green);
    background: #e8f8f1;
    padding: 1px 3px;
    border-radius: 3px;
    margin-bottom: 2px;
}

.r-listing-card__badge--ent {
    color: var(--r-blue);
    background: var(--r-blue-light);
}

.r-listing-card strong {
    display: block;
    font-size: 6.5px;
    line-height: 1.25;
    margin-bottom: 2px;
}

.r-listing-card__stars {
    color: #f59e0b;
    font-size: 6px;
    margin-bottom: 1px;
}

.r-listing-card__seller {
    font-size: 5.5px;
    color: var(--r-muted);
}

.r-listing-card__price {
    font-size: 7px;
    font-weight: 700;
    margin-top: 2px;
}

.r-impact {
    background: linear-gradient(180deg, #eef6fc, #fff);
    border: 1px solid #c5dff5;
    border-radius: 6px;
    padding: 6px;
}

.r-impact h4 {
    margin: 0 0 4px;
    font-size: 8px;
    color: var(--r-blue);
}

.r-impact__chip {
    display: inline-block;
    font-size: 6.5px;
    background: var(--r-blue);
    color: #fff;
    padding: 2px 5px;
    border-radius: 999px;
    margin-bottom: 5px;
}

.r-impact__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.r-impact__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    font-size: 6px;
    padding: 3px 0;
    border-bottom: 1px solid #e2e8f0;
}

.r-impact__list li:last-child {
    border-bottom: none;
}

.r-impact__list button {
    font-size: 5.5px;
    padding: 2px 4px;
    border: 1px solid var(--r-blue);
    color: var(--r-blue);
    background: #fff;
    border-radius: 4px;
}

.r-impact__water {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #b6d4f0;
    font-size: 6px;
    color: #0a4c8f;
}

.r-impact__water strong {
    color: var(--r-green);
}

/* ── Profil ──────────────────────────────────────────────── */
.ui-browser__viewport--profil {
    height: 280px;
}

.r-profile-page {
    padding: 8px 10px 10px;
    height: calc(100% - 33px);
}

.r-profile-page > h2 {
    margin: 0 0 6px;
    font-size: 11px;
    color: var(--r-blue);
}

.r-profile-shell {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 8px;
    height: calc(100% - 20px);
}

.r-profile-nav {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 5px;
}

.r-profile-nav p {
    margin: 0 0 4px;
    font-size: 6.5px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.r-profile-nav a {
    display: block;
    font-size: 7px;
    padding: 4px 5px;
    border-radius: 4px;
    color: var(--r-text);
    text-decoration: none;
    margin-bottom: 2px;
}

.r-profile-nav a.is-active {
    background: var(--r-blue-light);
    color: var(--r-blue);
    font-weight: 700;
}

.r-profile-panel {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 8px;
}

.r-profile-panel h3 {
    margin: 0 0 4px;
    font-size: 9px;
    color: var(--r-blue);
}

.r-profile-panel > p {
    margin: 0 0 6px;
    font-size: 6.5px;
    color: var(--r-muted);
    line-height: 1.4;
}

.r-profile-card {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.r-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #334155;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.r-profile-avatar::after {
    content: "";
    position: absolute;
    inset: 8px 10px auto;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 14px 0 4px #fff;
}

.r-profile-info h4 {
    margin: 0 0 2px;
    font-size: 9px;
}

.r-profile-info .r-badge {
    display: inline-block;
    font-size: 6px;
    background: var(--r-blue-light);
    color: var(--r-blue);
    padding: 2px 5px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 4px;
}

.r-profile-fields {
    display: grid;
    gap: 3px;
    width: 100%;
}

.r-profile-fields div {
    display: flex;
    justify-content: space-between;
    font-size: 6.5px;
    padding: 3px 0;
    border-bottom: 1px solid #f1f5f9;
}

.r-profile-fields span:first-child {
    color: var(--r-muted);
}

.r-profile-xp {
    margin-top: 6px;
    padding: 5px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 5px;
    font-size: 6.5px;
}

.r-profile-xp strong {
    color: #b45309;
}

/* ── Item choisi ─────────────────────────────────────────── */
.ui-browser__viewport--item {
    height: 300px;
}

.r-item-wrap {
    padding: 4px 8px 8px;
    height: calc(100% - 33px);
}

.r-breadcrumb {
    font-size: 6.5px;
    color: var(--r-muted);
    margin-bottom: 5px;
}

.r-breadcrumb a {
    color: var(--r-blue);
    text-decoration: none;
}

.r-item-layout {
    display: grid;
    grid-template-columns: 34% 1fr 30%;
    gap: 6px;
    height: calc(100% - 14px);
}

.r-item-gallery {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 5px;
}

.r-item-gallery__main {
    height: 72px;
    border-radius: 4px;
    background: linear-gradient(145deg, #e0e7ff, #a5b4fc);
    margin-bottom: 4px;
}

.r-item-gallery__main--service {
    background: linear-gradient(145deg, #dbeafe, #60a5fa);
}

.r-item-gallery__thumbs {
    display: flex;
    gap: 3px;
}

.r-item-gallery__thumbs span {
    flex: 1;
    height: 18px;
    border-radius: 3px;
    background: #e2e8f0;
    border: 1.5px solid var(--r-blue);
}

.r-item-gallery__thumbs span:not(:first-child) {
    border-color: transparent;
}

.r-item-details {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 6px 7px;
}

.r-item-details h1 {
    margin: 0 0 3px;
    font-size: 9px;
    line-height: 1.25;
}

.r-item-details__stars {
    color: #f59e0b;
    font-size: 6.5px;
    margin-bottom: 4px;
}

.r-item-meta {
    margin: 0;
    display: grid;
    gap: 2px;
}

.r-item-meta div {
    display: flex;
    gap: 4px;
    font-size: 6.5px;
}

.r-item-meta dt {
    color: var(--r-muted);
    min-width: 42px;
}

.r-item-meta dd {
    margin: 0;
    font-weight: 600;
}

.r-item-buybox {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 6px;
}

.r-item-buybox__price {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.r-item-buybox__ship {
    font-size: 6.5px;
    color: var(--r-green);
    margin-bottom: 5px;
}

.r-item-buybox__qty {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 6.5px;
    margin-bottom: 5px;
}

.r-item-buybox__qty select {
    font-size: 6.5px;
    padding: 2px;
}

.r-item-buybox__btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 16px;
    background: var(--r-orange);
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    padding: 5px 6px;
    margin-bottom: 4px;
}

.r-item-buybox__btn--sec {
    background: #ffd814;
    color: var(--r-text);
}

.r-item-buybox__xp {
    font-size: 6px;
    text-align: center;
    color: var(--r-blue);
    background: var(--r-blue-light);
    padding: 3px;
    border-radius: 4px;
}

/* ── Showcase layout ─────────────────────────────────────── */
.ui-showcase__item {
    margin: 0;
}

.ui-showcase {
    max-width: var(--site-max);
    margin: 0 auto;
    padding: 0 var(--site-gutter) 3rem;
}

.ui-showcase__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.ui-showcase__item:nth-child(1) { order: 2; }
.ui-showcase__item:nth-child(2) { order: 3; }
.ui-showcase__item:nth-child(3) { order: 1; }

.hero-visual .ui-browser {
    max-width: 100%;
}

.hero-visual {
    min-height: auto;
    max-width: 480px;
}

/* ── XP + Achat (mission) ─────────────────────────────────── */
.ui-browser__viewport--xp-shop {
    height: 340px;
    position: relative;
    background: var(--r-bg);
}

.ui-browser--mission .ui-browser__viewport--xp-shop {
    height: 360px;
}

.r-header--xp {
    grid-template-columns: auto 1fr auto;
}

.r-header__xp-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    padding: 3px 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d;
    min-width: 72px;
}

.r-header__level {
    font-size: 8px;
    font-weight: 800;
    color: #b45309;
}

.r-header__xp {
    font-size: 7px;
    font-weight: 700;
    color: #92400e;
}

.r-xp-shop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    height: calc(100% - 33px);
}

.r-xp-shop__title {
    margin: 0 0 6px;
    font-size: 9px;
    color: var(--r-blue);
    border-bottom: 2px solid var(--r-blue);
    padding-bottom: 2px;
    width: fit-content;
}

.r-xp-shop__purchase,
.r-xp-shop__progression {
    background: #fff;
    border: 1px solid var(--r-border);
    border-radius: 8px;
    padding: 8px;
    min-height: 0;
    overflow: hidden;
}

.r-xp-shop__item {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
    padding: 5px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.r-xp-shop__item-img {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    flex-shrink: 0;
}

.r-xp-shop__item strong {
    display: block;
    font-size: 7px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.r-xp-shop__item-price {
    font-size: 8px;
    font-weight: 800;
    color: var(--r-text);
}

.r-xp-shop__purchase .r-item-buybox__btn {
    width: 100%;
    margin-bottom: 6px;
    font-size: 7px;
    padding: 5px;
}

.r-cart-mini {
    border: 1px solid var(--r-border);
    border-radius: 6px;
    padding: 6px;
    background: #fafbfd;
}

.r-cart-mini__head {
    display: flex;
    justify-content: space-between;
    font-size: 7px;
    margin-bottom: 4px;
    color: var(--r-muted);
}

.r-cart-mini__head strong {
    color: var(--r-text);
    font-size: 7.5px;
}

.r-cart-mini__row,
.r-cart-mini__total {
    display: flex;
    justify-content: space-between;
    font-size: 6.5px;
    padding: 2px 0;
}

.r-cart-mini__total {
    border-top: 1px solid #e2e8f0;
    margin: 4px 0;
    padding-top: 4px;
    font-weight: 700;
}

.r-cart-mini__total strong {
    font-size: 8px;
}

.r-cart-mini .r-item-buybox__btn--sec {
    width: 100%;
    margin-top: 4px;
    font-size: 6.5px;
    padding: 4px;
}

.r-cart-mini__xp-hint {
    margin: 4px 0 0;
    font-size: 6px;
    text-align: center;
    color: var(--r-blue);
    font-weight: 600;
}

.r-xp-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 5px;
}

.r-xp-stats div {
    background: #f8fafc;
    border-radius: 5px;
    padding: 4px 5px;
    border: 1px solid #e2e8f0;
}

.r-xp-stats span {
    display: block;
    font-size: 6px;
    color: var(--r-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.r-xp-stats strong {
    font-size: 9px;
    color: var(--r-blue);
}

.r-xp-progress {
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.r-xp-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--r-blue), #3d9eef);
    border-radius: 999px;
}

.r-xp-progress__hint {
    margin: 0 0 6px;
    font-size: 6px;
    color: var(--r-muted);
    line-height: 1.35;
}

.r-xp-streak {
    padding: 5px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    margin-bottom: 6px;
}

.r-xp-streak strong {
    display: block;
    font-size: 6.5px;
    margin-bottom: 4px;
    color: #92400e;
}

.r-xp-streak__days {
    display: flex;
    gap: 3px;
    margin-bottom: 4px;
}

.r-xp-streak__days span {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: #e2e8f0;
    font-size: 5.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.r-xp-streak__days .is-done {
    background: #86efac;
    color: #166534;
}

.r-xp-streak__days .is-today {
    background: var(--r-blue);
    color: #fff;
    box-shadow: 0 0 0 2px #bfdbfe;
}

.r-xp-streak__btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    background: var(--r-blue);
    color: #fff;
    font-size: 6px;
    font-weight: 700;
    padding: 4px;
    cursor: default;
}

.r-xp-log {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 3px;
}

.r-xp-log li {
    display: flex;
    gap: 5px;
    align-items: baseline;
    font-size: 6px;
    color: var(--r-muted);
    padding: 3px 0;
    border-bottom: 1px solid #f1f5f9;
}

.r-xp-log li:last-child {
    border-bottom: none;
}

.r-xp-log__delta {
    font-weight: 800;
    color: var(--r-green);
    white-space: nowrap;
}

.r-xp-toast {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #86efac;
    box-shadow: 0 8px 24px rgba(6, 125, 98, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
    text-align: center;
    min-width: 140px;
    animation: r-xp-toast-pulse 2.5s ease-in-out infinite;
}

.r-xp-toast strong {
    display: block;
    font-size: 8px;
    color: var(--r-green);
    margin-bottom: 1px;
}

.r-xp-toast span {
    font-size: 6px;
    color: var(--r-muted);
}

@keyframes r-xp-toast-pulse {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

.mission-visual .ui-browser {
    max-width: 100%;
}

.mission-visual {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (max-width: 960px) {
    .vision-grid--pillars .pillar-list {
        grid-template-columns: 1fr;
    }

    .ui-showcase__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        max-width: 100%;
        margin-top: 1.5rem;
    }
}
