/* NameFizz : une seule feuille, police système (latin + japonais sans téléchargement). */
:root {
  --bg: #FFF8EE;
  --paper: #FFFFFF;
  --ink: #1F1B2E;
  --muted: #6B6578;
  --line: #EADFCF;
  --fizz: #FF5A36;
  --fizz-dark: #D9401F;
  --grape: #6C4CF1;
  --mint: #18B48A;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 27, 46, .06), 0 8px 24px rgba(31, 27, 46, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--grape); }
a:hover { color: var(--fizz-dark); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.75rem); margin: 2em 0 .6em; }
h3 { font-size: 1.08rem; margin: 0 0 .5em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(860px, 100% - 32px); }
.muted { color: var(--muted); }

/* En-tête */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.brand b, .brand-foot b { color: var(--fizz); }
.main-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.main-nav a { white-space: nowrap; text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.main-nav a:hover { background: var(--bg); }
.main-nav a[aria-current] { background: var(--ink); color: #fff; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .9rem; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { position: absolute; right: 0; top: 110%; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 150px; }
.lang-switch a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.lang-switch a:hover, .lang-switch a[aria-current] { background: var(--bg); }

/* Haut de page */
.hero { padding: 44px 0 16px; text-align: center; }
.hero.small { padding-bottom: 28px; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 auto; max-width: 620px; }

/* Générateur */
.generator { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; }
.chips { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 600; font-size: .9rem; color: var(--muted); margin-bottom: 8px; padding: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .95rem; transition: .15s; }
.chip input:checked + span { border-color: var(--grape); background: var(--grape); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid rgba(108, 76, 241, .35); }
.word-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.word-row label { font-weight: 600; font-size: .9rem; color: var(--muted); }
.word-row input { font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.word-row input:focus { outline: none; border-color: var(--grape); background: #fff; }
.btn-generate, .btn-more { font: inherit; font-weight: 700; border: 0; cursor: pointer; border-radius: 14px; text-decoration: none; display: inline-block; }
.btn-generate { width: 100%; padding: 15px 20px; background: var(--fizz); color: #fff; font-size: 1.08rem; box-shadow: 0 4px 0 var(--fizz-dark); }
.btn-generate:hover { background: var(--fizz-dark); color: #fff; }
.btn-generate:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--fizz-dark); }
a.btn-generate { width: auto; padding: 12px 22px; margin-top: 12px; }
.results { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.results li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; animation: pop .28s ease both; }
.results li.empty { grid-column: 1 / -1; justify-content: center; color: var(--muted); }
.results .name { font-weight: 600; word-break: break-word; }
.acts { display: flex; gap: 4px; flex-shrink: 0; }
.acts button { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 8px; cursor: pointer; color: var(--ink); }
.acts button:hover { border-color: var(--grape); }
.act-save { font-size: 1rem !important; line-height: 1; }
.act-save.on { color: var(--fizz); border-color: var(--fizz); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .results li { animation: none; } }
.more-row { text-align: center; margin: 16px 0 4px; }
.btn-more { background: var(--ink); color: #fff; padding: 11px 22px; }
.btn-more:hover { background: var(--grape); }
.favorites { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.favorites summary { cursor: pointer; font-weight: 600; }
.fav-count { display: inline-block; min-width: 1.6em; text-align: center; background: var(--fizz); color: #fff; border-radius: 999px; font-size: .8rem; padding: 0 6px; }
.fav-list { columns: 2 220px; padding-left: 1.2em; }
.btn-clear { font: inherit; font-size: .85rem; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }

/* Publicité : réserve la place pour éviter les sauts de mise en page. */
.ad { margin: 26px auto; min-height: 120px; width: min(780px, 100% - 32px); }

/* Contenu */
.content, .prose { font-size: 1.02rem; }
.howto { counter-reset: s; list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 10px; }
.howto li { counter-increment: s; position: relative; padding: 12px 14px 12px 52px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.howto li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #fff; font-weight: 700; text-align: center; line-height: 26px; font-size: .9rem; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.idea-col { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.idea-col h3 { color: var(--grape); }
.idea-col ul { margin: 0; padding-left: 1.1em; font-size: .95rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .6em 0 0; }

.other-tools, .latest { margin-top: 48px; }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: .15s; }
.tool-card:hover { border-color: var(--grape); transform: translateY(-2px); color: var(--ink); }
.tool-card span { color: var(--muted); font-size: .92rem; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card a { display: block; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; display: block; }
.post-card h3 { margin: 14px 16px 6px; }
.post-card p { margin: 0 16px 16px; color: var(--muted); font-size: .93rem; }
.link-more { font-weight: 600; }
.pager { margin: 28px 0; display: flex; gap: 6px; justify-content: center; }
.pager .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager .current { background: var(--ink); color: #fff; }

.prose-page, .post { padding: 40px 0; }
.prose h2 { font-size: 1.35rem; }
.prose img { border-radius: 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.post-hero { border-radius: var(--radius); margin: 12px 0 20px; }
.crumbs { margin: 0 0 8px; font-size: .9rem; }

/* Pied de page */
.site-footer { margin-top: 64px; background: var(--ink); color: #D9D4E6; padding: 40px 0 20px; font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--fizz); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.brand-foot { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 6px; }
.foot-title { font-weight: 700; color: #fff; margin: 0 0 8px; }
.copyright { margin-top: 24px; color: #9A93AE; font-size: .85rem; }

@media (max-width: 760px) {
  .header-row { flex-wrap: wrap; gap: 8px 12px; padding: 8px 0; }
  .main-nav { order: 3; flex-basis: 100%; }
  .lang-switch { margin-left: auto; }
  .generator { padding: 16px; border-radius: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
