/* ==========================================================================
   Mon Univers Créatif — feuille de style de l'application
   ========================================================================== */

:root {
    --creme: #FFFAF6;
    --prune: #342B3B;
    --corail: #FF6F91;
    --violet: #A78BFA;
    --turquoise: #43C6C8;
    --soleil: #FFD166;
    --menthe: #7BCFA5;
    --peche: #FF9F68;

    --ink: #342B3B;
    --muted: #7A7180;
    --line: rgba(52, 43, 59, .10);
    --line-strong: rgba(52, 43, 59, .18);
    --card: #FFFFFF;

    --radius: 20px;
    --radius-sm: 14px;
    --radius-lg: 28px;
    --shadow: 0 6px 20px rgba(52, 43, 59, .07);
    --shadow-soft: 0 2px 10px rgba(52, 43, 59, .05);
    --tabbar-h: 64px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--creme);
    padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.15; letter-spacing: -0.02em; }

p { margin: 0 0 12px; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Mise en page ---------- */

.wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px;
}

.section { margin: 30px 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.section-head .more {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.page-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 18px 0 6px;
}

.page-sub {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 20px;
}

/* ---------- Bouton menu ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 18px 0;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

.menu-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .12s ease;
}

.menu-btn:active { transform: scale(.94); }

.menu-btn svg { width: 22px; height: 22px; stroke: var(--prune); }

/* ---------- Menu latéral ---------- */

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(52, 43, 59, .38);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 9000;
}

.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82%;
    max-width: 320px;
    background: #fff;
    border-radius: 0 24px 24px 0;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s cubic-bezier(.32, .72, 0, 1), visibility .28s ease;
    z-index: 9100;
    display: flex;
    flex-direction: column;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}

.drawer.open { transform: translateX(0); visibility: visible; pointer-events: auto; }

.drawer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.drawer-head img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    flex: 0 0 auto;
}

.drawer-head .name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.drawer-head .role {
    font-size: 12px;
    color: var(--muted);
}

.drawer-close {
    margin-left: auto;
    background: none;
    border: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: 10px;
    color: var(--muted);
}

.drawer-close svg { width: 18px; height: 18px; stroke: currentColor; }

.drawer nav { display: flex; flex-direction: column; gap: 2px; }

.drawer nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: background .15s ease;
}

.drawer nav a:active { background: rgba(52, 43, 59, .05); }

.drawer nav a svg { width: 19px; height: 19px; stroke: var(--prune); opacity: .75; flex: 0 0 auto; }

.drawer-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- Barre du bas flottante ---------- */

.tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--tabbar-h);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    box-shadow: 0 8px 26px rgba(52, 43, 59, .12);
    z-index: 8000;
    max-width: 520px;
    margin: 0 auto;
}

.tabbar a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #9A929F;
    position: relative;
    border-radius: 22px;
    transition: color .15s ease, transform .12s ease;
}

.tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }

.tabbar a.active { color: var(--corail); }

.tabbar a:active { transform: scale(.95); }

.tabbar .badge {
    position: absolute;
    top: 8px;
    right: 50%;
    margin-right: -20px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--corail);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, opacity .15s ease, background .15s ease;
    white-space: nowrap;
    text-align: center;
}

.btn:active { transform: scale(.975); }

.btn-primary { background: var(--corail); color: #fff; }

.btn-dark { background: var(--prune); color: #fff; }

.btn-ghost { background: #fff; border-color: var(--line-strong); }

.btn-soft { background: rgba(255, 111, 145, .12); color: #C33C60; }

.btn-block { width: 100%; }

.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; }

.btn[disabled] { opacity: .55; pointer-events: none; }

.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Cartes ---------- */

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.card + .card { margin-top: 14px; }

.card-flat {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.stack { display: flex; flex-direction: column; gap: 12px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.muted { color: var(--muted); font-size: 13px; }

.big-num { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Accueil : titre + galerie ---------- */

.app-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 4px;
}

.app-head img {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    object-fit: cover;
}

.app-head h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero {
    margin: 16px 0 0;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.hero-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hero-track::-webkit-scrollbar { display: none; }

.hero-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: min(66vh, 520px);
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 6s linear;
}

.hero-slide.active img { transform: scale(1.08); }

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 65%;
    background: linear-gradient(to top, rgba(35, 26, 40, .72), rgba(35, 26, 40, 0));
    pointer-events: none;
}

.hero-text {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: #fff;
    pointer-events: none;
    z-index: 2;
}

.hero-text h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.hero-text p { margin: 0; font-size: 14px; opacity: .92; }

.hero-dots {
    position: absolute;
    top: 14px;
    left: 20px;
    display: flex;
    gap: 5px;
    z-index: 3;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-dots span {
    width: 6px;
    height: 6px;
    border-radius: 4px;
    background: rgba(52, 43, 59, .3);
    transition: width .3s ease, background .3s ease;
}

.hero-dots span.on { width: 18px; background: var(--corail); }

.hero-cta { margin-top: 14px; }

/* ---------- Bandeaux qui défilent ---------- */

.band {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 18px 8px;
    margin: 0 -18px;
    scrollbar-width: none;
}

.band::-webkit-scrollbar { display: none; }

.band-card {
    flex: 0 0 78%;
    max-width: 280px;
    scroll-snap-align: start;
    background: transparent;
}

.band-card .thumb {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #F1EBE4;
}

.band-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.band-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 10px 0 2px;
}

.band-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- Rubriques colorées ---------- */

.rubriques {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rubrique {
    border-radius: var(--radius);
    padding: 16px;
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .12s ease;
}

.rubrique:active { transform: scale(.97); }

.rubrique .ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .62);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rubrique .ico svg { width: 20px; height: 20px; stroke: var(--prune); fill: none; }

.rubrique strong { font-size: 15px; font-weight: 700; display: block; line-height: 1.25; }

.rubrique span { font-size: 12px; color: rgba(52, 43, 59, .68); display: block; margin-top: 2px; }

.bg-corail { background: rgba(255, 111, 145, .20); }
.bg-violet { background: rgba(167, 139, 250, .22); }
.bg-turquoise { background: rgba(67, 198, 200, .20); }
.bg-soleil { background: rgba(255, 209, 102, .28); }
.bg-menthe { background: rgba(123, 207, 165, .24); }
.bg-peche { background: rgba(255, 159, 104, .22); }
.bg-rose { background: rgba(255, 111, 145, .14); }
.bg-prune { background: rgba(52, 43, 59, .10); }

/* ---------- Ligne d'info ---------- */

.info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0;
}

.info-line svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; flex: 0 0 auto; }

/* ---------- Liste de cartes / lignes ---------- */

.list { display: flex; flex-direction: column; gap: 10px; }

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    box-shadow: var(--shadow-soft);
}

.list-item .avatar {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    object-fit: cover;
    flex: 0 0 auto;
    background: #F1EBE4;
}

.list-item .body { flex: 1 1 auto; min-width: 0; }

.list-item .body strong { font-size: 15px; display: block; }

.list-item .body span { font-size: 13px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Formulaires ---------- */

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}

.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.input, select.input, textarea.input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
}

select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7180' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

.input:focus { border-color: var(--corail); box-shadow: 0 0 0 3px rgba(255, 111, 145, .16); }

.field-row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }

.checkline { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 10px 0; }

.checkline input { width: 20px; height: 20px; accent-color: var(--corail); }

/* ---------- Puces / filtres ---------- */

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 18px 10px;
    margin: 0 -18px;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 15px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}

.chip.on { background: var(--prune); color: #fff; border-color: var(--prune); }

/* ---------- Grille produits (catalogue) ---------- */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 12px;
    row-gap: 18px;
}

.grid-2 > * { min-width: 0; }

.prod {
    display: block;
    min-width: 0;
}

.prod .pic {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: #F1EBE4;
    display: block;
}

.prod .pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prod .name {
    font-size: 15px;
    font-weight: 700;
    margin: 8px 0 2px;
    line-height: 1.25;
}

.prod .desc {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod .foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.prod .price { font-size: 15px; font-weight: 700; }

.prod .add {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: var(--corail);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform .12s ease;
}

.prod .add:active { transform: scale(.9); }

.prod .add svg { width: 16px; height: 16px; stroke: #fff; fill: none; }

/* ---------- Bande de produits en pages qui se tournent ---------- */

.book-wrap {
    margin: 0 -18px;
    padding: 0 18px;
}

.book {
    perspective: 1600px;
    width: 100%;
    position: relative;
}

.book-stage {
    position: relative;
    width: 100%;
    height: 300px;
    transform-style: preserve-3d;
    touch-action: pan-y;
}

.book-page {
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(52, 43, 59, .10);
    transform-origin: left center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.book-page.hidden-page { display: none; }

.book-page .pic {
    flex: 0 0 68%;
    overflow: hidden;
    background: #F1EBE4;
}

.book-page .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.book-page .txt { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 2px; }

.book-page .txt h3 { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.2; }

.book-page .txt .meta { font-size: 12px; color: var(--muted); }

.book-page .txt .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

.book-page .txt .price { font-weight: 700; font-size: 15px; }

.book-page .shadow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to right, rgba(35, 26, 40, .32), rgba(35, 26, 40, 0));
    opacity: 0;
}

.book-page .back {
    position: absolute;
    inset: 0;
    background: #F4EDE6;
    border-radius: 18px;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    pointer-events: none;
}

.book-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.book-nav button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--prune);
}

.book-nav button[disabled] { opacity: .35; pointer-events: none; }

.book-nav button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.book-nav .ind { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.book-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 2px;
    color: var(--corail);
    font-size: 12px;
    font-weight: 600;
}

.book-hint svg { width: 46px; height: 26px; stroke: var(--corail); fill: none; }

.book-scroll-fallback {
    display: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.book-scroll-fallback::-webkit-scrollbar { display: none; }

.book-scroll-fallback > * { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; }

/* ---------- Toast ---------- */

.toast-host {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom));
    z-index: 9500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    max-width: 420px;
    width: 100%;
    background: var(--prune);
    color: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(52, 43, 59, .22);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.toast.ok { background: #2E7D5B; }

.toast.err { background: #B3354F; }

/* ---------- État vide ---------- */

.empty {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.empty svg { width: 34px; height: 34px; stroke: var(--line-strong); fill: none; margin-bottom: 8px; }

.empty h3 { font-size: 16px; margin-bottom: 4px; }

.empty p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

/* ---------- Pied de page ---------- */

.footer {
    margin: 40px 0 0;
    background: #FBF1EA;
    border-radius: 24px 24px 0 0;
    padding: 28px 20px 24px;
}

.footer .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.footer .brand img { width: 40px; height: 40px; border-radius: 12px; }

.footer .brand strong { font-size: 16px; }

.footer p { font-size: 13px; color: var(--muted); margin: 0 0 12px; max-width: 420px; }

.footer .links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; margin: 14px 0; }

.footer .links a { color: var(--ink); }

.footer .copy { font-size: 12px; color: var(--muted); margin-top: 14px; }

.footer .admin-link { font-size: 11px; color: #A79FA9; }

/* ---------- Bouton installer ---------- */

.install-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    margin: 18px 0;
}

.install-card .ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 111, 145, .14); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

.install-card .ico svg { width: 20px; height: 20px; stroke: var(--corail); fill: none; }

.install-card p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

/* ---------- Modale ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(52, 43, 59, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.modal.open { opacity: 1; visibility: visible; }

.modal-box {
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    width: 100%;
    max-width: 420px;
    max-height: 86vh;
    overflow-y: auto;
}

.modal-box h3 { font-size: 19px; margin-bottom: 8px; }

/* ---------- Panier ---------- */

.cart-row {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 12px;
    box-shadow: var(--shadow-soft);
}

.cart-row img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: #F1EBE4; }

.cart-row .body { flex: 1 1 auto; min-width: 0; }

.cart-row .body strong { font-size: 14px; display: block; }

.cart-row .body .m { font-size: 12px; color: var(--muted); }

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
    height: 34px;
}

.qty button {
    width: 32px;
    height: 32px;
    border: 0;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--ink);
}

.qty span { min-width: 26px; text-align: center; font-size: 14px; font-weight: 600; }

.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }

.summary-line.total { font-size: 17px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* ---------- Badges / statuts ---------- */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    background: rgba(52, 43, 59, .07);
    color: var(--prune);
}

.tag.corail { background: rgba(255, 111, 145, .16); color: #C33C60; }
.tag.menthe { background: rgba(123, 207, 165, .22); color: #2E7D5B; }
.tag.soleil { background: rgba(255, 209, 102, .3); color: #8A6410; }
.tag.turquoise { background: rgba(67, 198, 200, .2); color: #1F7C7D; }
.tag.violet { background: rgba(167, 139, 250, .22); color: #5B3FBF; }

/* ---------- Divers ---------- */

.tabs-inline {
    display: flex;
    gap: 6px;
    background: rgba(52, 43, 59, .06);
    padding: 4px;
    border-radius: 999px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-inline::-webkit-scrollbar { display: none; }

.tabs-inline button {
    flex: 1 0 auto;
    height: 38px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted);
    white-space: nowrap;
}

.tabs-inline button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-soft); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }

.swatch {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

.center { text-align: center; }

.photo-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photo-upload img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; }

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 18px calc(var(--tabbar-h) + 40px);
    background: linear-gradient(160deg, rgba(255, 111, 145, .22), rgba(167, 139, 250, .18) 45%, rgba(67, 198, 200, .18));
}

.auth-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    border-radius: 26px;
    padding: 26px 22px;
    box-shadow: 0 14px 40px rgba(52, 43, 59, .12);
}

.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; }

.auth-logo img { width: 64px; height: 64px; border-radius: 18px; }

.auth-logo h1 { font-size: 24px; text-align: center; margin: 0; }

.auth-logo p { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }

/* ---------- Écran d'ouverture ---------- */

#app-splash {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #FF6F91;
    color: #fff;
}

#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }

#app-splash .splash-name { font-size: 18px; font-weight: 700; }

@keyframes splashOut { to { opacity: 0; visibility: hidden; } }


/* ---------- Bandeau pastel illustré ---------- */

.pastel-banner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #FFE3EC, #EDE4FF 45%, #DFF6F6);
    padding: 10px;
}

.pastel-banner svg { width: 92%; height: auto; max-height: 82%; }

.hero-slide.is-soft::after { display: none; }

.hero-slide.is-soft .hero-text { color: var(--prune); }

.hero-slide.is-soft .hero-text p { color: rgba(52, 43, 59, .72); }

.mini-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.mini-card .ico {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 209, 102, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.mini-card .ico svg { width: 18px; height: 18px; stroke: var(--prune); fill: none; }

.mini-card strong { display: block; font-size: 16px; }

.mini-card .sub { font-size: 13px; color: var(--muted); }

.stat-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-tile {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
}

.stat-tile .n { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

.stat-tile .l { font-size: 12px; color: var(--muted); }

/* ---------- Vue ordinateur ---------- */

.sidenav { display: none; }

@media (min-width: 768px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .hero-slide { aspect-ratio: 16 / 9; max-height: 460px; }
    .book-stage { height: 340px; }
}

@media (min-width: 900px) {
    body { padding-bottom: 40px; padding-left: 260px; }

    .tabbar { display: none; }

    .topbar { display: none; }

    .sidenav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        background: #fff;
        padding: 22px 16px;
        gap: 6px;
        overflow-y: auto;
        z-index: 8000;
    }

    .sidenav .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 18px;
        padding: 0 6px;
    }

    .sidenav .brand img { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px; }

    .sidenav .brand strong { font-size: 15px; line-height: 1.2; display: block; }

    .sidenav .brand span { font-size: 11px; color: var(--muted); }

    .sidenav nav { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; }

    .sidenav nav a {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 10px 12px;
        border-radius: 11px;
        font-size: 14px;
        font-weight: 500;
    }

    .sidenav nav a:hover { background: rgba(52, 43, 59, .05); }

    .sidenav nav a.active { background: rgba(255, 111, 145, .13); color: #C33C60; font-weight: 600; }

    .sidenav nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; opacity: .75; }

    .sidenav .side-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

    .wrap { padding: 0 40px; }

    .page-title { font-size: 40px; }

    .app-head h1 { font-size: 40px; }

    .app-head img { width: 40px; height: 40px; }

    .hero { max-width: 1100px; }

    .hero-slide { aspect-ratio: 21 / 9; max-height: 460px; }

    .band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; overflow: visible; padding: 0; margin: 0; }

    .band-card { max-width: none; flex: none; }

    .book-wrap { margin: 0; padding: 0; }

    .book { display: none; }

    .book-scroll-fallback { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; overflow: visible; }

    .book-scroll-fallback > * { flex: none; max-width: none; }

    .book-nav, .book-hint { display: none; }

    .grid-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }

    .rubriques { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .footer { border-radius: 28px; margin-top: 60px; }

    .auth-shell { padding-left: 300px; }
}

@media (min-width: 1400px) {
    .grid-2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .book-scroll-fallback { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
    .sidenav { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    .hero-slide img { transform: none !important; }
}

/* ---------- Barre de progression ---------- */

.progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(52, 43, 59, .09);
    overflow: hidden;
}

.progress > i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--corail);
    transition: width .3s ease;
}

/* ---------- Utilitaires ---------- */

.center-block { margin-left: auto; margin-right: auto; }

.nowrap { white-space: nowrap; }

.admin-tabbar a span { line-height: 1.1; }

/* ==========================================================================
   REFONTE FIDÈLE À LA MAQUETTE
   (surcharges : ce bloc remplace l'ancien chrome, rien n'est supprimé
   au-dessus pour ne pas casser les autres pages)
   ========================================================================== */

:root {
    --muted: #716A77;
    --line: #EEE6EB;
    --line-strong: #E7DDE6;
    --radius: 20px;
    --radius-sm: 14px;
    --radius-lg: 26px;
    --shadow: 0 14px 38px rgba(72, 48, 71, .08);
    --shadow-soft: 0 7px 20px rgba(72, 48, 71, .035);
    --u: 1280px;
    --tabbar-h: 62px;
}

body {
    font-size: 15px;
    padding-left: 0 !important;
    padding-bottom: calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom));
}

.input,
.input:not(select),
textarea.input { font-size: 16px; }

/* ---------- En-tête ---------- */

.topbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 8000;
    padding: 0;
    background: rgba(255, 250, 246, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: var(--u);
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-site {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.025em;
    color: var(--prune);
}

.brand-site span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 13px;
    background: conic-gradient(from 15deg, var(--corail), var(--peche), var(--soleil), var(--menthe), var(--turquoise), var(--violet), var(--corail));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 19px;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(255, 111, 145, .24);
}

.topnav {
    display: none;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    color: #5E5665;
    font-size: 14px;
    min-width: 0;
}

.topnav a { white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }

.topnav a:hover { color: #9B63DE; }

.topnav a.active { color: #9B63DE; border-bottom-color: var(--violet); font-weight: 650; }

.top-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .12s ease;
    padding: 0;
}

/* le bouton menu sert seulement quand la navigation horizontale est cachée */
@media (min-width: 1000px) {
    .top-actions .js-open-menu { display: none; }
}

.icon-btn:active { transform: scale(.95); }

.icon-btn svg { width: 20px; height: 20px; stroke: var(--prune); fill: none; }

.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 13px;
    padding: 9px 12px;
    color: #51485A;
    font-weight: 650;
    font-size: 12.5px;
    white-space: nowrap;
    line-height: 1;
}

.sidenav { display: none !important; }

/* ---------- Cadre de page ---------- */

.wrap { max-width: var(--u); padding: 0 16px; }

.crumb { font-size: 12.5px; color: var(--muted); margin: 16px 0 12px; }

.page-title { font-size: clamp(26px, 4vw, 33px); margin: 4px 0 6px; }

.page-sub { font-size: 14px; color: var(--muted); margin: 0 0 18px; }

.section { margin: 32px 0; }

.section-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.section-head h2 { font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }

.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }

.section-head .more { font-size: 12.5px; font-weight: 700; color: #8659B7; }

/* rangée de puces défilante : alignée sur la marge réelle de la page */
.chips {
    padding: 2px 16px 10px;
    margin: 0 -16px;
    gap: 7px;
}

.chips .chip { height: 34px; padding: 0 13px; font-size: 12.5px; font-weight: 500; }

@media (min-width: 620px) {
    .chips { padding: 2px 22px 10px; margin: 0 -22px; }
}

@media (min-width: 1000px) {
    .chips { padding: 2px 0 10px; margin: 0; flex-wrap: wrap; overflow: visible; }
}

/* ---------- Boutons ---------- */

.btn {
    height: auto;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

.btn-primary { background: var(--prune); color: #fff; box-shadow: 0 8px 18px rgba(52, 43, 59, .12); }

.btn-soft { background: #FFEDF1; color: #C33C60; }

.btn-ghost { background: #fff; border: 1px solid #EEE4ED; color: #51485A; }

.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13px; }

.btn-xs { min-height: 30px; padding: 6px 11px; font-size: 12px; }

/* ---------- Cartes ---------- */

.card {
    border-radius: var(--radius);
    border: 1px solid #F0E8ED;
    box-shadow: var(--shadow-soft);
    padding: 17px;
}

.card-flat { border-radius: var(--radius); border: 1px solid #F0E8ED; }

/* ---------- Bandeau d'accueil pastel ---------- */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px;
    min-height: 0;
    max-width: none;
    margin: 4px 0 0;
    padding: 26px 22px;
    border-radius: 23px;
    overflow: hidden;
    background: linear-gradient(112deg, #FFF0EB 0%, #FFF7E9 48%, #F3EEFF 100%);
    box-shadow: var(--shadow);
}

.hero:before,
.hero:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: .8;
    pointer-events: none;
}

.hero:before { width: 190px; height: 190px; background: rgba(255, 209, 102, .34); right: 12%; top: -110px; }

.hero:after { width: 220px; height: 220px; background: rgba(167, 139, 250, .16); right: -70px; bottom: -160px; }

.hero-copy { position: relative; z-index: 1; max-width: 620px; }

.eyebrow {
    color: #A05B94;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 10.5px;
    font-weight: 800;
}

.hero h1 {
    font-size: clamp(29px, 4.6vw, 46px);
    line-height: 1.08;
    letter-spacing: -.04em;
    margin: 9px 0 10px;
}

.hero p { margin: 0; color: #655D6B; font-size: 14px; max-width: 505px; }

.hero .actions { display: flex; gap: 9px; margin-top: 19px; flex-wrap: wrap; }

.hero .actions .btn { padding: 11px 17px; }

.hero-art {
    position: relative;
    z-index: 1;
    justify-self: center;
    width: min(215px, 100%);
    height: 132px;
    margin-top: 12px;
    transform: scale(.86);
    transform-origin: top center;
}

.orb {
    position: absolute;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 24px rgba(72, 48, 71, .10);
    line-height: 1;
}

.orb svg { width: 62%; height: 62%; display: block; }

.orb.one { width: 100px; height: 100px; background: linear-gradient(145deg, #FFB4C5, #FF6F91); left: 10px; top: 26px; font-size: 42px; transform: rotate(-12deg); }

.orb.two { width: 80px; height: 80px; background: linear-gradient(145deg, #D9CBFF, #A78BFA); right: 12px; top: 0; font-size: 34px; transform: rotate(9deg); }

.orb.three { width: 70px; height: 70px; background: linear-gradient(145deg, #BFF0DD, #7BCFA5); right: 50px; bottom: 0; font-size: 31px; transform: rotate(-7deg); }

.spark { position: absolute; color: #D2931B; }

.spark svg { width: 20px; height: 20px; display: block; fill: currentColor; }

.s1 { right: 0; top: 58px; }

.s2 { left: 58px; bottom: 0; color: #B273BA; }

.spark.s2 svg { width: 16px; height: 16px; }

/* icônes posées dans les petites cartes */
.project-emoji svg,
.mini-icon svg { stroke: #B0578A; fill: none; }

.reminder-line .mini-icon svg { stroke: #8659B7; }

.chip-row .chip svg { stroke: currentColor; fill: none; flex: 0 0 auto; }

.shop-emoji svg { stroke: #47715E; fill: none; }

.shop-card.artisans .shop-emoji svg { stroke: #7654A2; }

.idea-meta svg { stroke: currentColor; fill: none; vertical-align: -2px; }

/* ---------- Cartes de synthèse accueil ---------- */

.home-overview { display: grid; grid-template-columns: 1fr; gap: 11px; margin: 14px 0 0; }

.home-card {
    background: #fff;
    border: 1px solid #F0E8ED;
    border-radius: 19px;
    padding: 15px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.home-card h2 { font-size: 14.5px; margin: 0 0 11px; }

.project-mini { display: flex; align-items: center; gap: 10px; }

.project-emoji {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #FFEDF1;
    font-size: 21px;
    line-height: 1;
    overflow: hidden;
}

.project-emoji img { width: 100%; height: 100%; object-fit: cover; }

.project-info { flex: 1 1 auto; min-width: 0; }

.project-info strong { font-size: 13px; display: block; }

.project-info small { display: block; color: var(--muted); font-size: 11px; }

.progress { height: 7px; border-radius: 9px; background: #F1EDF2; margin-top: 7px; overflow: hidden; }

.progress > i { background: linear-gradient(90deg, var(--corail), var(--violet)); }

.tiny-link { display: inline-block; margin-top: auto; padding-top: 11px; color: #8659B7; font-weight: 700; font-size: 12px; }

.reminder-line,
.favorite-line { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #5D5662; }

.reminder-line b,
.favorite-line b { display: block; color: var(--ink); font-size: 12.5px; font-weight: 650; }

.home-card .mini-icon { font-size: 17px; line-height: 1.25; }

/* ---------- Recherche et puces ---------- */

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: #8D8490;
}

.search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    min-width: 0;
}

.search-box button {
    border: 0;
    background: none;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #8659B7;
    flex: 0 0 auto;
}

.search-box svg { width: 17px; height: 17px; stroke: currentColor; fill: none; }

.filter-title { font-size: 12.5px; font-weight: 750; margin: 14px 0 8px; color: var(--prune); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.chip-row .chip,
.chip-row a.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #EEE4ED;
    border-radius: 999px;
    background: #fff;
    padding: 7px 11px;
    color: #5E5665;
    font-size: 12px;
    line-height: 1.2;
    height: auto;
    font-weight: 500;
    white-space: nowrap;
}

.chip-row .chip.on { background: var(--prune); color: #fff; border-color: var(--prune); font-weight: 700; }

/* ---------- Idées ---------- */

.idea-grid { display: grid; grid-template-columns: 1fr; gap: 11px; margin: 11px 0 24px; }

.idea-card {
    background: #fff;
    border: 1px solid #F0E8ED;
    border-radius: 19px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.idea-art { height: 112px; overflow: hidden; background: #F6F1F6; }

.idea-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.idea-copy { padding: 13px; flex: 1 1 auto; display: flex; flex-direction: column; }

.idea-copy small { color: #8055A6; font-size: 10.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }

.idea-copy h3 { font-size: 14.5px; margin: 4px 0 3px; }

.idea-copy p { font-size: 11.5px; color: var(--muted); margin: 0; }

.idea-meta { display: flex; justify-content: space-between; gap: 7px; margin-top: auto; padding-top: 10px; color: #655C6B; font-size: 11px; }

/* ---------- Rubriques en cartes colorées ---------- */

.modules { display: grid; grid-template-columns: 1fr; gap: 10px; }

.module {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 80px;
    padding: 13px;
    border-radius: 17px;
    background: #fff;
    border: 1px solid #F0E8ED;
    box-shadow: var(--shadow-soft);
    transition: transform .15s ease, box-shadow .15s ease;
}

.module:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.module .icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 20px;
    line-height: 1;
}

.module .icon svg { width: 19px; height: 19px; stroke: var(--prune); fill: none; }

.module h3 { margin: 0; font-size: 13.5px; }

.module p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }

.module > span:last-child { min-width: 0; }

.icon.pink { background: #FFEDF1; }
.icon.lilac { background: #F1EDFF; }
.icon.aqua { background: #E8F8F7; }
.icon.yellow { background: #FFF5D9; }
.icon.green { background: #EAF8F0; }
.icon.peach { background: #FFF0E6; }

.rubriques { grid-template-columns: 1fr; }

/* ---------- Deux cartes Boutique / Marché ---------- */

.shop-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }

.shop-card {
    padding: 19px;
    border-radius: 21px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 148px;
    overflow: hidden;
    position: relative;
}

.shop-card h3 { margin: 0 0 5px; font-size: 18px; }

.shop-card p { margin: 0; color: #5D5662; font-size: 13px; max-width: 460px; }

.shop-card .btn { margin-top: 13px; background: #fff; color: var(--prune); border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 4px 12px rgba(72, 48, 71, .06); }

.shop-card.supplies { background: linear-gradient(120deg, #E4F8F2, #D2F2EA); }

.shop-card.artisans { background: linear-gradient(120deg, #F3EDFF, #E7DDFF); }

.shop-emoji { font-size: 40px; opacity: .95; transform: rotate(-8deg); line-height: 1; padding-right: 4px; }

/* ---------- Cartes produit (accueil) ---------- */

.product-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }

.product-card {
    border: 1px solid #F0E8ED;
    border-radius: 17px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.product-card .pic {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F6F1F6;
    position: relative;
}

.product-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-copy { padding: 11px; flex: 1 1 auto; display: flex; flex-direction: column; }

.product-copy h4 { font-size: 13.5px; margin: 0 0 3px; }

.product-copy p { font-size: 11px; color: var(--muted); margin: 0; }

.product-price { font-weight: 800; font-size: 14px; margin-top: 7px; }

.product-price small { font-weight: 500; color: var(--muted); font-size: 10.5px; }

.product-meta { font-size: 10.5px; color: #47715E; margin-top: 5px; }

.product-link { font-size: 10.5px; color: #7654A2; margin-top: 5px; font-weight: 650; }

.product-copy .btn { margin-top: 9px; align-self: flex-start; }

/* ---------- Barre du bas téléphone (fixe, plate) ---------- */

.tabbar {
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
    background: #FFFDFB;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 -8px 25px rgba(52, 43, 59, .04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: none;
    margin: 0;
    align-items: center;
}

.tabbar a { font-size: 9.5px; gap: 2px; min-height: 44px; }

.tabbar a.active { color: #A45AA7; font-weight: 800; }

/* ---------- Papeterie / listes boutique ---------- */

.prod {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #F0E8ED;
    border-radius: 17px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.prod .pic { aspect-ratio: 4 / 3; border-radius: 0; }

.prod .name { padding: 10px 12px 0; font-size: 14px; margin: 0; }

.prod .desc { padding: 0 12px; font-size: 12px; }

.prod .foot { padding: 0 12px 12px; margin-top: auto; }

.prod .add { background: var(--corail); }

/* ---------- Pied de page ---------- */

.footer {
    margin: 42px 0 0;
    padding: 20px 0 10px;
    background: transparent;
    border-radius: 0;
    border-top: 1px solid var(--line);
}

.footer .brand img { width: 34px; height: 34px; }

.footer .brand strong { font-size: 15px; }

.footer p { max-width: 460px; }

/* ---------- Tablette ---------- */

@media (min-width: 620px) {
    .topbar-inner { padding: 11px 22px; gap: 16px; }

    .wrap { padding: 0 22px; }

    .home-overview { grid-template-columns: 1fr 1fr; gap: 12px; }

    .home-card:first-child { grid-column: 1 / -1; }

    .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

    .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }

    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }

    .shop-grid { grid-template-columns: 1fr 1fr; gap: 13px; }

    .section-head { flex-direction: row; align-items: flex-end; }

    .search-box { width: min(320px, 100%); }

    .hero { padding: 30px 26px; }

    .rubriques { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Ordinateur : navigation horizontale ---------- */

@media (min-width: 1000px) {
    body { padding-bottom: 34px; }

    .tabbar { display: none; }

    .topnav { display: flex; }

    .menu-btn { display: none; }

    .topbar-inner { padding: 13px 28px; gap: 28px; }

    .brand-site { flex: 0 0 auto; font-size: 18px; gap: 11px; }

    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; font-size: 20px; border-radius: 14px; }

    .wrap { padding: 0 28px; }

    .hero {
        grid-template-columns: 1.2fr .8fr;
        padding: 38px 42px;
        min-height: 258px;
        border-radius: 28px;
        gap: 16px;
    }

    .hero-art { width: min(258px, 100%); height: 182px; transform: none; margin: 0; justify-self: end; }

    .orb.one { width: 112px; height: 112px; font-size: 46px; }
    .orb.two { width: 90px; height: 90px; font-size: 38px; }
    .orb.three { width: 78px; height: 78px; font-size: 34px; }

    .home-overview { grid-template-columns: 1.35fr .85fr .85fr; gap: 14px; }

    .home-card:first-child { grid-column: auto; }

    .modules { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

    .idea-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

    .idea-art { height: 126px; }

    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

    .shop-card { padding: 23px 26px; min-height: 168px; }

    .shop-card h3 { font-size: 20px; }

    .shop-emoji { font-size: 50px; }

    .rubriques { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .section { margin: 36px 0; }

    .auth-shell { padding-left: 18px; }

    .footer { border-radius: 0; padding: 22px 0 12px; }
}

@media (min-width: 1400px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .modules { gap: 16px; }
}

/* ---------- Téléphone : on empile tout ---------- */

@media (max-width: 999px) {
    .sidenav { display: none !important; }
    .topnav { display: none; }
    body { padding-left: 0 !important; }
}

@media (max-width: 400px) {
    .topbar-inner { padding: 9px 12px; gap: 8px; }

    .brand-site { font-size: 14.5px; gap: 8px; }

    .brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 17px; }

    .profile-pill { padding: 8px 9px; font-size: 11.5px; }

    .icon-btn { width: 34px; height: 34px; }

    .wrap { padding: 0 13px; }

    .hero { padding: 21px 17px; border-radius: 21px; }

    .hero h1 { font-size: 26px; }

    .hero .actions { gap: 8px; }

    .hero .actions .btn { flex: 1 1 100%; }

    .modules { grid-template-columns: 1fr; }

    .home-overview { grid-template-columns: 1fr; }

    .home-card:first-child { grid-column: auto; }
}

@media (min-width: 401px) and (max-width: 619px) {
    .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .module { flex-direction: column; align-items: flex-start; gap: 9px; min-height: 96px; }

    .module h3 { font-size: 12.5px; }

    .module p { font-size: 11px; }
}

/* ==========================================================================
   Libellé « Boutique de fournitures » (plus long que « Boutique »)
   On garde la barre du bas sur une hauteur fixe et on évite tout
   débordement dans l'en-tête sur les largeurs intermédiaires.
   ========================================================================== */

.tabbar a { min-width: 0; }

.tabbar a .lbl-long {
    font-size: 8.5px;
    line-height: 1.05;
    text-align: center;
    max-width: 100%;
}

/* entre 620 px et 999 px la barre est large : le libellé tient sur une ligne */
@media (min-width: 620px) {
    .tabbar a .lbl-long { font-size: 9.5px; line-height: 1.15; }
}

/* en-tête ordinateur : on resserre un peu avant 1140 px pour que
   les cinq entrées tiennent sans se chevaucher */
@media (min-width: 1000px) and (max-width: 1139px) {
    .topbar-inner { gap: 16px; }

    .topnav { gap: 14px; font-size: 13px; }

    .brand-site { font-size: 16px; }
}

@media (min-width: 1140px) {
    .topnav { gap: 20px; }
}
