@font-face {
  font-family: 'Bricolage';
  src: url('/assets/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --board: #0d3b2e;
  --board-2: #124a3a;
  --chalk: #f7f3e8;
  --paper: #faf6ec;
  --card: #fffdf8;
  --ink: #17261f;
  --muted: #55645c;
  --line: #e2d9c6;
  --rule: #d8e3ea;
  --green: #0f6b4b;
  --orange: #c2500f;
  --orange-bright: #f08a24;
  --red: #a82a1f;
  --red-soft: #fbeae7;
  --amber-soft: #fdf1d9;
  --green-soft: #e3f2ea;
  --radius: 10px;
  --heading: 'Bricolage', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--orange); }
h1, h2, h3, .h2, .h3 { font-family: var(--heading); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; }
h2, .h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3, .h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 2px; border-radius: 3px; }

.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 640px; }
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.stack > * + * { margin-top: 1.25rem; }
.stack-sm > * + * { margin-top: .75rem; }
.stack-lg > * + * { margin-top: 2.5rem; }
.center { text-align: center; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.inline { display: inline; }
.prose { white-space: pre-line; overflow-wrap: anywhere; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: inherit; max-width: 60ch; }
.eyebrow { font-weight: 650; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); margin-bottom: .6rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: .5rem 1rem; z-index: 10; border-radius: var(--radius); }

/* En-tête */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .75rem; flex-wrap: wrap; }
.logo { font-family: var(--heading); font-size: 1.5rem; color: var(--ink); text-decoration: none; font-weight: 500; letter-spacing: -.02em; }
.logo strong { color: var(--green); font-weight: 800; }
.logo:hover { color: var(--ink); }
.roof { position: relative; display: inline-block; }
.roof::before {
  content: '';
  position: absolute;
  left: 50%;
  top: .02em;
  width: .5em;
  height: .5em;
  border-left: .13em solid var(--orange-bright);
  border-top: .13em solid var(--orange-bright);
  transform: translateX(-50%) rotate(45deg) scale(.85);
  border-radius: 1px;
}
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .95rem; }
.main-nav a { color: var(--ink); text-decoration: none; padding: .35rem 0; }
.main-nav a:hover { color: var(--orange); text-decoration: underline; }
.main-nav .nav-cta { font-weight: 650; color: var(--green); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-button:hover { color: var(--red); }
.flash { margin: 0; background: var(--green-soft); color: #0a4a33; padding-block: .75rem; font-weight: 550; }
.flash .wrap { display: block; }

/* Accueil : tableau noir */
.hero { background: var(--board); color: var(--chalk); padding-block: clamp(2.25rem, 6vw, 4.5rem); position: relative; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 8px; background: repeating-linear-gradient(90deg, var(--orange-bright) 0 56px, var(--chalk) 56px 112px, #1f9e6e 112px 168px); }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; } }
.hero .eyebrow { color: #f8b76f; }
.hero h1 { color: var(--chalk); font-weight: 650; }
.chalk { color: #fff; font-weight: 800; background: linear-gradient(transparent 88%, var(--orange-bright) 88%, var(--orange-bright) 96%, transparent 96%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lead { color: #dfe7df; }
.hero .search-form { color: var(--ink); box-shadow: 0 18px 40px rgb(0 0 0 / .28); }

/* Boutons */
.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: .4rem;
  min-height: 46px; padding: .6rem 1.15rem; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.button:hover { background: var(--ink); color: var(--card); }
.button:disabled { opacity: .55; cursor: wait; }
.button-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.button-primary:hover { background: #9d3f0a; border-color: #9d3f0a; color: #fff; }
.button-light { background: var(--chalk); border-color: var(--chalk); color: var(--board); }
.button-light:hover { background: #fff; color: var(--board); }
.button-danger { border-color: var(--red); color: var(--red); }
.button-danger:hover { background: var(--red); color: #fff; }
.button-small { min-height: 38px; padding: .3rem .75rem; font-size: .875rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Formulaires */
.field { display: block; min-width: 0; }
.field-label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .925rem; }
.hint { display: block; color: var(--muted); font-size: .85rem; margin-top: .3rem; }
input:not([type='checkbox']):not([type='file']), select, textarea {
  width: 100%; min-height: 46px; padding: .55rem .7rem; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid #bdb5a3; border-radius: 8px;
}
select:disabled { background: #f0ece2; color: var(--muted); }
textarea { resize: vertical; }
input[type='file'] { font: inherit; max-width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; min-width: 0; }
legend { font-weight: 650; padding-inline: .4rem; }
.check { display: flex; align-items: flex-start; gap: .55rem; padding: .25rem 0; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .15rem; accent-color: var(--green); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 0 1rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.error-box { background: var(--red-soft); color: #7a1d14; border-left: 4px solid var(--red); padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; overflow-wrap: anywhere; }
.notice { background: var(--amber-soft); padding: .75rem 1rem; border-radius: 6px; }
.copy-field { font-family: ui-monospace, monospace; font-size: .85rem; }

.search-form { background: var(--card); padding: 1.25rem; border-radius: 14px; border: 1px solid var(--line); }
.search-fields { display: grid; gap: .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.search-fields .field:first-child { grid-column: 1 / -1; }
.search-form .button { width: 100%; }
@media (max-width: 420px) { .search-fields { grid-template-columns: minmax(0, 1fr); } }

/* Sections d'accueil */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: 1.25rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: .8rem; }
.steps li::before { content: counter(step); font-family: var(--heading); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--orange); display: block; margin-bottom: .4rem; }
.section-notebook { background: #f1ebdc; }
.notebook-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 800px) { .notebook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; } }
.notebook { list-style: none; margin: 0; padding: 0 1.25rem 0 3rem; background: var(--card); border-radius: 4px; border-left: 2px solid #d9534f; box-shadow: 0 2px 0 var(--line), 0 10px 24px rgb(60 50 20 / .08); }
.notebook li { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.notebook li:last-child { border-bottom: 0; }
.link-cloud { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.link-cloud a { display: inline-block; padding: .45rem .85rem; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.link-cloud a:hover { border-color: var(--orange); color: var(--orange); }
.two-callouts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.callout { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; justify-content: space-between; }
.callout-dark { background: var(--board); color: var(--chalk); border-color: var(--board); }

/* En-têtes de page */
.page-head { background: var(--board); color: var(--chalk); padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { color: var(--chalk); font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0; }
.page-head .lead { margin-top: .6rem; margin-bottom: 0; color: #dfe7df; }
.page-head .eyebrow { color: #f8b76f; }

/* Résultats */
.results-layout { display: grid; gap: 1.5rem; padding-block: 1.5rem 3rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .results-layout { grid-template-columns: 300px minmax(0, 1fr); } .results-layout .search-fields { grid-template-columns: minmax(0, 1fr); } }
.filters > summary { list-style: none; width: 100%; }
.filters > summary::-webkit-details-marker { display: none; }
.filters[open] > summary { margin-bottom: .75rem; }
@media (min-width: 900px) { .filters[open] > summary { display: none; } }
.result-count { font-weight: 650; margin-bottom: .75rem; }
.tutor-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.tutor-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.tutor-card.is-featured { border-color: var(--orange-bright); border-width: 2px; }
.tutor-top { display: flex; gap: .85rem; align-items: center; }
.tutor-top h3 { margin: 0 0 .25rem; }
.tutor-top h3 a { color: var(--ink); text-decoration: none; }
.tutor-top h3 a::after { content: ''; position: absolute; inset: 0; }
.tutor-card { position: relative; }
.tutor-card:hover { border-color: var(--green); }
.tutor-headline { margin: 0; overflow-wrap: anywhere; }
.tutor-facts { margin: 0; font-size: .9rem; display: grid; gap: .35rem; }
.tutor-facts div { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: .5rem; }
.tutor-facts dt { color: var(--muted); }
.tutor-facts dd { margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tutor-foot { margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.price { font-family: var(--heading); font-weight: 750; font-size: 1.15rem; }
.price small { font-family: var(--body); font-weight: 400; font-size: .8rem; color: var(--muted); }
.price-large { font-size: 1.6rem; margin: 0; }
.avatar { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: var(--green-soft); }
.avatar-lg { width: 120px; height: 120px; }
.avatar-empty { display: grid; place-items: center; font-family: var(--heading); font-weight: 800; font-size: 1.8rem; color: var(--green); }
.badge { display: inline-block; font-size: .78rem; font-weight: 650; padding: .15rem .55rem; border-radius: 999px; }
.badge-verified { background: var(--green-soft); color: #0a4a33; }
.tag-featured { display: block; font-size: .75rem; font-weight: 700; color: var(--orange); }
.stars { color: #b86a00; letter-spacing: .05em; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.crumbs { font-size: .9rem; color: var(--muted); }

/* Profil */
.profile-layout { display: grid; gap: 2rem; padding-block: 2rem 3.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 880px) { .profile-layout { grid-template-columns: minmax(0, 1fr) 320px; } .profile-side { position: sticky; top: 1rem; } }
.profile-main > section { margin-top: 2rem; }
.profile-head { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.profile-head .avatar { width: 140px; height: 140px; }
.profile-head > div { flex: 1 1 240px; min-width: 0; }
.profile-side { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.contact-box { display: flex; flex-direction: column; gap: .5rem; }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .facts > div { grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; } }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.reviews { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.reviews li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.reviews p { margin: .35rem 0; overflow-wrap: anywhere; }

/* Cartes et espaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1rem, 3vw, 1.5rem); min-width: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.role-switch a { text-align: center; padding: .6rem .4rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.role-switch a.is-active { background: var(--ink); color: var(--card); }
.pay-steps { padding-left: 1.25rem; margin: 0; }
.pay-steps li { margin-bottom: .5rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: .4rem 0; }
.status { display: inline-block; font-size: .8rem; font-weight: 650; padding: .15rem .6rem; border-radius: 999px; background: var(--amber-soft); color: #6d4a00; }
.status-approved, .status-published, .status-closed { background: var(--green-soft); color: #0a4a33; }
.status-rejected, .status-suspended, .status-open { background: var(--red-soft); color: #7a1d14; }
.status-draft { background: #eee8db; color: #4e4a3f; }
.status-ok { color: var(--green); font-weight: 600; }
.status-panel { padding: 1.25rem; border-radius: 14px; background: var(--amber-soft); }
.status-panel-approved { background: var(--green-soft); }
.status-panel-rejected, .status-panel-suspended { background: var(--red-soft); }
.status-panel .button-row { margin-top: .75rem; }
.zone-group { border-top: 1px solid var(--line); padding: .5rem 0; }
.zone-group summary { font-weight: 650; cursor: pointer; padding: .3rem 0; }
.zone-child { margin-left: .5rem; }
.zone-leaves { margin-left: 1.5rem; font-size: .925rem; }
.doc-row { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .6rem; }
.doc-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.prose-block h2 { margin-top: 1.75rem; font-size: 1.3rem; }
.prose-block h2:first-child { margin-top: 0; }
.prose-block ul { padding-left: 1.25rem; }
.prose-block li { margin-bottom: .45rem; }

/* Admin */
.admin-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .admin-layout { grid-template-columns: 200px minmax(0, 1fr); } }
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
@media (min-width: 900px) { .admin-nav { flex-direction: column; } }
.admin-nav a { padding: .45rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.admin-nav a:hover { background: #efe8d8; color: var(--ink); }
.admin-nav a.is-active { background: var(--board); color: var(--chalk); }
.admin-main { min-width: 0; }
.stat-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; color: var(--ink); text-decoration: none; display: block; }
a.stat:hover { border-color: var(--orange); color: var(--ink); }
.stat strong { display: block; font-family: var(--heading); font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .875rem; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; }

/* Pied de page */
.site-footer { background: #0a2d23; color: #d7e0d9; padding-block: 2.5rem; margin-top: auto; }
.site-footer .logo { color: var(--chalk); }
.site-footer .logo strong { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: #f8b76f; font-family: var(--body); }
.footer-grid nav a { display: block; color: #d7e0d9; text-decoration: none; padding: .2rem 0; }
.footer-grid nav a:hover { color: #fff; text-decoration: underline; }
