/*
 * tatoo.css : charte « Le Tatoo » des guides et de la page support.
 *
 * Mêmes tokens et composants que la landing (index.html), qui garde sa propre
 * copie en ligne pour son premier rendu : toute retouche de charte se fait
 * dans les deux. Les polices viennent de css/fonts-v2.css (fichiers de fonts/v2).
 */

:root {
  --shell: #9146FF;
  --shell-deep: #6A2BC9;
  --case: #1B1F4A;
  --case-deep: #11142F;
  --lcd: #C6D4A0;
  --lcd-ink: #1C2615;
  --lcd-off: rgba(28, 38, 21, 0.18);
  --rubber: #E6E3EC;
  --rubber-edge: #B9B4C6;
  --ink: #1A0B14;
  --ink-soft: #4A2A3B;
  --paper: #F4F2F7;
  --white: #FFFFFF;
  --rule: rgba(26, 11, 20, 0.18);
  --cjk: 'Hiragino Sans', 'Yu Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans JP', 'Noto Sans KR';
  --display: 'Unbounded', var(--cjk), system-ui, sans-serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', var(--cjk), sans-serif;
  --dot: 'DotGothic16', ui-monospace, var(--cjk), monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; accent-color: var(--case); }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--lcd-ink); color: var(--lcd); }
:where(a, button, summary, select, input, textarea):focus-visible { outline: 3px solid var(--lcd-ink); outline-offset: 3px; border-radius: 8px; }
.nav :where(a, button, select):focus-visible,
.page-hero :where(a):focus-visible,
.cta-band :where(a):focus-visible,
.site-footer :where(a):focus-visible,
.answer-block :where(a):focus-visible { outline-color: var(--lcd); }
img { max-width: 100%; display: block; }
.wrap { width: min(1200px, 90vw); margin: 0 auto; }
h1, h2, h3 { overflow-wrap: break-word; }
:lang(ja) :is(h1, h2), :lang(ko) :is(h1, h2) { letter-spacing: 0; line-height: 1.25; }
:lang(ko) :is(h1, h2, h3) { word-break: keep-all; }
:lang(ja) :is(h1, h2, h3) { line-break: strict; }
[data-browser] { font-weight: inherit; }
[hidden] { display: none !important; }

/* Touches caoutchouc */
.key {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
  text-decoration: none; color: var(--ink);
  background: var(--rubber);
  padding: 16px 24px; border-radius: 18px;
  border: 0; cursor: pointer;
  box-shadow: 0 5px 0 -1px var(--rubber-edge), 0 10px 18px -8px rgba(26, 11, 20, 0.45);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.key:hover { transform: translateY(-1px); }
.key:active { transform: translateY(4px); box-shadow: 0 1px 0 -1px var(--rubber-edge), 0 4px 8px -6px rgba(26, 11, 20, 0.45); }
.key svg { width: 18px; height: 18px; flex-shrink: 0; }
.key--ink { background: var(--ink); color: var(--white); box-shadow: 0 5px 0 -1px #000, 0 12px 20px -8px rgba(26, 11, 20, 0.6); }
.key--ink:active { box-shadow: 0 1px 0 -1px #000, 0 4px 8px -6px rgba(26, 11, 20, 0.6); }
.key--small { padding: 10px 16px; font-size: 13px; border-radius: 14px; }
.key:disabled { opacity: 0.6; cursor: progress; transform: none; }

/* Nav : identique à la landing, posée sur le bandeau violet */
.nav { position: absolute; inset: 0 0 auto; z-index: 10; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 18px; }
/* Le logo (violet, intouchable) disparaîtrait sur l'aplat violet : pastille LCD. */
.brand img { width: 34px; height: 34px; object-fit: contain; filter: brightness(0) invert(1); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; text-underline-offset: 6px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 960px) { .nav-links { display: none; } }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang select {
  appearance: none; -webkit-appearance: none;
  font-family: var(--body); font-weight: 600; font-size: 14px; color: var(--white);
  background: rgba(17, 20, 47, 0.38) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  border: 0; border-radius: 12px; padding: 9px 30px 9px 12px; cursor: pointer;
}
.lang option { color: var(--ink); background: var(--white); }
.is-mobile .nav .key { display: none; }

/* Sous-menu Guides : panneau façon écran LCD, deux colonnes */
.nav-dd { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--white); font-family: var(--body); font-weight: 600; font-size: 15px; cursor: pointer; }
.nav-dd-btn svg { width: 14px; height: 14px; transition: transform .15s ease-out; }
.nav-dd:hover .nav-dd-btn svg, .nav-dd.open .nav-dd-btn svg { transform: rotate(180deg); }
.nav-dd-panel { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding-top: 14px; z-index: 20; }
.nav-dd:hover .nav-dd-panel, .nav-dd:focus-within .nav-dd-panel, .nav-dd.open .nav-dd-panel { display: block; }
.nav-dd-panel ul {
  list-style: none; width: min(600px, 80vw);
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px;
  background: var(--lcd); color: var(--lcd-ink);
  border-radius: 18px; padding: 12px 22px;
  box-shadow: 0 24px 40px -20px rgba(17, 20, 47, 0.55);
}
.nav-dd-panel li { border-bottom: 1px solid var(--lcd-off); }
.nav-links .nav-dd-panel a { display: block; padding: 11px 0; color: var(--lcd-ink); font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.nav-links .nav-dd-panel a:hover { text-decoration: underline; }
.nav .nav-dd-panel :where(a):focus-visible { outline-color: var(--lcd-ink); }
@media (prefers-reduced-motion: reduce) { .nav-dd-btn svg { transition: none; } }

/* Menu mobile : sous 960px les liens passent dans un panneau LCD ouvert par le bouton Menu */
.nav-toggle { display: none; align-items: center; gap: 8px; padding: 9px 12px; border: 0; border-radius: 12px; background: rgba(17, 20, 47, 0.38); color: var(--white); font-family: var(--body); font-weight: 600; font-size: 14px; cursor: pointer; }
.nav-toggle svg { width: 16px; height: 16px; }
@media (max-width: 440px) { .nav-toggle { padding: 9px 10px; } .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .nav-actions { gap: 8px; } }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: calc(100% - 10px); left: 5vw; right: 5vw;
    max-height: calc(100dvh - 96px); overflow-y: auto;
    background: var(--lcd); color: var(--lcd-ink);
    border-radius: 18px; padding: 6px 22px;
    box-shadow: 0 24px 40px -20px rgba(17, 20, 47, 0.55);
  }
  .nav.menu-open .nav-links > a, .nav.menu-open .nav-dd-btn { display: flex; width: 100%; justify-content: space-between; padding: 14px 0; color: var(--lcd-ink); font-size: 16px; border-bottom: 1px solid var(--lcd-off); }
  .nav.menu-open .nav-links > :last-child, .nav.menu-open .nav-links > :last-child .nav-dd-btn { border-bottom: 0; }
  .nav-links .nav-dd-panel, .nav-links .nav-dd:hover .nav-dd-panel { display: none; position: static; transform: none; padding: 0; }
  .nav-links .nav-dd.open .nav-dd-panel { display: block; }
  .nav-links .nav-dd-panel ul { width: auto; grid-template-columns: 1fr; background: none; box-shadow: none; border-radius: 0; padding: 0 0 6px 14px; }
  .nav .nav-links :where(a, button):focus-visible { outline-color: var(--lcd-ink); }
}

/* Bandeau d'en-tête des pages */
.page-hero { background: var(--shell); color: var(--white); padding: 128px 0 72px; }
.breadcrumb { font-size: 14px; font-weight: 500; margin-bottom: 20px; color: rgba(255, 255, 255, 0.88); }
.breadcrumb a { color: var(--white); text-underline-offset: 4px; }
.page-hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 4.8vw, 62px); line-height: 1.02; letter-spacing: -0.03em;
  max-width: 20em; text-wrap: balance;
}
.page-lede { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; max-width: 40em; }
.page-lede a { color: var(--white); }

/* Article */
.article { width: min(760px, 90vw); margin: 0 auto; padding: 56px 0 96px; }
.article-meta { display: flex; align-items: center; gap: 8px; font-family: var(--dot); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.article-meta svg { width: 16px; height: 16px; }
.article h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(25px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.02em;
  margin: 64px 0 20px; scroll-margin-top: 24px; text-wrap: balance;
}
.article h3 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.3; margin: 32px 0 10px; }
.article p { font-size: 17px; line-height: 1.7; margin: 0 0 18px; }
.article a { color: var(--shell-deep); font-weight: 600; text-underline-offset: 3px; }
.article strong { font-weight: 600; }

/* Sommaire : l'écran LCD du pager */
.toc { margin: 28px 0 8px; background: var(--lcd); color: var(--lcd-ink); border-radius: 18px; padding: 20px 24px 12px; }
.toc-title { font-family: var(--dot); font-size: 14px !important; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 2px solid var(--lcd-off); padding-bottom: 8px; margin: 0 !important; }
.toc ul { list-style: none; }
.toc li + li { border-top: 1px solid var(--lcd-off); }
.toc a { display: block; padding: 11px 0; color: var(--lcd-ink); font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Réponse directe : un message reçu sur le boîtier */
.answer-block { background: var(--case); color: var(--white); border-radius: 18px; padding: 20px 24px; margin: 0 0 24px; }
.answer-block p { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 500; color: var(--white); }
.answer-block a { color: var(--lcd); }

.step-list { list-style: none; counter-reset: step; margin: 0 0 24px; }
.step-list li { counter-increment: step; position: relative; min-height: 56px; padding: 4px 0 20px 64px; font-size: 17px; line-height: 1.65; }
.step-list li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 14px; background: var(--rubber);
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 0 -1px var(--rubber-edge);
}
.step-list strong { display: block; font-family: var(--display); font-weight: 700; margin-bottom: 2px; }

.check-list { list-style: none; margin: 0 0 24px; border-top: 3px solid var(--ink); }
.check-list li {
  padding: 14px 0 14px 34px; border-bottom: 1px solid var(--rule); font-size: 17px; line-height: 1.6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A2BC9' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7'/%3E%3C/svg%3E") no-repeat 0 17px / 20px;
}

.table-wrap { overflow-x: auto; margin: 0 0 32px; border-top: 3px solid var(--ink); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.cmp-table th, .cmp-table td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); line-height: 1.5; }
.cmp-table thead th { font-family: var(--dot); font-weight: 400; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.cmp-table tbody th { font-family: var(--display); font-weight: 700; }

.faq-inline { border-top: 3px solid var(--ink); margin: 0 0 24px; }
.faq-inline .faq-item { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.faq-inline h3 { margin: 0 0 8px; }
.faq-inline p { margin: 0; }

.related-list { list-style: none; border-top: 3px solid var(--ink); }
.related-list a {
  display: flex; align-items: center; min-height: 60px; padding: 14px 32px 14px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.3;
  color: var(--ink); text-decoration: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A0B14' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat right 4px center / 18px;
}
.related-list a:hover { color: var(--shell-deep); text-decoration: underline; }

/* Appel final */
.cta-band { background: var(--shell); color: var(--white); padding: 88px 0; }
.cta-band .wrap { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
@media (max-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr; } }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 5vw, 64px); line-height: 1; letter-spacing: -0.03em; }
.cta-band p { margin-top: 16px; font-size: 18px; line-height: 1.5; max-width: 34em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.is-mobile .cta-actions { display: none; }

/* Pied de page */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.8); padding: 56px 0 36px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; }
.footer-grid li { padding: 6px 0; }
.site-footer a { color: var(--white); text-decoration: none; text-underline-offset: 4px; }
.site-footer a:hover { text-decoration: underline; }
.footer-copy { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14); }

/* Page support */
.support-main { padding: 56px 0 24px; }
.form-card { max-width: 720px; background: var(--white); border-radius: 24px; padding: 32px; box-shadow: 0 24px 40px -28px rgba(26, 11, 20, 0.35); }
@media (max-width: 560px) { .form-card { padding: 22px; } }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-family: var(--display); font-weight: 700; font-size: 15px; }
.field .opt { font-family: var(--body); font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--rubber-edge); background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px;
  transition: border-color .15s ease-out;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(74, 42, 59, 0.7); }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--shell-deep); outline: 3px solid rgba(145, 70, 255, 0.35); outline-offset: 0; }
.hint { margin-top: 7px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.btn-submit { width: 100%; justify-content: center; }
.direct { margin-top: 16px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.direct a { color: var(--shell-deep); font-weight: 600; }
.confirm { display: none; gap: 12px; align-items: flex-start; background: var(--lcd); color: var(--lcd-ink); border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; font-size: 15px; line-height: 1.55; }
.confirm.show { display: flex; }
.confirm.error { background: #F6D5DC; color: #5A0E1F; }
.confirm-ico svg { width: 20px; height: 20px; flex-shrink: 0; }
.confirm .ico-err, .confirm.error .ico-ok { display: none; }
.confirm.error .ico-err { display: block; }

/* FAQ en accordéon, sur l'écran LCD */
.faq-panel { background: var(--lcd); color: var(--lcd-ink); padding: 96px 0; margin-top: 72px; }
.faq-panel h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -0.03em; }
.faq-list { margin-top: 40px; max-width: 860px; border-top: 3px solid var(--lcd-ink); }
.faq-list details { border-bottom: 1px solid rgba(28, 38, 21, 0.3); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative; padding: 22px 48px 22px 0;
  font-family: var(--display); font-weight: 700; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list .faq-ico { position: absolute; right: 4px; top: 22px; width: 24px; height: 24px; transition: transform .2s ease-out; }
.faq-list details[open] .faq-ico { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 24px; font-size: 16.5px; line-height: 1.65; max-width: 44em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .key, .field input, .field select, .field textarea, .faq-list .faq-ico { transition: none; }
}
