/* MarocTrust — version web. Charte : bordeaux #7B2D3E, or #C9A84C, ivoire #F5ECD7, blanc cassé #FAF7F2, Playfair Display + Inter. */

@font-face { font-family: "Playfair"; src: url("fonts/Playfair-700-normal.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair"; src: url("fonts/Playfair-600-normal.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Playfair"; src: url("fonts/Playfair-400-italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --surface: #FAF7F2; --on-surface: #2B1A1F;
  --surface-2: #F4EEE4; --on-surface-2: #4A3A3E;
  --surface-3: #ECE3D4;
  --bordeaux: #7B2D3E; --bordeaux-deep: #5E1F2E; --ivory: #F5ECD7; --ivory-muted: rgba(245,236,215,.78);
  --gold: #C9A84C; --on-gold: #3A1520; --gold-soft: #F3E7C8; --on-gold-soft: #5E1F2E;
  --muted: #85757A; --border: #E6DCCB;
  --success: #3E6953; --warning: #B7832F; --error: #A3322B;
  --display: "Playfair", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px;
  --wrap: 1120px;
  --tabbar-h: 0px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--on-surface); font: 400 16px/1.55 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; padding-bottom: calc(var(--tabbar-h) + 8px); }
img { max-width: 100%; display: block; }
a { color: var(--bordeaux); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.2; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--on-gold); padding: 8px 12px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------- en-tête et navigation */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--bordeaux); color: var(--ivory); border-bottom: 1px solid var(--gold); padding-top: env(safe-area-inset-top); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { text-decoration: none; color: var(--ivory); display: flex; flex-direction: column; line-height: 1.1; margin-right: auto; }
.brand b { font-family: var(--display); font-size: 26px; font-weight: 700; }
.brand small { font-size: 11px; letter-spacing: .5px; color: var(--gold); font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ivory-muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ivory); background: rgba(255,255,255,.06); }
.nav a.on { color: var(--on-gold); background: var(--gold); }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.lang.dark { border-color: rgba(201,168,76,.6); }
.lang button { border: 0; background: none; cursor: pointer; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); min-height: 30px; }
.lang.dark button { color: var(--ivory-muted); }
.lang button.on { background: var(--gold); color: var(--on-gold); }
.me { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--ivory); text-decoration: none; flex: none; }
.me { overflow: hidden; }
.me .avatar { width: 100%; height: 100%; font-size: 15px; }
.tabbar { display: none; }
@media (max-width: 860px) {
  :root { --tabbar-h: 64px; }
  .nav { display: none; }
  .topbar .wrap { min-height: 60px; }
  .brand b { font-size: 22px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a.on { color: var(--bordeaux); }
  .tabbar .svg { width: 22px; height: 22px; }
}

/* ------------------------------------------------------------- éléments communs */
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--bordeaux); text-transform: uppercase; }
.kicker.gold { color: var(--gold); }
.muted { color: var(--muted); }
.rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: 0; }
.goldrule { display: flex; align-items: center; gap: 12px; margin: 40px auto; max-width: var(--wrap); padding: 0 16px; }
.goldrule span { flex: 1; height: 1px; background: var(--gold); opacity: .6; }
.goldrule i { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; background: var(--bordeaux); color: var(--ivory); transition: opacity .15s, transform .15s; }
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: var(--on-gold); }
.btn.outline { background: transparent; border-color: var(--gold); color: var(--ivory); font-weight: 600; }
.btn.secondary { background: transparent; border-color: var(--bordeaux); color: var(--bordeaux); }
.btn.ghost { background: transparent; color: var(--error); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.link { color: var(--bordeaux); font-weight: 700; font-size: 14px; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--on-surface); text-decoration: none; }
.iconbtn.light { background: rgba(30,10,15,.45); border-color: rgba(245,236,215,.4); color: var(--ivory); }
.iconbtn.danger { color: var(--error); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bordeaux); color: var(--gold); display: inline-grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface-3); color: var(--on-surface-2); border-radius: 999px; padding: 0 16px; min-height: 38px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip.on { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--ivory); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.badge.ok { background: #DCE8DF; color: var(--success); }
.badge.wip { background: var(--gold-soft); color: var(--on-gold-soft); }
.badge.ko { background: #F3DAD7; color: var(--error); }
.state { padding: 48px 16px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--surface-3); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { display: flex; gap: 12px; align-items: center; background: var(--gold-soft); color: var(--on-gold-soft); padding: 14px 16px; border-radius: var(--r-md); text-decoration: none; margin-top: 16px; }
.banner b { display: block; font-size: 14px; margin-top: 2px; }
.error { color: var(--error); font-weight: 500; font-size: 14px; }

/* ------------------------------------------------------------- formulaires */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--on-surface-2); }
.input, textarea.input, select.input { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-3); padding: 12px 14px; font-size: 16px; color: var(--on-surface); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--gold); background: #fff; }
.form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px; line-height: 1.45; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); margin-top: 1px; flex: none; }

/* ------------------------------------------------------------- page d'accueil */
.hero { background: var(--bordeaux); color: var(--ivory); }
.hero .wrap { padding-top: 56px; padding-bottom: 56px; display: grid; gap: 28px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); max-width: 820px; }
.hero p.lead { color: var(--ivory-muted); max-width: 680px; font-size: 17px; }
.hero .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.bookrow { display: flex; gap: 24px; align-items: center; text-decoration: none; color: inherit; }
.bookrow img { width: 110px; height: 156px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--gold); background: var(--surface-3); }
.bookrow h2 { font-size: 28px; margin: 4px 0; }
.sectionhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sectionhead h2 { font-size: 30px; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--bordeaux); color: var(--ivory); border-radius: var(--r-md); padding: 18px; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-decoration: none; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.tile .svg { color: var(--gold); width: 24px; height: 24px; }
.tile b { font-family: var(--display); font-weight: 600; font-size: 19px; }
.terrbox { background: var(--bordeaux-deep); color: var(--ivory); border-radius: var(--r-lg); padding: 32px; display: grid; gap: 14px; margin-top: 48px; }
.terrbox h2 { font-size: 28px; }
.terrbox p { color: var(--ivory-muted); max-width: 640px; }

/* ------------------------------------------------------------- cartes de récit */
.cards.four { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(62,20,30,.08); }
.card .img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--surface-3); }
.card .body { padding: 18px; display: grid; gap: 10px; flex: 1; }
.card .eyebrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card h3 { font-size: 21px; }
.card .sum { color: var(--on-surface-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; font-size: 13px; }
.card .foot .who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.card .foot .who .avatar { width: 28px; height: 28px; font-size: 11px; }
.card .stats { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.card .stats .svg { width: 15px; height: 15px; }
.card .stats .gold { color: var(--gold); }
.card .stats em { font-style: normal; color: var(--bordeaux); font-weight: 600; }

/* ------------------------------------------------------------- en-tête de page */
.pagehead { background: var(--bordeaux); color: var(--ivory); }
.pagehead .wrap { padding-top: 36px; padding-bottom: 32px; display: grid; gap: 10px; }
.pagehead h1 { font-size: clamp(30px, 4vw, 42px); }
.pagehead p { color: var(--ivory-muted); max-width: 680px; }
.pagehead .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin: 20px 0 8px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; position: relative; }
.search .svg { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.search input { padding-left: 42px; }

/* ------------------------------------------------------------- détail d'un récit */
.storyhero { position: relative; min-height: 380px; background: var(--bordeaux) center / cover no-repeat; color: var(--ivory); display: flex; }
.storyhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(62,20,30,0) 25%, rgba(62,20,30,.94) 100%); }
.storyhero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; width: 100%; padding-top: 16px; padding-bottom: 28px; }
.storyhero .acts { display: flex; justify-content: space-between; }
.storyhero h1 { font-size: clamp(28px, 4vw, 44px); max-width: 860px; margin-top: 10px; }
.storyhero .tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--gold); }
.authorstrip { display: flex; gap: 12px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border); }
.authorstrip b { display: block; }
.segment { display: inline-flex; background: var(--surface-3); border-radius: 999px; padding: 4px; margin-top: 20px; }
.segment button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--bordeaux); display: inline-flex; gap: 6px; align-items: center; min-height: 38px; }
.segment button.on { background: var(--bordeaux); color: var(--ivory); }
.segment .svg { width: 15px; height: 15px; }
.summarybox { background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: var(--r-md); padding: 20px; display: grid; gap: 10px; }
.summarybox p { font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--bordeaux-deep); }
.storytext { font-size: 17px; line-height: 1.8; white-space: pre-line; }
.thread { display: grid; gap: 4px; }
.thread h2 { font-size: 24px; }
.msg { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.msg .avatar { width: 32px; height: 32px; font-size: 12px; }
.msg .who { font-weight: 600; font-size: 14px; }
.msg .who small { font-weight: 400; color: var(--muted); }
.msg .who .role { color: var(--gold); font-weight: 700; }
.msg p { white-space: pre-line; font-size: 15px; color: var(--on-surface-2); }
.msg .tools { display: flex; gap: 4px; margin-left: auto; }
.tinybtn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; }
.tinybtn:hover { background: var(--surface-3); }
.tinybtn.danger { color: var(--error); }
.tinybtn .svg { width: 17px; height: 17px; }
.composer { position: sticky; bottom: var(--tabbar-h); background: var(--surface); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 24px; z-index: 5; }
.composer .wrap { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 160px; flex: 1; }
.composer .send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bordeaux); color: var(--ivory); display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .send[disabled] { opacity: .5; }
.gate { width: 100%; justify-content: center; }

/* ------------------------------------------------------------- opportunités */
.oppcard .img { aspect-ratio: 16 / 8; }
.oppdesc { white-space: pre-line; font-size: 16px; line-height: 1.7; color: var(--on-surface-2); }
.opphero { height: 280px; background: var(--surface-3) center / cover no-repeat; position: relative; }
.opphero .wrap { display: flex; justify-content: space-between; padding-top: 16px; }

/* ------------------------------------------------------------- auteur */
.authorhero { background: var(--bordeaux); color: var(--ivory); text-align: center; }
.authorhero .wrap { padding-top: 40px; padding-bottom: 48px; display: grid; justify-items: center; gap: 14px; }
.monogram { width: 132px; height: 132px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; background: var(--bordeaux-deep); font-family: var(--display); font-size: 48px; color: var(--gold); }
.authorhero h1 { font-size: 40px; }
.authorhero p { color: var(--ivory-muted); max-width: 560px; }
.lead-italic { font-family: var(--display); font-style: italic; font-size: 21px; line-height: 1.55; color: var(--bordeaux); }
.prodgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .prodgrid { grid-template-columns: 1fr; } }
.prod { background: var(--bordeaux); color: var(--ivory); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.prod img { width: 150px; height: 210px; object-fit: cover; border: 1px solid var(--gold); border-radius: var(--r-sm); margin-bottom: 8px; }
.prod h2 { font-size: 28px; }
.prod .fmt { color: var(--gold); font-size: 13px; font-weight: 500; }
.prod .desc { color: var(--ivory-muted); font-size: 15px; }
.prod .nocd { font-family: var(--display); font-style: italic; color: var(--ivory-muted); font-size: 14px; }
.prod .check { text-align: left; color: var(--ivory-muted); }
.prod .btn { margin-top: auto; width: 100%; }
.exp { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; display: grid; gap: 12px; }
.exp h3 { font-size: 20px; font-weight: 600; color: var(--bordeaux); display: flex; gap: 10px; align-items: center; }
.exp h3 .svg { color: var(--gold); }
.exp li { list-style: none; display: flex; gap: 12px; align-items: flex-start; }
.exp li::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); margin-top: 9px; flex: none; }
.exp ul { margin: 0; padding: 0; display: grid; gap: 8px; }
.price { border: 1px solid var(--gold); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 4px; }
.price .val { font-family: var(--display); font-size: 44px; color: var(--bordeaux); font-weight: 700; }
.price .inc { display: flex; gap: 8px; align-items: center; color: var(--bordeaux); font-weight: 500; font-size: 13px; margin-top: 8px; }
.price .inc .svg { color: var(--gold); width: 17px; height: 17px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- territoire */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { border: 1px solid var(--gold); border-radius: var(--r-md); background: var(--surface-2); padding: 14px; }
.kpi b { display: block; font-family: var(--display); font-size: 20px; color: var(--bordeaux); }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 500; }
.acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.acc + .acc { margin-top: 8px; }
.acc summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--bordeaux); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .svg:first-child { color: var(--gold); }
.acc summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.acc[open] summary .chev { transform: rotate(180deg); }
.acc .in { padding: 0 16px 16px; display: grid; gap: 8px; color: var(--on-surface-2); }
.fact { border-top: 1px solid var(--border); padding-top: 8px; }
.fact small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.fact b { font-size: 15px; }
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .regions { grid-template-columns: 1fr; } }
.region { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); text-decoration: none; color: inherit; }
.region:hover { border-color: var(--gold); }
.region .num { font-family: var(--display); font-size: 24px; color: var(--gold); width: 36px; }
.region b { font-family: var(--display); font-weight: 600; font-size: 18px; display: block; }
.region small { color: var(--muted); font-size: 12px; }
.region .svg { margin-left: auto; color: var(--muted); }
.cta { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--bordeaux); color: var(--ivory); text-decoration: none; margin: 28px 0 16px; }
.cta .svg { color: var(--gold); }
.cta span { flex: 1; }
.source { font-size: 12px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; }
.stat b { display: block; font-family: var(--display); font-size: 20px; color: var(--bordeaux); }
.stat small { font-size: 12px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--gold-soft); color: var(--on-gold-soft); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.bullets { margin: 0; padding: 0; display: grid; gap: 8px; }
.bullets li { list-style: none; display: flex; gap: 12px; }
.bullets li::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); margin-top: 9px; flex: none; }

/* ------------------------------------------------------------- profil, modération, administration */
.panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.profilecard { display: flex; gap: 16px; align-items: center; }
.profilecard .avatar { width: 60px; height: 60px; font-size: 22px; }
.profilecard h2 { font-size: 24px; }
.menu { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.menu a, .menu .item { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 18px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border); font-weight: 500; }
.menu > :last-child { border-bottom: 0; }
.menu a:hover { background: var(--surface-2); }
.menu .svg { color: var(--bordeaux); }
.menu .chev { margin-left: auto; color: var(--muted); }
.menu .item .lang { margin-left: auto; }
.list { display: grid; gap: 12px; }
.item-card { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 16px; display: grid; gap: 8px; text-decoration: none; color: inherit; }
.item-card .head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.item-card h3 { font-size: 18px; font-weight: 600; }
.item-card .meta { font-size: 13px; color: var(--muted); }
.item-card .note { background: var(--gold-soft); color: var(--on-gold-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; }
.item-card .story { white-space: pre-line; font-size: 15px; color: var(--on-surface-2); }
.item-card .story.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.item-card .acts .btn { flex: 1; min-width: 140px; }
.tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.status.ok { background: var(--success); color: #fff; }
.status.ko { background: var(--gold-soft); color: var(--on-gold-soft); }
.status .svg { width: 14px; height: 14px; }
.vcard { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); padding: 20px; display: grid; gap: 14px; }
.vcard .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vcard h2 { font-size: 20px; font-weight: 600; }
.done { text-align: center; display: grid; justify-items: center; gap: 10px; background: var(--bordeaux); color: var(--ivory); border-radius: var(--r-lg); padding: 28px; }
.done .svg { width: 40px; height: 40px; color: var(--gold); }
.done p { color: var(--ivory-muted); }
.center { min-height: 50vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: 32px 16px; }
.center .big { width: 56px; height: 56px; }
.center h1 { font-size: 30px; }
.note-test { background: var(--gold-soft); color: var(--on-gold-soft); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; }
.legal h2 { font-size: 20px; color: var(--bordeaux); border-top: 1px solid var(--gold); padding-top: 16px; margin-top: 24px; }
.legal p { white-space: pre-line; margin-top: 8px; color: var(--on-surface-2); }
.benefits { display: grid; gap: 10px; margin: 0; padding: 0; }
.benefits li { list-style: none; display: flex; gap: 12px; align-items: center; font-weight: 500; }
.benefits .svg { color: var(--gold); }
.section { padding-top: 40px; }
.stack { display: grid; gap: 16px; }
.mt { margin-top: 24px; }

/* ------------------------------------------------------------- pied de page */
.foot { border-top: 1px solid var(--border); padding: 28px 0 calc(28px + var(--tabbar-h)); margin-top: 48px; font-size: 13px; color: var(--muted); }
.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* ------------------------------------------------------------- fenêtre modale et notifications */
.backdrop { position: fixed; inset: 0; background: rgba(30,10,15,.5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.sheet { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(30,10,15,.3); }
.sheet .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet h2 { font-size: 24px; }
@media (max-width: 600px) {
  .backdrop { align-items: flex-end; padding: 0; }
  .sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; max-width: none; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 20px); z-index: 80; display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { background: var(--bordeaux); color: var(--ivory); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(30,10,15,.25); font-size: 14px; animation: fade .2s; }
.toast.error { border-left-color: #E8837A; }
.toast.success { border-left-color: #8BC2A0; }
.sharecard { background: var(--bordeaux); color: var(--ivory); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 10px; border: 1px solid var(--gold); }
.sharecard h3 { font-size: 22px; }
.sharecard p { color: var(--ivory-muted); font-size: 14px; }
