/* ==========================================================================
   La Maison d'Inaya : styles communs (base, en-tête, pied de page, cartes)
   ========================================================================== */

:root {
	--bg: #121010;
	--bg2: #1A1614;
	--surface: #221C19;
	--text: #F3ECE3;
	--muted: #A89A8D;
	--line: #342C27;
	--terre: #B5562F;
	--terre-l: #DB7A50;
	--safran: #D9A441;
	--vert: #2F6B5A;
	--vert-l: #62A98F;
	--bleu: #1E4C7A;
	--sable: #F6EFE6;
	--creme: #FFFAF4;
	--nuit: #2A2522;
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--c: var(--terre);
	--cl: var(--terre-l);
}

.c-t { --c: #B5562F; --cl: #DB7A50; }
.c-v { --c: #3B7F6A; --cl: #62A98F; }
.c-s { --c: #B9861F; --cl: #D9A441; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--safran); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 860px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--safran); color: var(--nuit); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

.kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--terre-l); }
.k-vert { color: var(--vert-l); }
.title { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.15; letter-spacing: -.01em; }
.sub { color: var(--muted); max-width: 560px; }
.small { font-size: 13px; color: var(--muted); }

.btn { display: inline-block; border-radius: 999px; padding: 11px 22px; font-weight: 700; font-size: 14px; background: var(--safran); color: var(--nuit); transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); background: #e5b259; }
.btn.line { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.btn.line:hover { background: var(--text); color: var(--nuit); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Frise d'étoiles zellige */
.frise { height: 30px; background-size: 64px 30px; background-repeat: repeat-x; background-position: center;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='30' viewBox='0 0 64 30'%3E%3Cg fill='none' stroke='%23D9A441' stroke-width='1.3'%3E%3Crect x='24' y='7' width='16' height='16'/%3E%3Crect x='24' y='7' width='16' height='16' transform='rotate(45 32 15)'/%3E%3Ccircle cx='32' cy='15' r='3'/%3E%3Cpath d='M0 15h18M46 15h18'/%3E%3C/g%3E%3C/svg%3E"); }

/* ---------- En-tête (fond crème) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--creme); color: var(--nuit); border-bottom: 1px solid #E8DDCF; }
.admin-bar .site-header { top: 32px; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo img { display: block; }
.logo-text { font-family: var(--serif); font-weight: 600; font-size: 23px; white-space: nowrap; }
.logo-text i { color: var(--terre); }
.main-nav .menu { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; font-weight: 600; font-size: 15px; }
.main-nav .menu a { display: inline-block; padding: 28px 0 25px; border-bottom: 3px solid transparent; }
.main-nav .menu a::before { content: ""; display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); background: var(--c); margin-right: 9px; vertical-align: middle; border-radius: 1px; }
.main-nav .menu a:hover, .main-nav .current-menu-item > a, .main-nav .current-category-ancestor > a { color: var(--c); border-color: var(--c); }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; border: 1px solid #E8DDCF; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--nuit); }
.icon-btn:hover { border-color: var(--terre); color: var(--terre); }
.menu-toggle { display: none; }
.xp-chip { display: flex; align-items: center; gap: 9px; border: 1px solid #E8DDCF; background: #fff; padding: 5px 14px 5px 5px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--nuit); }
.xp-chip .lvl { width: 30px; height: 30px; border-radius: 50%; background: var(--safran); display: grid; place-items: center; font-weight: 800; }
.search-panel { border-top: 1px solid #E8DDCF; padding: 18px 0; background: var(--creme); }
.search-form { display: flex; gap: 10px; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 12px; border: 1px solid #E8DDCF; font: inherit; background: #fff; color: var(--nuit); }

.site-main { padding-bottom: 90px; }
.home .site-main { padding-bottom: 0; }

/* ---------- Fil d'Ariane ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.crumbs a:hover { color: var(--text); }
.crumbs > span[aria-hidden] { margin: 0 8px; opacity: .5; }

/* ---------- Blocs et grilles ---------- */
.block { padding: 70px 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.01em; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.h2 small { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; }

/* ---------- Visuels (image ou aplat zellige) ---------- */
.ph { position: relative; overflow: hidden; border-radius: 14px; background: var(--c); }
.ph::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.26), rgba(0,0,0,.18)); z-index: 1; pointer-events: none; }
.ph.has-img::before { background: none; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph .zellige { position: absolute; right: -30px; bottom: -30px; width: 180px; opacity: .16; color: #fff; }

/* ---------- Cartes d'article ---------- */
.card-link { display: block; }
.card-media { position: relative; margin-bottom: 14px; }
.card .ph { aspect-ratio: 16 / 9; }
.card .kicker { font-size: 11px; color: var(--cl); margin-bottom: 4px; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.3; margin-bottom: 6px; transition: color .15s; }
.card-link:hover h3 { color: var(--cl); }
.card p { color: var(--muted); font-size: 14.5px; }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.meta img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tagpts { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255,250,244,.94); color: var(--nuit); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.card.read .tagpts { background: var(--vert); color: #fff; }
.tag-sponso { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,250,244,.94); color: var(--nuit); padding: 4px 9px; border-radius: 6px; }
.card-media .tag-sponso { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.card-page .card-link { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; height: 100%; }

/* ---------- Encadré autrice ---------- */
.author { margin-top: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; display: flex; gap: 24px; align-items: center; }
.author .pt { width: 104px; height: 132px; flex: none; border-radius: 52px 52px 10px 10px; background-size: cover; background-position: center 20%; position: relative; }
.author .pt::after { content: ""; position: absolute; inset: 6px; border: 1.2px solid rgba(217,164,65,.85); border-radius: 46px 46px 6px 6px; }
.author-title { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 4px 0 6px; }
.author p { color: var(--muted); max-width: 760px; }
.author-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--cl); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 50px; }
.pager .page-numbers { min-width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; font-weight: 700; color: var(--muted); padding: 0 14px; }
.pager .current { background: var(--c); border-color: var(--c); color: #fff; }
.pager a.page-numbers:hover { border-color: var(--cl); color: var(--text); }

/* ---------- Puces de rubrique ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.chip { font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); }
.chip::before { content: ""; display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); background: var(--c); margin-right: 8px; vertical-align: middle; }
.chip:hover { border-color: var(--cl); }

.empty, .empty-state p { color: var(--muted); }

/* ---------- Pied de page ---------- */
.site-footer { background: #0B0908; border-top: 1px solid var(--line); color: #E9DFD3; padding: 50px 0 24px; font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-brand .logo-text { color: #fff; font-size: 22px; }
.foot-brand .logo-text i { color: var(--safran); }
.foot-brand p { color: var(--muted); margin-top: 12px; max-width: 340px; }
.foot-title { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; color: var(--safran); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a:hover { color: var(--safran); }
.copy { border-top: 1px solid #2a231f; margin-top: 34px; padding-top: 16px; color: #8d8075; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Notification (accueil) ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140px); background: var(--surface); border: 1px solid var(--line); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: center; transition: transform .35s; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.show { transform: translate(-50%, 0); }
.toast i { font-style: normal; background: var(--safran); color: var(--nuit); border-radius: 999px; padding: 2px 9px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.menu-toggle { display: grid; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 80px; background: var(--creme); border-bottom: 1px solid #E8DDCF; padding: 6px 28px 18px; }
	.main-nav.open { display: block; }
	.main-nav .menu { flex-direction: column; gap: 0; }
	.main-nav .menu a { padding: 14px 0; border-bottom: 1px solid #EFE6DA; display: block; }
	.grid-3, .foot { grid-template-columns: 1fr; }
	.head { flex-direction: column; align-items: start; }
	.title { font-size: 28px; }
	.author { flex-direction: column; text-align: center; }
	.xp-chip .t { display: none; }
}
@media (max-width: 600px) {
	.wrap { padding: 0 20px; }
	.logo-text { font-size: 18px; }
	.logo img { height: 42px !important; }
	.logo { gap: 8px; }
	.nav { gap: 10px; }
	.nav-tools { gap: 6px; }
	.icon-btn { width: 38px; height: 38px; }
	.xp-chip { padding: 3px; }
	.xp-chip > span:not(.lvl) { display: none; }
	.block { padding: 52px 0; }
	.admin-bar .site-header { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
