/* OnlyCoussinets : papier crème, encre brune, terre cuite et moutarde. */
:root {
  --paper: #FBF4E9;
  --paper-2: #F3E6D2;
  --white: #FFFDF8;
  --ink: #2B1E16;
  --ink-2: #5A4637;
  --terra: #C24F38;
  --terra-dark: #A23E2A;
  --mustard: #E8B04B;
  --mustard-soft: #F8E5B5;
  --sage-soft: #DDE8D3;
  --sage-ink: #2F4A26;
  --rose: #F6D3C6;
  --radius: 18px;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: system-ui, -apple-system, "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;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(43, 30, 22, .07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 1rem/1.6 var(--body);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--terra-dark); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 2rem + 2.6vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
h1[tabindex]:focus, h2[tabindex]:focus, h3[tabindex]:focus, main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 46rem; }
.section { padding-block: 3rem; }
.muted { color: var(--ink-2); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 38em; }
.kicker, .crumbs { color: var(--terra-dark); font-weight: 600; margin-bottom: .6rem; }
.crumbs a { color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { top: 1rem; color: var(--paper); }

.demo-banner { margin: 0; padding: .45rem 1.25rem; background: var(--mustard-soft); border-bottom: 2px solid var(--ink); font-size: .9rem; text-align: center; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 244, 233, .95); border-bottom: 2px solid var(--ink); backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; min-height: 68px; padding-block: .5rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.6rem; font-weight: 700; }
.logo em { color: var(--terra); }
.logo-paw { width: 34px; height: 34px; fill: var(--terra); transform: rotate(-14deg); transition: transform .3s; }
.logo:hover .logo-paw { transform: rotate(8deg); }
.site-header nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-header nav a { display: inline-block; padding: .55rem .8rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.site-header nav a:hover { background: var(--paper-2); }
.site-header nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.3rem;
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  color: var(--white); background: var(--terra);
  border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s;
}
.btn:hover { color: var(--white); background: var(--terra-dark); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-small { min-height: 40px; padding: .45rem .95rem; font-size: .92rem; }
.link-btn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .3rem .2rem;
  background: none; border: 0; color: var(--ink-2); font: inherit; font-size: .92rem; cursor: pointer;
}
.link-btn:hover { color: var(--terra-dark); text-decoration: underline; }

/* Accueil */
.hero { display: grid; gap: 2.5rem; align-items: center; padding-block: 3.5rem 2rem; }
.cta { display: flex; gap: .9rem; flex-wrap: wrap; margin: 1.6rem 0 1rem; }
.hero-note { font-family: var(--display); font-style: italic; color: var(--ink-2); }
.hero-art { position: relative; height: 380px; }
.polaroid {
  position: absolute; width: 52%; padding: 10px 10px 0; background: var(--white);
  border: 2px solid var(--ink); border-radius: 6px; box-shadow: 5px 5px 0 rgba(43, 30, 22, .9);
}
.polaroid svg { border-radius: 3px; border: 1.5px solid rgba(43, 30, 22, .25); }
.polaroid span { display: block; padding: .45rem 0 .6rem; font-family: var(--display); font-style: italic; text-align: center; }
.pol-1 { left: 0; top: 26px; transform: rotate(-6deg); }
.pol-2 { right: 0; top: 0; transform: rotate(5deg); }
.pol-3 { left: 25%; top: 46%; transform: rotate(-1.5deg); z-index: 2; width: 46%; }
.sticker {
  position: absolute; right: 4%; bottom: 2%; z-index: 3; display: grid; place-items: center;
  width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--ink); background: var(--mustard);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-align: center; line-height: 1.1; transform: rotate(12deg);
}

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { position: relative; padding: 1.4rem 1.4rem 1.2rem; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); }
.steps p { margin: 0; color: var(--ink-2); }
.step-n { display: block; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--terra); margin-bottom: .4rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head a { font-weight: 600; }

.charter-teaser {
  display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 2rem; background: var(--sage-soft); border: 2px solid var(--ink); border-radius: 26px;
}
.charter-teaser p { margin: 0; max-width: 40em; }

/* Cartes de chats */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cat-card {
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover, .cat-card:focus-within { transform: translateY(-3px); box-shadow: 5px 5px 0 var(--ink); }
.cat-card-art { background: var(--tone); border-bottom: 2px solid var(--ink); }
.cat-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.cat-card-body h3 { font-size: 1.35rem; margin-bottom: .1rem; }
.cat-card-body h3 a { color: var(--ink); text-decoration: none; }
.cat-card-body > p { margin-bottom: .6rem; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretched:focus-visible { outline: none; }
.cat-card:has(.stretched:focus-visible) { outline: 3px solid var(--terra); outline-offset: 3px; }
.cat-card-foot { margin-top: auto !important; display: flex; justify-content: space-between; gap: .5rem; padding-top: .6rem; border-top: 1.5px dashed rgba(43, 30, 22, .3); font-size: .9rem; font-weight: 600; }
.tag-sub { position: absolute; top: .75rem; right: .75rem; display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .82rem; font-weight: 600; }
.above { position: relative; z-index: 2; margin-top: .9rem; align-self: flex-start; }

/* Publications */
.post-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); align-items: start; }
.post { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.post-head { display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; }
.post-who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.post-cat { color: var(--ink); font-weight: 700; text-decoration: none; }
.post-cat:hover { text-decoration: underline; }
.post-date { font-size: .85rem; color: var(--ink-2); }
.badge { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge-free { background: var(--sage-soft); color: var(--sage-ink); border: 1.5px solid var(--sage-ink); }
.badge-sub { background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); }
.post-media { margin: 0; aspect-ratio: 1; background: var(--tone); border-block: 2px solid var(--ink); }
.post-media svg { width: 100%; height: 100%; }
.post-locked {
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
  background: repeating-linear-gradient(-45deg, rgba(43, 30, 22, .07) 0 14px, transparent 14px 28px), var(--tone);
}
.locked-inner p { font-family: var(--display); font-size: 1.15rem; margin: .7rem 0 1rem; }
.locked-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 1.6rem; }
.post-body { padding: .9rem 1rem .2rem; }
.post-body p { color: var(--ink-2); margin-bottom: .5rem; }
.post-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .2rem .9rem .8rem; }
.purr {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .85rem;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  font: 600 .92rem/1 var(--body); cursor: pointer; transition: background-color .15s, transform .15s;
}
.purr:hover { background: var(--paper-2); }
.purr[aria-pressed="true"] { background: var(--rose); }
.purr[aria-pressed="true"] .ico { color: var(--terra); animation: pop .35s ease; }
.purr:disabled { opacity: .5; cursor: not-allowed; }
@keyframes pop { 50% { transform: scale(1.35) rotate(-10deg); } }
.empty { grid-column: 1 / -1; padding: 2rem; text-align: center; background: var(--white); border: 2px dashed rgba(43, 30, 22, .4); border-radius: var(--radius); }

.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button { min-height: 40px; padding: .4rem .95rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); font: 600 .92rem/1 var(--body); cursor: pointer; }
.filters button:hover { background: var(--paper-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.posts-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: .5rem; }
.posts-toolbar h2 { margin: 0; }
.count { font-size: .9rem; margin: .25rem 0 1rem; }

/* Avatars */
.avatar { display: inline-block; flex: none; overflow: hidden; border-radius: 50%; border: 2px solid var(--ink); background: var(--tone); }
.avatar svg { width: 100%; height: 100%; }
.avatar-sm { width: 42px; height: 42px; }
.avatar-md { width: 64px; height: 64px; }
.avatar-xl { width: 150px; height: 150px; border-width: 3px; box-shadow: 5px 5px 0 var(--ink); }

/* Profil */
.profile-cover { background: var(--tone); border-bottom: 2px solid var(--ink); padding-block: 2.5rem; }
.profile-head { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: .2rem; }
.profile-head .lead { color: var(--ink); margin-bottom: .8rem; }
.facts { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.facts li { padding: .25rem .75rem; border: 1.5px solid var(--ink); border-radius: 999px; background: rgba(255, 253, 248, .7); font-size: .9rem; font-weight: 600; }
.profile-layout { display: grid; gap: 2rem; padding-block: 2.5rem 3.5rem; }
.profile-side { display: flex; flex-direction: column; gap: 1.25rem; align-items: stretch; }
.profile-side > .link-btn { align-self: flex-start; }
.card { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.3rem; }
.card h2 { font-size: 1.35rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0 0; }
.stats div { padding: .6rem; text-align: center; background: var(--paper); border-radius: 12px; }
.stats dt { font-size: .8rem; color: var(--ink-2); }
.stats dd { margin: 0; font-family: var(--display); font-size: 1.6rem; font-weight: 700; }
.sub-card { background: #FFF3DA; }
.price { font-size: 1.05rem; margin-bottom: .8rem; }
.price strong { font-family: var(--display); font-size: 2.2rem; }
.perks { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .5rem; }
.perks li { display: flex; gap: .55rem; align-items: flex-start; }
.perks .ico { color: var(--terra); margin-top: .2rem; }
.sub-card .btn { width: 100%; }
.sub-status { display: flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--sage-ink); }
.fine { font-size: .84rem; color: var(--ink-2); margin: .9rem 0 0; }

/* Recherche */
.search { margin: 1.5rem 0 1.25rem; max-width: 34rem; }
.search label, .field-label { display: block; font-weight: 700; margin-bottom: .35rem; }
input[type="search"], textarea {
  width: 100%; padding: .75rem 1rem; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 14px;
}
input[type="search"] { border-radius: 999px; }
.search p { margin: .5rem 0 0; font-size: .9rem; }

/* Charte */
.prose h2 { margin-top: 2.2rem; }
.prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .3rem; }
.rules { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.rules ul { margin: 0; padding-left: 1.2rem; }
.rules h2 { margin-top: 0; }
.rule-yes { background: var(--sage-soft); }
.rule-no { background: var(--rose); }
.notice { padding: .85rem 1rem; background: var(--mustard-soft); border-left: 5px solid var(--mustard); border-radius: 10px; font-size: .95rem; }
.empty-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; max-width: 34rem; }
.empty-card p { margin: 0; }
.total { font-size: 1.05rem; }

/* Tableau de modération */
.table-wrap { overflow-x: auto; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .75rem .9rem; border-bottom: 1.5px solid var(--paper-2); }
th { background: var(--paper-2); }
.row-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Dialogues */
dialog {
  width: min(32rem, calc(100% - 1.5rem)); max-height: calc(100% - 2rem); padding: 0;
  background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink);
}
dialog::backdrop { background: rgba(43, 30, 22, .5); }
.dlg { padding: 1.5rem; }
.dlg h2 { font-size: 1.6rem; }
.dlg-cat { display: flex; align-items: center; gap: .9rem; margin: 1rem 0; }
.dlg-cat p { margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; }
fieldset { border: 0; margin: 1rem 0 .5rem; padding: 0; display: grid; gap: .45rem; }
legend { font-weight: 700; margin-bottom: .5rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .8rem; border: 1.5px solid rgba(43, 30, 22, .35); border-radius: 12px; cursor: pointer; }
.choice:hover { background: var(--paper); }
.choice:has(input:checked) { background: var(--rose); border-color: var(--ink); }
.choice input { margin-top: .3rem; accent-color: var(--terra); width: 1.1rem; height: 1.1rem; flex: none; }
.choice > span { display: flex; flex-direction: column; line-height: 1.35; }
.choice .muted { font-size: .88rem; }
.form-error { color: var(--terra-dark); font-weight: 700; margin: .25rem 0 .75rem; }

/* Notification */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 50; max-width: min(34rem, calc(100% - 2rem));
  padding: .8rem 1.2rem; background: var(--ink); color: var(--paper); border-radius: 16px; font-weight: 600;
  transform: translate(-50%, 160%); transition: transform .25s ease; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

/* Pied de page */
.site-footer { border-top: 2px solid var(--ink); background: var(--paper-2); padding-block: 1.75rem; font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; max-width: 34em; }
.footer-inner ul { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; margin: 0; padding: 0; }

.page-head h1 { margin-bottom: .4rem; }

/* Écrans plus larges */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .rules { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 920px) {
  .hero { grid-template-columns: 1.05fr 1fr; padding-block: 4.5rem 3rem; }
  .hero-art { height: 460px; }
  .profile-layout { grid-template-columns: 330px 1fr; align-items: start; }
  .post-grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .header-inner { justify-content: center; }
  .site-header { position: static; }
  .site-header nav a { padding: .5rem .65rem; font-size: .95rem; }
  .hero-art { height: 300px; }
  .sticker { width: 78px; height: 78px; font-size: .9rem; }
  .avatar-xl { width: 110px; height: 110px; }
  .dlg { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
