/*
Theme Name: SwitchMyBar
Theme URI: https://switchmybar.com
Author: Stéphane Schmidt
Description: Thème vitrine sur mesure pour le plugin Admin Bar Position Switcher. Rose, moderne, multilingue.
Version: 0.1.0
License: GPLv2 or later
Text Domain: switchmybar
*/

:root {
  --ground: #fbf3ef;
  --ground-2: #fefcfb;
  --card: #ffffff;
  --ink: #211a24;
  --muted: #6e6572;
  --line: #efe2e9;
  --accent: #e8368f;
  --accent-ink: #c31f72;
  --accent-soft: #f9cbe0;
  --accent-wash: #fdeef5;
  --shadow: 30px 40px 80px -40px rgba(140, 20, 80, .35);
  --radius: 18px;
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-force-light]) {
    --ground: #17121b; --ground-2: #1e1723; --card: #241b2b;
    --ink: #f6edf2; --muted: #b3a3b1; --line: #362a3f;
    --accent-ink: #ff7ab8; --accent-wash: #2a1a26;
    --shadow: 30px 40px 90px -40px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--accent-wash) 0%, transparent 55%),
    linear-gradient(180deg, var(--ground) 0%, var(--ground-2) 40%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Helvetica Neue", -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
.serif { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }
a { color: var(--accent-ink); }

/* Nav */
.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand b { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.brand b span { color: var(--accent-ink); }
.mark { width: 40px; height: 40px; border-radius: 11px; flex: none; background: var(--ink); position: relative; overflow: hidden; box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
.mark i { position: absolute; left: 6px; right: 6px; height: 7px; border-radius: 3px; background: var(--accent); top: 6px; animation: barflip 3.6s cubic-bezier(.7,0,.2,1) infinite; }
.mark::after { content: "⇅"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700; }
@keyframes barflip { 0%,40% { top: 6px; } 50%,90% { top: 27px; } 100% { top: 6px; } }

.nav-main { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-main a { text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; opacity: .85; }
.nav-main a:hover, .nav-main .current-menu-item a { opacity: 1; color: var(--accent-ink); }

.nav-right { display: flex; align-items: center; gap: 16px; position: relative; }
.swatches { display: flex; align-items: center; gap: 8px; }
.swatches .lbl { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .15s, border-color .15s; }
.dot:hover { transform: scale(1.18); }
.dot[aria-pressed="true"] { border-color: var(--ink); transform: scale(1.12); }
.dot:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.langsel { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; }
.langsel a { text-decoration: none; color: var(--muted); padding: 2px 4px; border-radius: 5px; }
.langsel a.active, .langsel a:hover { color: var(--accent-ink); }
.langsel .sep { color: var(--line); }

.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; padding: 11px 20px; border-radius: 999px; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 24px -12px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.nav .btn { padding: 9px 16px; }

/* Hero */
.hero { padding: 68px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -.02em; margin: 22px 0 0; text-wrap: balance; font-weight: 600; }
h1 em { font-style: italic; color: var(--accent-ink); }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 30ch; margin: 22px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: .82rem; color: var(--muted); margin-top: 16px; }
.cta-note b { color: var(--ink); font-weight: 600; }

.demo { justify-self: end; width: 100%; max-width: 460px; }
.window { position: relative; height: 340px; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.adminbar { position: absolute; left: 0; right: 0; top: 0; height: 40px; z-index: 3; background: linear-gradient(180deg, #2b2130, #211a24); display: flex; align-items: center; gap: 8px; padding: 0 12px; transition: top .55s cubic-bezier(.76,0,.18,1); }
.window.is-bottom .adminbar { top: calc(100% - 40px); }
.adminbar .abtn { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.32); flex: none; }
.adminbar .abar-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; cursor: pointer; user-select: none; }
.page-mock { position: absolute; inset: 0; padding: 60px 22px 22px; transition: padding .55s cubic-bezier(.76,0,.18,1); }
.window.is-bottom .page-mock { padding: 22px 22px 60px; }
.skl { height: 12px; border-radius: 6px; background: var(--line); margin-bottom: 12px; }
.skl.t { height: 22px; width: 62%; background: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.skl.w1 { width: 92%; } .skl.w2 { width: 78%; } .skl.w3 { width: 85%; }
.skl.card { height: 66px; margin-top: 18px; background: var(--accent-wash); border: 1px solid var(--accent-soft); }
.demo-caption { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 16px; }
.demo-caption kbd { font: inherit; font-weight: 600; color: var(--accent-ink); background: var(--accent-wash); border: 1px solid var(--accent-soft); border-radius: 6px; padding: 1px 7px; }

/* Sections */
.block { padding: 60px 0; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.015em; margin: 12px 0 0; font-weight: 600; text-wrap: balance; }
.section-lede { color: var(--muted); max-width: 54ch; margin-top: 14px; font-size: 1.05rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .18s, border-color .18s; }
.feature:hover { transform: translateY(-4px); border-color: var(--accent-soft); }
.feature .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); margin-bottom: 14px; }
.feature .ic svg { width: 21px; height: 21px; }
.feature h3 { margin: 0 0 6px; font-size: 1.08rem; font-weight: 650; }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; }

.langs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.lang { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .92rem; }
.lang .u { color: var(--accent-ink); }
.lang.muted { color: var(--muted); }

.install { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 40px; margin-top: 40px; }
.steps { counter-reset: s; display: grid; gap: 18px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.step b { display: block; }
.step span { color: var(--muted); font-size: .94rem; }
.install-cta { display: flex; flex-direction: column; gap: 12px; }
.metaline { display: flex; gap: 18px; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.metaline b { color: var(--ink); }

/* Pages internes (prose) */
.page-hero { padding: 60px 0 10px; }
.page-body { padding: 20px 0 70px; }
.prose { max-width: 68ch; font-size: 1.05rem; }
.prose h2 { font-size: 1.6rem; margin-top: 40px; }
.prose h3 { font-size: 1.2rem; margin-top: 28px; }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--accent-ink); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 60px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: flex-start; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--accent-ink); }
.foot .col { display: grid; gap: 8px; font-size: .92rem; }
.foot .col .h { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.foot .muted { color: var(--muted); }

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; row-gap: 4px; }
  .nav-main { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 6px; gap: 18px; scrollbar-width: none; }
  .nav-main::-webkit-scrollbar { display: none; }
  .nav-main a { white-space: nowrap; font-size: .9rem; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .demo { justify-self: center; }
  .features { grid-template-columns: 1fr; }
  .install { grid-template-columns: 1fr; padding: 28px; }
  .swatches .lbl { display: none; }
  .nav .btn.btn-ghost { display: none; }
  .metaline { flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 700px) {
  .nav { gap: 10px; }
  .nav-right { gap: 10px; }
  .swatches { gap: 6px; }
  .dot { width: 16px; height: 16px; }
  .brand b { font-size: .95rem; }
  .nav .btn-primary { padding: 8px 13px; font-size: .84rem; }
}
@media (max-width: 420px) {
  .wrap { width: 94vw; }
  .dot { width: 14px; height: 14px; }
  .mark { width: 34px; height: 34px; border-radius: 9px; }
  .mark i { animation: barflip-sm 3.6s cubic-bezier(.7,0,.2,1) infinite; }
  .langsel { font-size: .78rem; }
  h1 { font-size: clamp(2.2rem, 11vw, 2.7rem); }
}
@keyframes barflip-sm { 0%,40% { top: 5px; } 50%,90% { top: 22px; } 100% { top: 5px; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Gratuit vs Pro */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; max-width: 880px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.plan-pro { border-color: var(--accent-soft); box-shadow: 0 24px 60px -36px var(--accent); position: relative; }
.plan-pro::before { content: "PRO"; position: absolute; top: -11px; right: 22px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .14em; padding: 3px 12px; border-radius: 999px; }
.plan-head h3 { margin: 0; font-size: 1.25rem; }
.plan-price { margin: 6px 0 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.plan-price span { font-size: .82rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan-list li { padding-left: 26px; position: relative; font-size: .95rem; }
.plan-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-wash); border: 1px solid var(--accent-soft); }
.plan-list li::after { content: ""; position: absolute; left: 4.5px; top: calc(.35em + 4.5px); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.plan .btn { justify-content: center; }
.plan .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Badges des cartes fonctionnalités */
.feature { position: relative; }
.fbadge { position: absolute; top: 14px; right: 14px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .12em; padding: 2px 9px; border-radius: 999px; }
.fbadge-soon { background: var(--muted); }
.plan-note { margin: 4px 0 0; font-size: .84rem; font-weight: 600; color: var(--accent-ink); }

/* Le logo est un switch : le header peut vivre en bas, comme la barre du plugin */
.site-head { transition: transform .45s cubic-bezier(.76,0,.18,1); }
.brand { cursor: pointer; }
body.header-bottom { padding-top: var(--headh, 69px); padding-bottom: var(--headh, 69px); }
body.header-bottom .site-head {
  position: fixed; top: auto; bottom: 0; left: 0; right: 0;
  border-bottom: none; border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -20px rgba(140, 20, 80, .25);
}
@media (prefers-reduced-motion: reduce) { .site-head { transition: none; } }

/* Bio À propos */
.bio { display: flex; gap: 24px; align-items: flex-start; margin: 8px 0 28px; }
.bio img { border-radius: 50%; width: 128px; height: 128px; object-fit: cover; border: 3px solid var(--accent-soft); box-shadow: 0 14px 30px -18px var(--accent); flex: none; }
.bio p { margin: 0 0 10px; }
@media (max-width: 600px) { .bio { flex-direction: column; } }
.plan-args { margin: 12px 0 0; font-size: .86rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }
@media (max-width: 520px) {
  .nav .btn-primary { display: none; }
}

/* Mini-fenêtre « autres langues » (Google Translate) — Lili/F, 10/07, corrections E appliquées. */
.screen-reader-text { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.langsel-more { background: none; border: 0; padding: 2px; cursor: pointer; color: inherit; vertical-align: middle; display: inline-flex; align-items: center; }
.langsel-more:hover, .langsel-more[aria-expanded="true"] { color: var(--accent); }
.langpop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; width: min(420px, calc(100vw - 32px)); }
body.header-bottom .langpop { top: auto; bottom: calc(100% + 8px); }
.langpop-note { font-size: .78rem; opacity: .65; margin: 0 0 10px; }
.langpop ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 14px; }
.langpop a { text-decoration: none; font-size: .9rem; padding: 3px 4px; border-radius: 6px; display: block; color: var(--ink); }
.langpop a:hover { color: var(--accent); background: var(--accent-wash); }
@media (max-width: 600px) {
  .langpop { position: fixed; left: 16px; right: 16px; top: calc(var(--headh, 64px) + 8px); width: auto; }
  body.header-bottom .langpop { top: auto; bottom: calc(var(--headh, 64px) + 8px); }
  .langpop ul { grid-template-columns: repeat(2, 1fr); }
}
