/* ==========================================================
   J'aime PDF — design v3 « structure douce »
   Une seule couleur d'accent (rouge), neutres chauds, Geist.
   ========================================================== */
:root {
  --bg: #f6f5f1;
  --bg-2: #eceae4;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #161614;
  --ink-2: #5d5b55;
  --muted: #8f8c84;
  --line: rgba(22, 22, 20, .08);
  --line-2: rgba(22, 22, 20, .15);
  --accent: #e2483f;
  --accent-2: #c93a31;
  --accent-soft: #fbe9e7;
  --rouge: var(--accent);
  --bleu: #3d63dd;
  --ok: #2a9461;
  --warn: #a8740a;
  --c-organiser: #e0533d;
  --c-optimiser: #2a9461;
  --c-vers: #cf8a17;
  --c-depuis: #3d63dd;
  --c-modifier: #8a4fc4;
  --c-securite: #138f84;
  --shadow-1: 0 1px 1px rgba(40, 32, 20, .03), 0 6px 18px -10px rgba(40, 32, 20, .14);
  --shadow-2: 0 2px 4px rgba(40, 32, 20, .04), 0 24px 50px -22px rgba(40, 32, 20, .28);
  --shadow-3: 0 30px 80px -24px rgba(40, 32, 20, .38);
  --ring: 0 0 0 4px color-mix(in srgb, var(--bleu) 16%, transparent);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Geist", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --topbar: 76px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --bg-2: #1b1b19; --surface: #1b1b1a; --surface-2: #222220;
    --ink: #eeede9; --ink-2: #b7b4ac; --muted: #7f7c75; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .14);
    --accent: #ef5d52; --accent-2: #ff7a70; --accent-soft: #3a1f1c; --bleu: #7b97ff; --ok: #4cc38a;
    --c-organiser: #f0735e; --c-optimiser: #4cc38a; --c-vers: #f0a83a; --c-depuis: #7b97ff; --c-modifier: #b98bf0; --c-securite: #3fc7b8;
    --shadow-1: 0 1px 1px rgba(0,0,0,.3), 0 8px 20px -10px rgba(0,0,0,.6); --shadow-2: 0 24px 50px -22px rgba(0,0,0,.8); --shadow-3: 0 30px 80px -24px rgba(0,0,0,.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --bg-2: #1b1b19; --surface: #1b1b1a; --surface-2: #222220;
  --ink: #eeede9; --ink-2: #b7b4ac; --muted: #7f7c75; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .14);
  --accent: #ef5d52; --accent-2: #ff7a70; --accent-soft: #3a1f1c; --bleu: #7b97ff; --ok: #4cc38a;
  --c-organiser: #f0735e; --c-optimiser: #4cc38a; --c-vers: #f0a83a; --c-depuis: #7b97ff; --c-modifier: #b98bf0; --c-securite: #3fc7b8;
  --shadow-1: 0 1px 1px rgba(0,0,0,.3), 0 8px 20px -10px rgba(0,0,0,.6); --shadow-2: 0 24px 50px -22px rgba(0,0,0,.8); --shadow-3: 0 30px 80px -24px rgba(0,0,0,.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--font); min-height: 100dvh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
body::after { /* grain très léger */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 400; opacity: .028; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { flex: 1; outline: none; }
a { color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.03em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 500; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; transition: top .3s var(--ease); }
.skip:focus { top: 12px; }

/* ---------- Icônes ---------- */
svg[aria-hidden] { stroke-width: 1.6; }
.ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; color: var(--c); background: color-mix(in srgb, var(--c) 11%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent); transition: transform .5s var(--spring); }
.ico svg { width: 22px; height: 22px; }
.ico-sm { width: 30px; height: 30px; border-radius: 9px; } .ico-sm svg { width: 16px; height: 16px; }
.ico-xl { width: 60px; height: 60px; border-radius: 18px; } .ico-xl svg { width: 30px; height: 30px; }

/* ---------- Barre de navigation flottante ---------- */
.topbar { position: sticky; top: 0; z-index: 60; padding: 12px 20px 0; height: var(--topbar); }
.island { position: relative; max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; margin-right: 6px; }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px -6px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform .5s var(--spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.logo-text { font-size: 19px; font-weight: 650; letter-spacing: -.04em; }
.logo-text b { font-weight: 800; color: var(--accent); margin-left: 2px; }
.logo-sm .logo-mark { width: 28px; height: 28px; border-radius: 9px; } .logo-sm .logo-mark svg { width: 16px; height: 16px; } .logo-sm .logo-text { font-size: 17px; }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 9px 14px; border-radius: 999px; font-weight: 550; font-size: 14px; cursor: pointer; color: var(--ink); transition: background .3s var(--ease); }
.nav-btn:hover, .nav-btn[aria-expanded="true"] { background: var(--bg-2); }
.nav-btn { white-space: nowrap; }
.nb-short { display: none; }
.caret { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .4s var(--ease); }
.nav-btn[aria-expanded="true"] .caret { transform: translateY(1px) rotate(-135deg); }
.nav-search { flex: 1; max-width: 380px; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; background: var(--bg-2); color: var(--muted); padding: 9px 9px 9px 14px; border-radius: 999px; font-size: 14px; text-align: left; transition: background .3s var(--ease), color .3s; }
.nav-search:hover { color: var(--ink-2); }
.ns-ico { display: grid; place-items: center; flex-shrink: 0; }
.ns-ico svg { width: 17px; height: 17px; }
.ns-txt { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
kbd { font: 500 11.5px var(--mono); color: var(--muted); background: var(--surface); border-radius: 7px; padding: 2px 7px; box-shadow: 0 0 0 1px var(--line-2); white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: background .3s var(--ease), color .2s, transform .2s var(--ease); }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* méga-menu */
.mega { position: absolute; left: 20px; right: 20px; top: calc(var(--topbar) - 4px); max-width: 1240px; margin: 0 auto; background: var(--surface); border-radius: 28px; padding: 26px; box-shadow: 0 0 0 1px var(--line), var(--shadow-3); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; animation: megaIn .45s var(--ease); max-height: calc(100dvh - var(--topbar) - 20px); overflow: auto; }
.mega[hidden] { display: none; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
.mega h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mega h4 i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.mega a { display: flex; align-items: center; gap: 9px; text-decoration: none; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; font-size: 13.5px; color: var(--ink); transition: background .25s var(--ease); }
.mega a:hover { background: var(--bg-2); }
.mega a svg { width: 16px; height: 16px; color: var(--c); flex-shrink: 0; }

/* palette de commandes */
.cmdk-back { position: fixed; inset: 0; z-index: 250; background: rgba(18, 17, 14, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .2s; }
.cmdk { width: min(640px, 100%); background: var(--surface); border-radius: 26px; box-shadow: 0 0 0 1px var(--line), var(--shadow-3); overflow: hidden; animation: pop .35s var(--ease); }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cmdk-in svg { width: 20px; height: 20px; color: var(--muted); }
.cmdk-in input { flex: 1; border: 0; outline: none; background: transparent; font-size: 18px; }
.cmdk-list { max-height: min(56vh, 460px); overflow: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; cursor: pointer; text-decoration: none; }
.cmdk-item .ico { width: 34px; height: 34px; border-radius: 10px; } .cmdk-item .ico svg { width: 18px; height: 18px; }
.cmdk-item b { font-weight: 550; font-size: 14.5px; display: block; }
.cmdk-item small { color: var(--muted); font-size: 12.5px; }
.cmdk-item.on { background: var(--bg-2); }
.cmdk-item kbd { margin-left: auto; opacity: 0; }
.cmdk-item.on kbd { opacity: 1; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 550; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); transition: transform .35s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), color .2s; }
.btn:hover { box-shadow: 0 0 0 1px var(--muted); }
.btn:active { transform: scale(.98); }
.btn > svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-ic { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--bg-2); flex-shrink: 0; transition: transform .45s var(--spring), background .3s; }
.btn-ic svg { width: 16px; height: 16px; }
.btn:has(.btn-ic) { padding-right: 6px; }
.btn:hover .btn-ic { transform: translateX(2px) scale(1.06); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 22px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-primary:hover { background: var(--accent-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 14px 26px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-primary .btn-ic { background: rgba(255,255,255,.18); }
.btn-dark { background: var(--ink); color: var(--surface); box-shadow: none; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); box-shadow: none; }
.btn-danger { color: var(--accent); }
.btn-danger:hover { box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-lg:has(.btn-ic) { padding: 8px 8px 8px 26px; }
.btn-lg .btn-ic { width: 38px; height: 38px; } .btn-lg .btn-ic svg { width: 18px; height: 18px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-sm > svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Apparition au défilement ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 40ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Accueil ---------- */
.hero { max-width: 1280px; margin: 0 auto; padding: 48px 20px 30px; width: 100%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.eyebrow { max-width: 100%; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 550; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.hero h1 { font-size: clamp(42px, 5.4vw, 76px); letter-spacing: -.05em; line-height: .98; font-weight: 600; margin: 22px 0 0; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--accent); }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 44ch; margin: 20px 0 28px; }
.search { position: relative; display: block; max-width: 520px; padding: 6px; border-radius: 24px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.search > svg { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding: 16px 56px 16px 50px; border-radius: 18px; border: 0; background: var(--surface); font-size: 16px; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); transition: box-shadow .3s var(--ease); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; box-shadow: 0 0 0 1px var(--bleu), var(--ring); }
.search kbd { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); }
.proof { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13.5px; color: var(--ink-2); }
.proof li { display: inline-flex; align-items: center; gap: 7px; }
.proof svg { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.2; }

/* tuiles populaires (bento) */
.popular { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-auto-rows: 150px; gap: 10px; }
.pop { position: relative; display: block; text-decoration: none; padding: 5px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line); transition: transform .6s var(--ease); }
.pop:hover { transform: translateY(-3px); }
.pop-in { height: 100%; border-radius: 21px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; transition: box-shadow .5s var(--ease); }
.pop:hover .pop-in { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 35%, var(--line)), var(--shadow-2); }
.pop b { font-size: 16px; font-weight: 600; letter-spacing: -.02em; display: block; }
.pop small { font-size: 12.5px; color: var(--muted); }
.pop .go { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink); transition: transform .5s var(--spring), background .3s, color .3s; }
.pop .go svg { width: 15px; height: 15px; }
.pop:hover .go { transform: translate(2px, -2px) scale(1.06); background: var(--c); color: #fff; }
.pop:hover .ico { transform: rotate(-6deg) scale(1.06); }
.pop.big { grid-row: span 2; }
.pop.big b { font-size: 22px; }
.pop.big small { font-size: 13.5px; max-width: 24ch; display: block; margin-top: 4px; }
.mock { margin: 14px 0 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 7px; }
.mock i { display: block; height: 7px; border-radius: 4px; background: var(--bg-2); }
.mock i:nth-child(1) { width: 62%; height: 10px; background: color-mix(in srgb, var(--ink) 75%, transparent); }
.mock i:nth-child(3) { width: 86%; }
.mock i.hl { width: 70%; background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: 0 0 0 1.5px var(--c); position: relative; }
.mock i.hl::after { content: ""; position: absolute; right: -4px; top: -3px; width: 2px; height: 13px; background: var(--c); animation: caret 1.1s steps(1) infinite; }
.mock i.short { width: 40%; }
@keyframes caret { 50% { opacity: 0; } }

/* barre de catégories */
.chips { position: sticky; top: calc(var(--topbar) + 4px); z-index: 40; display: flex; justify-content: center; padding: 6px 20px; pointer-events: none; }
.chips-in { pointer-events: auto; display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.chips-in::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; border: 0; background: transparent; border-radius: 999px; padding: 8px 14px; font-weight: 550; font-size: 13.5px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; transition: background .35s var(--ease), color .2s; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.chip small { font: 500 11px var(--mono); color: var(--muted); }
.chip:hover { color: var(--ink); background: var(--bg-2); }
.chip.on { background: var(--ink); color: var(--surface); }
.chip.on small { color: color-mix(in srgb, var(--surface) 65%, transparent); }

.tools-wrap { max-width: 1280px; width: 100%; margin: 0 auto; padding: 4px 20px 40px; }
.cat-block { margin-top: 44px; }
.cat-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 16px; flex-wrap: wrap; }
.cat-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); align-self: center; }
.cat-head h2 { font-size: 26px; letter-spacing: -.035em; }
.cat-head span:last-child { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.card { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; text-decoration: none; background: var(--surface); border-radius: 18px; padding: 14px 40px 14px 14px; box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 32%, var(--line)), var(--shadow-2); }
.card:hover .ico { transform: rotate(-6deg) scale(1.06); }
.card-txt { min-width: 0; }
.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -.015em; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; line-height: 1.3; }
.card p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { font: 600 10px var(--font); text-transform: uppercase; letter-spacing: .07em; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.fav { position: absolute; top: 10px; right: 8px; width: 28px; height: 28px; border-radius: 999px; border: 0; background: transparent; color: var(--line-2); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .25s, color .2s, background .2s; }
.card:hover .fav, .fav.on, .fav:focus-visible { opacity: 1; }
.fav:hover { background: var(--bg-2); color: var(--muted); }
.fav.on { color: #e3a008; }
.fav svg { width: 16px; height: 16px; }
.fav.on svg { fill: currentColor; }
.empty-search { text-align: center; color: var(--muted); padding: 60px 0; font-size: 16px; }

/* sections éditoriales */
.exclu { max-width: 1280px; width: 100%; margin: 70px auto 0; padding: 0 20px; }
.sec-head { max-width: 760px; margin: 0 0 28px; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.045em; }
.sec-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.sec-head p { color: var(--ink-2); font-size: 16.5px; margin: 14px 0 0; max-width: 60ch; }
.exclu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.exclu-card { display: flex; flex-direction: column; text-decoration: none; padding: 5px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line); transition: transform .6s var(--ease); }
.exclu-card > div { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 21px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); transition: box-shadow .5s var(--ease); }
.exclu-card:hover { transform: translateY(-3px); }
.exclu-card:hover > div { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 35%, var(--line)), var(--shadow-2); }
.exclu-card h3 { font-size: 17px; margin-top: 10px; letter-spacing: -.025em; }
.exclu-card p { margin: 0; color: var(--ink-2); font-size: 14px; flex: 1; }
.exclu-card .go { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 550; color: var(--c); }
.exclu-card .go svg { width: 15px; height: 15px; transition: transform .45s var(--spring); }
.exclu-card:hover .go svg { transform: translateX(4px); }
.exclu-card.big { grid-column: span 2; grid-row: span 2; }
.exclu-card.big h3 { font-size: 28px; letter-spacing: -.045em; }
.exclu-card.big p { font-size: 15.5px; max-width: 42ch; flex: 0; }
.exclu-card.big .mock { margin-top: auto; padding: 22px; gap: 10px; }
.exclu-card.big .mock i { height: 9px; }
.exclu-card.big .mock i:nth-child(1) { height: 13px; }
.why { max-width: 1280px; width: 100%; margin: 70px auto 80px; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.why-card { padding: 4px 28px; border-left: 1px solid var(--line-2); }
.why-card:first-child { border-left: 0; padding-left: 0; }
.why-card .ico { width: 38px; height: 38px; border-radius: 11px; }
.why-card h3 { font-size: 18px; margin: 16px 0 6px; letter-spacing: -.025em; }
.why-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 38ch; }

/* ---------- Page outil ---------- */
.tool-page { width: 100%; }
.tool-hero-in { max-width: 1280px; margin: 0 auto; padding: 30px 20px 6px; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.crumbs a:hover { color: var(--accent); }
.tool-title { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.tool-title h1 { font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -.045em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.tool-title p { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; max-width: 70ch; }
.tool { max-width: 1280px; width: 100%; margin: 0 auto; padding: 24px 20px 50px; }
.related { max-width: 1280px; margin: 0 auto 70px; padding: 0 20px; }
.related h2 { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; letter-spacing: -.01em; }
.related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.related-list a { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 14px; font-weight: 500; background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 5px 14px 5px 5px; border-radius: 999px; transition: box-shadow .3s var(--ease), transform .4s var(--ease); }
.related-list a .ico { border-radius: 999px; }
.related-list a:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, var(--line)), var(--shadow-1); transform: translateY(-1px); }

/* zone de dépôt (double cadre) */
.drop { max-width: 900px; margin: 0 auto; padding: 8px; border-radius: 34px; background: color-mix(in srgb, var(--c, var(--accent)) 6%, var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: transform .5s var(--ease), background .3s; }
.drop-core { border-radius: 27px; background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--c, var(--accent)) 35%, var(--line-2)); padding: 54px 24px 48px; text-align: center; transition: border-color .3s, background .3s; }
.drop:hover .drop-core { border-color: color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); }
.drop.over { transform: scale(1.01); }
.drop.over .drop-core { border-style: solid; border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 5%, var(--surface)); }
.drop .btn { pointer-events: none; }
.drop h3 { font-size: 22px; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 600; }
.drop p { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; }
.drop p b { color: var(--ink-2); font-weight: 550; }
.drop-art { position: relative; width: 92px; height: 80px; margin: 0 auto 20px; }
.drop-art span { position: absolute; width: 54px; height: 66px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-1); top: 8px; left: 19px; transition: transform .6s var(--spring); }
.drop-art span:nth-child(1) { transform: rotate(-12deg) translateX(-14px); background: var(--surface-2); }
.drop-art span:nth-child(2) { transform: rotate(10deg) translateX(14px); background: var(--surface-2); }
.drop-art span:nth-child(3) { display: grid; place-items: center; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 10%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 25%, transparent), var(--shadow-2); }
.drop-art svg { width: 26px; height: 26px; }
.drop:hover .drop-art span:nth-child(1) { transform: rotate(-18deg) translateX(-22px); }
.drop:hover .drop-art span:nth-child(2) { transform: rotate(16deg) translateX(22px); }
.drop:hover .drop-art span:nth-child(3) { transform: translateY(-4px); }
.drop-compact { border-radius: 22px; padding: 5px; }
.drop-compact .drop-core { border-radius: 18px; padding: 22px 14px; }
.drop-compact .drop-art { width: 60px; height: 52px; margin-bottom: 10px; }
.drop-compact .drop-art span { width: 34px; height: 42px; left: 13px; top: 5px; border-radius: 7px; }
.drop-compact .drop-art svg { width: 18px; height: 18px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 13px; margin-top: 18px; }
.privacy-note svg { width: 16px; height: 16px; color: var(--ok); }

.work { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.panel { background: var(--surface); border-radius: 26px; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.files-panel { padding: 20px; min-height: 320px; }
.files-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.files-bar strong { font-size: 15px; font-weight: 600; }
.files-bar .grow { flex: 1; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.fcard { position: relative; background: var(--surface-2); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; cursor: grab; user-select: none; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s var(--ease), transform .4s var(--ease); }
.fcard:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-1); transform: translateY(-2px); }
.fcard.dragging { opacity: .4; }
.fcard.drop-before { box-shadow: -3px 0 0 var(--accent); }
.fcard.drop-after { box-shadow: 3px 0 0 var(--accent); }
.fthumb { aspect-ratio: 3/4; border-radius: 11px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.fthumb img, .fthumb canvas { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 2px 10px rgba(30,20,10,.14); background: #fff; }
.fext { font: 600 14px var(--mono); color: #fff; background: var(--c, var(--muted)); padding: 8px 10px; border-radius: 8px; }
.fname { font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.fmeta { font-size: 12px; color: var(--muted); margin-top: -6px; padding: 0 2px; font-variant-numeric: tabular-nums; }
.fnum { position: absolute; top: 8px; left: 8px; background: var(--ink); color: var(--surface); font: 600 11px var(--mono); border-radius: 7px; padding: 2px 7px; z-index: 1; }
.frm { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); z-index: 1; opacity: 0; transition: opacity .2s, color .2s; }
.fcard:hover .frm, .frm:focus-visible { opacity: 1; }
@media (hover: none) { .frm { opacity: 1; } }
.frm:hover { color: var(--accent); }
.frm svg { width: 14px; height: 14px; }
.tip { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.live { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.live.first { margin: 0 0 18px; padding: 0 0 18px; border-top: 0; border-bottom: 1px solid var(--line); }
.live.first + .files { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.live-head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; flex-wrap: wrap; }
.live-head small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 4%, transparent); } }
.live-view { margin-top: 14px; min-height: 260px; display: grid; place-items: center; background: var(--bg-2); border-radius: 18px; padding: 20px; }
.live-view canvas { max-height: 520px; width: auto; height: auto; max-width: 100%; box-shadow: 0 10px 30px -10px rgba(30,20,10,.35); background: #fff; border-radius: 3px; }

.side { position: sticky; top: calc(var(--topbar) + 12px); display: flex; flex-direction: column; max-height: calc(100dvh - var(--topbar) - 28px); overflow: hidden; }
.side h2 { font-size: 16px; padding: 20px 22px 14px; letter-spacing: -.02em; font-weight: 600; }
.side .opts { padding: 4px 22px 20px; overflow-y: auto; }
.side > .note { margin: 0 22px 10px; }
.opts { display: flex; flex-direction: column; gap: 18px; }
.field .lbl { display: block; font-size: 13px; font-weight: 550; color: var(--ink); margin-bottom: 8px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.inp, .sel, .ta { width: 100%; padding: 11px 14px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; transition: box-shadow .25s var(--ease), background .25s; }
.sel { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8c84' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.ta { min-height: 90px; resize: vertical; line-height: 1.5; }
.inp:hover, .sel:hover, .ta:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.inp:focus, .sel:focus, .ta:focus { outline: none; background-color: var(--surface); box-shadow: inset 0 0 0 1px var(--bleu), var(--ring); }
.inp-row { display: flex; gap: 8px; align-items: center; }
.inp-row .inp { flex: 1; min-width: 0; }
.unit { font-size: 13px; color: var(--muted); font-weight: 500; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 3px; background: var(--bg-2); padding: 4px; border-radius: 16px; }
.seg.many { grid-template-columns: repeat(2, 1fr); }
.seg button { border: 0; background: transparent; border-radius: 12px; padding: 10px 6px; font-size: 13px; font-weight: 550; cursor: pointer; text-align: center; line-height: 1.25; color: var(--ink-2); transition: background .35s var(--ease), color .2s, box-shadow .35s var(--ease); }
.seg button small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(30,20,10,.08), 0 4px 10px -4px rgba(30,20,10,.14), 0 0 0 1px var(--line); }
.toggle { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .sw { width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex-shrink: 0; transition: background .3s var(--ease); margin-top: -2px; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .4s var(--spring); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle input:checked + .sw { background: var(--ink); }
.toggle input:checked + .sw::after { transform: translateX(16px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--bleu); outline-offset: 2px; }
.range { display: flex; align-items: center; gap: 12px; }
.range input, input[type=range] { flex: 1; accent-color: var(--ink); }
.range output { min-width: 52px; text-align: right; font: 500 13px var(--mono); }
.color-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 999px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; position: relative; transition: transform .35s var(--spring); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatch.none { background: linear-gradient(135deg, transparent 45%, var(--accent) 45% 55%, transparent 55%), var(--surface); }
.swatch.custom { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e) !important; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
input[type=color].swatch { background: none; }
.note { font-size: 13px; color: var(--ink-2); background: var(--bg-2); border-radius: 14px; padding: 12px 14px; line-height: 1.5; }
.note.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--ink); }
.note b { color: var(--ink); font-weight: 600; }
.side-foot { padding: 16px 22px 22px; margin-top: auto; border-top: 1px solid var(--line); }

/* progression */
.progress-box { max-width: 560px; margin: 30px auto; text-align: center; padding: 48px 32px; }
.spinner { width: 46px; height: 46px; margin: 0 auto 22px; border-radius: 50%; border: 3px solid var(--bg-2); border-top-color: var(--accent); animation: spin .9s cubic-bezier(.5,.15,.5,.85) infinite; }
.spinner.sm { width: 26px; height: 26px; border-width: 2.5px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin: 22px 0 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .4s var(--ease); }
.progress-box h2 { font-size: 24px; letter-spacing: -.03em; }
.progress-msg { color: var(--ink-2); font-size: 14px; min-height: 1.5em; font-variant-numeric: tabular-nums; }

/* résultats */
.result { max-width: 780px; margin: 0 auto; text-align: center; padding: 16px 0; }
.result-check { width: 68px; height: 68px; border-radius: 22px; background: color-mix(in srgb, var(--ok) 13%, var(--surface)); color: var(--ok); display: grid; place-items: center; margin: 0 auto 20px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 25%, transparent); animation: pop .6s var(--spring); }
.result-check svg { width: 34px; height: 34px; stroke-width: 2.4; }
.result h2 { font-size: clamp(28px, 3.8vw, 40px); letter-spacing: -.045em; font-weight: 600; }
.result .main-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 28px 0; }
.out-list { text-align: left; padding: 6px; margin: 16px 0; }
.out-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; }
.out-item + .out-item { border-top: 1px solid var(--line); border-radius: 0; }
.out-item .ico { width: 38px; height: 38px; border-radius: 11px; }
.out-item .ico svg { width: 19px; height: 19px; }
.out-item .nm { flex: 1; min-width: 0; }
.out-item .nm b { display: block; font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out-item .nm span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stat-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.stat { background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-radius: 20px; padding: 16px 24px; min-width: 150px; }
.stat b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.good b { color: var(--ok); }
.chain { margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.chain h3 { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; font-weight: 550; }
.chain-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chain-list button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 500; font-size: 13.5px; cursor: pointer; transition: box-shadow .3s var(--ease), transform .4s var(--ease); }
.chain-list button:hover { box-shadow: 0 0 0 1px var(--c), var(--shadow-1); transform: translateY(-1px); }
.chain-list button svg { width: 16px; height: 16px; color: var(--c); }
.report { text-align: left; padding: 16px 20px; margin: 18px 0; overflow-x: auto; }
.report table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report th, .report td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.report th { color: var(--muted); font-weight: 500; width: 38%; }

/* ---------- Modales ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(18, 17, 14, .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 28px; box-shadow: 0 0 0 1px var(--line), var(--shadow-3); width: min(680px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; animation: pop .4s var(--ease); }
.modal.wide { width: min(1100px, 100%); }
@keyframes pop { from { transform: translateY(12px) scale(.97); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px 24px; }
.modal-h h2 { font-size: 18px; flex: 1; letter-spacing: -.025em; font-weight: 600; }
.modal-b { padding: 6px 24px 22px; overflow: auto; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.pick { border-radius: 16px; padding: 8px; cursor: pointer; background: var(--bg-2); text-align: center; font: 500 12px var(--mono); position: relative; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .25s, background .25s; }
.pick canvas { margin: 0 auto 6px; box-shadow: 0 1px 6px rgba(0,0,0,.18); background: #fff; }
.pick.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.pick.on::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; display: grid; place-items: center; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-3); font-size: 14px; font-weight: 500; animation: pop .4s var(--spring); pointer-events: auto; text-align: center; }
.toast.err { background: var(--accent); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* ---------- Pied de page ---------- */
.footer { margin-top: 20px; padding: 0 20px 20px; }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 40px 36px 28px; display: grid; grid-template-columns: 280px 1fr; gap: 40px; background: var(--surface); border-radius: 32px; box-shadow: 0 0 0 1px var(--line); }
.footer-in p { font-size: 14px; margin: 14px 0 0; max-width: 34ch; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer-cols h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--ink); }
.footer-cols a { display: block; font-size: 13px; text-decoration: none; color: var(--muted); padding: 2.5px 0; transition: color .2s; }
.footer-cols a:hover { color: var(--accent); }
.footer-bottom { text-align: center; font-size: 12.5px; color: var(--muted); padding: 18px 20px 4px; margin: 0; }
.heart { color: var(--accent); }

/* ==========================================================
   Éditeur plein écran
   ========================================================== */
body.ed-open .footer, body.ed-open .tool-hero, body.ed-open .related { display: none; }
body.ed-open .tool { max-width: none; padding: 0; }
body.ed-open { overflow: hidden; }
.ed { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar)); background: var(--bg); }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px 4px; flex-shrink: 0; }
.ed-iconbtn { width: 38px; height: 38px; border-radius: 999px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); text-decoration: none; flex-shrink: 0; transition: background .25s var(--ease), color .2s; }
.ed-iconbtn:hover { background: var(--bg-2); color: var(--ink); }
.ed-iconbtn[disabled] { opacity: .3; cursor: default; background: transparent; }
.ed-iconbtn svg { width: 19px; height: 19px; }
.ed-file { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ed-file b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; letter-spacing: -.01em; }
.ed-file span { font-size: 12px; color: var(--muted); }
.ed-top-mid { display: flex; align-items: center; gap: 2px; margin: 0 auto; background: var(--surface); border-radius: 999px; padding: 3px; box-shadow: 0 0 0 1px var(--line); }
.ed-top-mid .ed-iconbtn { width: 34px; height: 34px; }
.ed-div { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.ed-zoom { border: 0; background: transparent; font: 500 12.5px var(--mono); min-width: 58px; cursor: pointer; color: var(--ink); border-radius: 999px; padding: 7px; }
.ed-zoom:hover { background: var(--bg-2); }
.ed-save { flex-shrink: 0; }
/* barre d'outils horizontale */
.ed-rail { display: flex; justify-content: center; padding: 6px 16px 10px; flex-shrink: 0; }
.ed-bar { display: flex; align-items: stretch; gap: 2px; padding: 5px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.ed-bar::-webkit-scrollbar { display: none; }
.ed-sep { width: 1px; background: var(--line-2); margin: 8px 4px; flex-shrink: 0; }
.tb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; border-radius: 14px; padding: 7px 4px 6px; min-width: 64px; cursor: pointer; font-size: 11px; font-weight: 500; color: var(--ink-2); flex-shrink: 0; transition: background .3s var(--ease), color .2s; }
.tb svg { width: 20px; height: 20px; }
.tb:hover { background: var(--bg-2); color: var(--ink); }
.tb.on { background: var(--ink); color: var(--surface); }
.tb .tcaret { position: absolute; right: 7px; top: 10px; width: 5px; height: 5px; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: rotate(45deg); opacity: .55; }
.ed-pop { position: fixed; z-index: 220; min-width: 240px; padding: 6px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-3); animation: pop .35s var(--ease); }
.ed-pop button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 9px 12px; border-radius: 12px; cursor: pointer; font-size: 14px; text-align: left; transition: background .2s; }
.ed-pop button:hover, .ed-pop button.on { background: var(--bg-2); }
.ed-pop button svg { width: 18px; height: 18px; color: var(--ink-2); }
.ed-pop button span { flex: 1; }
.ed-pop kbd { font-size: 10.5px; }
.ed-body { flex: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr) 300px; min-height: 0; }
.ed.no-thumbs .ed-body { grid-template-columns: 0 minmax(0, 1fr) 300px; }
.ed.no-thumbs .ed-thumbs { visibility: hidden; padding: 0; }
.ed-thumbs { overflow-y: auto; padding: 8px 14px 30px 18px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.ed-thumb { border: 0; background: transparent; cursor: pointer; text-align: center; font: 500 11px var(--mono); color: var(--muted); padding: 0; }
.ed-thumb canvas { width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 2px 8px rgba(30,20,10,.1); margin-bottom: 6px; transition: box-shadow .3s var(--ease), transform .4s var(--ease); }
.ed-thumb:hover canvas { transform: translateY(-2px); }
.ed-thumb.on canvas { box-shadow: 0 0 0 2.5px var(--accent), 0 4px 12px rgba(30,20,10,.12); }
.ed-thumb.on span { color: var(--accent); }
.ed-scroll { overflow: auto; background: var(--bg-2); border-radius: 26px 26px 0 0; padding: 30px 28px 70px; box-shadow: inset 0 0 0 1px var(--line); }
.ed-pages { display: flex; flex-direction: column; align-items: center; gap: 30px; margin: 0 auto; width: max-content; min-width: 100%; }
.ed-page { position: relative; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 12px 32px -12px rgba(30,20,10,.35); flex-shrink: 0; }
.ed-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-tlayer { position: absolute; inset: 0; pointer-events: none; }
.ed-tb, .ed-xi { position: absolute; border-radius: 3px; transition: background .2s, box-shadow .2s; }
.ed[data-tool="edittext"] .ed-tb { box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--bleu) 28%, transparent); }
.ed[data-tool="edittext"] .ed-tb.hover { background: color-mix(in srgb, var(--bleu) 9%, transparent); box-shadow: 0 0 0 1.5px var(--bleu); }
.ed[data-tool="select"] .ed-tb.hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bleu) 55%, transparent); }
.ed-xi.hover { box-shadow: 0 0 0 2px var(--c-modifier), 0 0 0 6px color-mix(in srgb, var(--c-modifier) 22%, transparent); }
.ed-layer { position: absolute; inset: 0; touch-action: none; }
.ed-layer.t-edit, .ed-layer.t-text { cursor: text; } .ed-layer.t-draw, .ed-layer.t-box, .ed-layer.t-line { cursor: crosshair; } .ed-layer.t-place { cursor: copy; }
.ed-obj { position: absolute; box-sizing: border-box; }
.t-select .ed-obj, .t-edit .ed-obj:not(.ed-text) { cursor: move; }
.ed-obj.sel { outline: 1.5px solid var(--bleu); outline-offset: 2px; }
.ed-cover { position: absolute; pointer-events: none; }
.ed-text { white-space: pre; line-height: 1.2; padding: 0; width: max-content; min-width: 6px; min-height: 1em; }
.ed-text[contenteditable="true"], .ed-text[contenteditable="plaintext-only"] { cursor: text; outline: 2px solid var(--bleu); outline-offset: 3px; box-shadow: 0 0 0 7px color-mix(in srgb, var(--bleu) 10%, transparent); }
.ed-obj img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.ed-obj svg { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.ed-obj.t-note { display: grid; place-items: center; background: #ffd23f; color: #6b4e00; border-radius: 6px 6px 6px 2px; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.ed-obj.t-note svg { position: static; width: 70%; height: 70%; }
.ed-obj.t-link { border: 1.5px dashed var(--bleu); background: color-mix(in srgb, var(--bleu) 8%, transparent); }
.ed-obj.t-ftext { border: 1.5px solid #6d7a99; background: rgba(230, 236, 255, .7); border-radius: 3px; }
.ed-obj.t-fcheck { border: 1.5px solid #6d7a99; background: rgba(230, 236, 255, .7); border-radius: 3px; display: grid; place-items: center; color: #1f2937; }
.ed-obj.t-fcheck svg { position: static; width: 85%; height: 85%; }
.ed-tag { position: absolute; left: 0; top: -21px; font-size: 10.5px; font-weight: 600; background: var(--bleu); color: #fff; padding: 2px 7px; border-radius: 999px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.ed-tag svg { position: static; width: 11px; height: 11px; }
.ed-obj.t-ftext .ed-tag { background: #6d7a99; }
.ed-h { position: absolute; right: -9px; bottom: -9px; width: 15px; height: 15px; background: #fff; border: 2px solid var(--bleu); border-radius: 50%; cursor: nwse-resize; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.ed-pnum { position: absolute; left: 0; right: 0; bottom: -23px; text-align: center; font: 500 11px var(--mono); color: var(--muted); }
.ed-panel { overflow-y: auto; padding: 4px 18px 24px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.ed-ptitle { font-size: 16px; font-weight: 600; letter-spacing: -.02em; padding-top: 6px; }
.ed-hint { margin: -6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; background: var(--surface); padding: 12px 14px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.ed-hint.warn { background: color-mix(in srgb, var(--warn) 11%, var(--surface)); }
.ed-selinfo { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--bleu); background: color-mix(in srgb, var(--bleu) 10%, var(--surface)); padding: 8px 12px; border-radius: 999px; margin-top: -6px; }
.ed-selinfo svg { width: 15px; height: 15px; flex-shrink: 0; }
.ed-field label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 550; color: var(--ink-2); margin-bottom: 8px; }
.ed-field output { color: var(--ink); font: 500 12px var(--mono); }
.ed-field input[type=range] { width: 100%; }
.ed-row { display: flex; gap: 6px; }
.ed-row .sel { flex: 1; min-width: 0; }
.ed-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.ed-swatches .swatch { width: 26px; height: 26px; }
.tgl { border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); border-radius: 12px; width: 42px; height: 38px; cursor: pointer; font-size: 15px; transition: background .25s var(--ease), color .2s; }
.tgl:hover { box-shadow: 0 0 0 1px var(--muted); }
.tgl.on { background: var(--ink); color: var(--surface); box-shadow: none; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-stats { font-size: 13px; color: var(--ink-2); }
.ed-keys { font-size: 12.5px; color: var(--muted); margin-top: auto; }
.ed-keys summary { cursor: pointer; font-weight: 550; }
.ed-keys p { margin: 8px 0 0; line-height: 1.6; }
.ed-results { max-width: 1000px; margin: 0 auto; padding: 30px 20px; }

/* signature */
.sig-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.sig-tabs .chip { box-shadow: 0 0 0 1px var(--line); }
.sig-pad { width: 100%; height: 220px; border: 1.5px dashed var(--line-2); border-radius: 18px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sig-fonts button { border: 0; box-shadow: 0 0 0 1px var(--line-2); background: #fff; color: #1a1a1a; border-radius: 16px; padding: 10px; font-size: 30px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sig-fonts button.on { box-shadow: 0 0 0 2px var(--accent); }
.saved-sigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.saved-sigs div { position: relative; box-shadow: 0 0 0 1px var(--line); border-radius: 16px; background: #fff; padding: 8px; cursor: pointer; height: 80px; display: grid; place-items: center; }
.saved-sigs img { max-height: 60px; }

/* ---------- Organiser ---------- */
.org-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: calc(var(--topbar) + 4px); background: var(--surface); z-index: 5; border-radius: 26px 26px 0 0; }
.org-bar .grow { flex: 1; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tw, 150px), 1fr)); gap: 18px; padding: 20px; }
.ocard { position: relative; border-radius: 18px; padding: 10px 10px 8px; background: var(--surface-2); box-shadow: inset 0 0 0 2px transparent; text-align: center; cursor: pointer; user-select: none; transition: box-shadow .25s, background .25s, transform .4s var(--ease); }
.ocard:hover { box-shadow: inset 0 0 0 1px var(--line-2); transform: translateY(-2px); }
.ocard.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.ocard.dragging { opacity: .35; }
.ocard.drop-before::before, .ocard.drop-after::after { content: ""; position: absolute; top: 6px; bottom: 6px; width: 3px; background: var(--accent); border-radius: 4px; }
.ocard.drop-before::before { left: -10px; } .ocard.drop-after::after { right: -10px; }
.othumb { aspect-ratio: 1; display: grid; place-items: center; }
.othumb canvas, .othumb .blank { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 2px 10px rgba(30,20,10,.18); transition: transform .4s var(--ease); }
.othumb .blank { width: 70%; aspect-ratio: 1/1.414; display: grid; place-items: center; color: #aaa; font-size: 12px; }
.olabel { font: 500 12px var(--mono); color: var(--ink-2); margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.olabel i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.oacts { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; opacity: 0; transition: opacity .2s; background: var(--surface); padding: 3px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line), var(--shadow-2); z-index: 2; }
.ocard:hover .oacts, .ocard:focus-within .oacts { opacity: 1; }
.oacts button { width: 28px; height: 28px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.oacts button:hover { background: var(--bg-2); color: var(--ink); }
.oacts svg { width: 15px; height: 15px; }
@media (hover: none) { .oacts { opacity: 1; position: static; transform: none; box-shadow: none; justify-content: center; margin-bottom: 6px; background: transparent; flex-wrap: wrap; } }

/* ---------- Comparer ---------- */
.cmp-drops { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-slot h3 { font-size: 15px; margin-bottom: 10px; font-weight: 600; }
.cmp-file { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.cmp-file svg { width: 20px; height: 20px; color: var(--accent); }
.cmp-file b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 550; }
.diff { font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-wrap: break-word; padding: 24px; max-height: 70vh; overflow: auto; }
.diff del { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2); text-decoration: line-through; border-radius: 3px; }
.diff ins { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); text-decoration: none; border-radius: 3px; }
.diff .skip { display: block; text-align: center; color: var(--muted); font-size: 12px; background: var(--bg-2); border-radius: 999px; margin: 8px 0; padding: 3px; }
.diff .pg { display: block; color: var(--muted); font: 500 12px var(--mono); margin: 16px 0 4px; }
.vis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px; }
.vis-grid figure { margin: 0; text-align: center; }
.vis-grid figcaption { font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 6px; }
.vis-grid canvas { width: 100%; height: auto; box-shadow: 0 1px 6px rgba(0,0,0,.2); background: #fff; }

/* ---------- Scanner ---------- */
.scan { display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
.scan-video { position: relative; background: #0d0d0c; border-radius: 26px; overflow: hidden; aspect-ratio: 4/3; max-height: 62vh; width: 100%; }
.scan-video video { width: 100%; height: 100%; object-fit: contain; }
.scan .side .opts { padding-top: 0; }
.scan-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; padding: 0 22px; }
.scan-shots div { position: relative; }
.scan-shots img { width: 100%; border-radius: 10px; box-shadow: var(--shadow-1); }

/* ==========================================================
   Adaptatif
   ========================================================== */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .exclu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ed-body { grid-template-columns: 0 minmax(0, 1fr) 280px; }
  .ed-thumbs { visibility: hidden; padding: 0; }
}
@media (max-width: 960px) {
  .work, .scan { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; overflow: visible; }
  .side-foot { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border-radius: 0 0 26px 26px; box-shadow: 0 -12px 24px -16px rgba(30,20,10,.3); }
  .footer-in { grid-template-columns: 1fr; }
  .vis-grid { grid-template-columns: 1fr; }
  .why { grid-template-columns: 1fr; gap: 26px; }
  .why-card { border-left: 0; padding: 0; }
  .ed-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ed-scroll { grid-row: 1; padding: 16px 12px 40px; border-radius: 22px 22px 0 0; }
  .ed-thumbs { display: none; }
  .ed-panel { grid-row: 2; border-top: 1px solid var(--line); max-height: 34dvh; padding: 12px 16px; gap: 12px; background: var(--surface); }
  .ed-keys { display: none; }
  .ed:not(.has-sel) .ed-panel > :not(.ed-ptitle):not(.ed-hint) { display: none; }
  .ed:not(.has-sel) .ed-panel { flex-direction: row; align-items: center; gap: 10px; }
  .ed:not(.has-sel) .ed-hint { margin: 0; padding: 7px 12px; font-size: 12px; }
  .ed-rail { order: 3; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); justify-content: flex-start; }
  .ed-bar { box-shadow: none; border-radius: 0; padding: 0; }
  .ed-top-mid { margin: 0 0 0 auto; }
  .ed-file { display: none; }
  .nav-search .ns-txt, .nav-search kbd { display: none; }
  .nav-search { flex: none; padding: 10px; width: 40px; height: 40px; justify-content: center; }
}
@media (max-width: 340px) { .logo-text { display: none; } }
@media (max-width: 640px) {
  :root { --topbar: 68px; }
  .topbar { padding: 10px 10px 0; }
  .island { padding: 5px 5px 5px 10px; gap: 2px; }
  .logo-text { font-size: 17px; }
  .nav-btn { padding: 9px 10px; font-size: 13.5px; }
  .nb-full { display: none; } .nb-short { display: inline; }
  .logo { margin-right: 0; } .logo-mark { width: 30px; height: 30px; border-radius: 10px; }
  .icon-btn { width: 36px; height: 36px; }
  .island { min-width: 0; }
  .hide-sm { display: none; }
  .mega { left: 10px; right: 10px; grid-template-columns: 1fr 1fr; padding: 18px; gap: 18px; border-radius: 24px; }
  .hero { padding: 26px 16px 20px; }
  .hero .lead { font-size: 16.5px; }
  .popular { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: minmax(124px, auto); }
  .pop-in { padding: 14px; gap: 10px; }
  .pop b { font-size: 15px; }
  .pop:not(.big) small { display: none; }
  .pop .go { width: 28px; height: 28px; right: 10px; top: 10px; }
  .hero h1 { font-size: clamp(36px, 11vw, 52px); }
  .pop.big { grid-column: span 2; grid-row: span 1; }
  .pop.big .mock { display: none; }
  .search kbd { display: none; }
  .tools-wrap, .tool, .exclu, .why, .related, .tool-hero-in { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: 1fr; gap: 8px; }
  .card { padding: 12px 38px 12px 12px; }
  .exclu-grid { grid-template-columns: 1fr; }
  .exclu-card.big { grid-column: auto; grid-row: auto; }
  .tool-title { align-items: flex-start; }
  .ico-xl { width: 50px; height: 50px; border-radius: 15px; }
  .drop-core { padding: 36px 16px; }
  .files { grid-template-columns: repeat(2, 1fr); }
  .cmp-drops { grid-template-columns: 1fr; }
  .ed-save span { display: none; }
  .ed-top { gap: 6px; padding: 8px 10px 6px; }
  .ed-top-mid [data-x="thumbs"], .ed-top-mid .ed-div:first-of-type { display: none; }
  .org-grid { padding: 12px; gap: 12px; }
  .footer { padding: 0 10px 10px; }
  .footer-in { padding: 28px 22px; border-radius: 26px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .rv { opacity: 1; transform: none; } }
