:root {
  --navy: #071e5d;
  --navy-2: #0b2a78;
  --purple: #5a20df;
  --purple-2: #742ee8;
  --ink: #10182d;
  --muted: #667085;
  --line: #e6e9f0;
  --soft: #f5f6fb;
  --white: #fff;
  --success: #13795b;
  --shadow: 0 18px 55px rgba(7, 30, 93, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: linear-gradient(180deg, #fafaff 0, #fff 34rem); }
button, textarea, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; padding: .75rem 1rem; background: var(--navy); color: #fff; border-radius: .6rem; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(230,233,240,.8); background: rgba(255,255,255,.9); backdrop-filter: blur(16px); }
.header-inner { max-width: 1180px; height: 76px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand img { display: block; width: 255px; height: auto; }
nav { display: flex; gap: 1.6rem; }
nav a { color: #344054; font-size: .93rem; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--purple); }

main { overflow: hidden; }
.hero { max-width: 1180px; min-height: 510px; margin: auto; padding: 76px 24px 62px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 5rem; }
.eyebrow { display: inline-block; color: var(--purple); font-size: .76rem; line-height: 1; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { color: var(--navy); letter-spacing: -.04em; margin: 0; }
h1 { max-width: 720px; margin-top: .9rem; font-size: clamp(2.6rem, 5.2vw, 4.75rem); line-height: 1.01; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.08; }
.hero-copy > p { max-width: 650px; margin: 1.45rem 0 2rem; color: var(--muted); font-size: 1.13rem; line-height: 1.7; }
.button { min-height: 46px; padding: .78rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: .7rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--navy-2), var(--purple)); box-shadow: 0 9px 24px rgba(72,34,188,.24); }
.button:focus-visible, .text-button:focus-visible, .tool-card:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(90,32,223,.25); outline-offset: 2px; }

.hero-panel { position: relative; }
.hero-panel::before { content: ""; position: absolute; inset: -55px -70px; border-radius: 50%; background: radial-gradient(circle, rgba(90,32,223,.16), rgba(90,32,223,0) 68%); }
.mini-window { position: relative; padding: 1.3rem; border: 1px solid rgba(90,32,223,.13); border-radius: 1.35rem; background: rgba(255,255,255,.92); box-shadow: var(--shadow); transform: rotate(1.5deg); }
.window-dots { display: flex; gap: .4rem; margin-bottom: 2rem; }
.window-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d8dce6; }
.window-dots i:first-child { background: #6c2ae7; }
.mini-label { margin: 0 0 1rem; color: #344054; font-size: .8rem; font-weight: 800; }
.fake-line { width: 73%; height: 12px; margin: .85rem 0; border-radius: 99px; background: #dfe3ec; }
.fake-line.wide { width: 93%; background: linear-gradient(90deg, #172f72, #6730de); }
.fake-line.short { width: 48%; }
.mini-stats { margin-top: 2rem; padding-top: 1rem; display: flex; gap: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.mini-stats strong { color: var(--navy); }

.workspace { max-width: 1180px; margin: 12px auto 88px; padding: 34px; border: 1px solid rgba(90,32,223,.12); border-radius: 1.5rem; background: #fff; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.tool-heading { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.tool-heading h2 { margin-top: .55rem; font-size: 2rem; }
.privacy-pill { padding: .55rem .8rem; color: var(--success); border-radius: 99px; background: #ecfdf5; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.privacy-pill span { margin-right: .35rem; font-size: .65rem; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.editor-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.output-card { background: #fbfbfe; }
.editor-bar { height: 52px; padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.editor-bar label { color: #344054; font-size: .84rem; font-weight: 850; }
.text-button { padding: .35rem .55rem; border: 0; color: var(--purple); background: transparent; font-size: .8rem; font-weight: 850; cursor: pointer; }
textarea { display: block; width: 100%; min-height: 260px; padding: 1.1rem; resize: vertical; border: 0; color: #1d2939; background: transparent; font: 500 .98rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
textarea:focus { outline: 0; }
textarea::placeholder { color: #98a2b3; }
.stats { min-height: 48px; padding: .65rem 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .73rem; }
.stats strong { color: var(--navy); }
.action-row { min-height: 58px; padding: .55rem .75rem; display: flex; align-items: center; justify-content: flex-end; gap: .7rem; border-top: 1px solid var(--line); }
.action-row .button { min-height: 40px; padding: .6rem .9rem; font-size: .82rem; }
.tool-options { flex: 1; display: flex; align-items: center; gap: .5rem; }
.tool-options input, .tool-options select { min-width: 0; width: 100%; height: 38px; padding: 0 .65rem; border: 1px solid #d0d5dd; border-radius: .55rem; background: #fff; font-size: .78rem; }
.status { min-height: 1.4em; margin: .8rem .25rem 0; color: var(--success); font-size: .82rem; font-weight: 750; }

.tools-section { max-width: 1180px; margin: 0 auto; padding: 24px 24px 100px; scroll-margin-top: 85px; }
.section-heading { margin-bottom: 2.2rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.section-heading h2 { margin-top: .65rem; }
.section-heading p { max-width: 420px; margin: 0; color: var(--muted); line-height: 1.6; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tool-card { position: relative; min-height: 160px; padding: 1.25rem; text-align: left; border: 1px solid var(--line); border-radius: 1rem; color: inherit; background: #fff; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tool-card:hover, .tool-card.active { transform: translateY(-3px); border-color: rgba(90,32,223,.35); box-shadow: 0 13px 35px rgba(7,30,93,.09); }
.tool-card.active::after { content: "Sélectionné"; position: absolute; top: 1rem; right: 1rem; color: var(--purple); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.tool-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 1rem; border-radius: .65rem; color: var(--purple); background: #f1edff; font-weight: 900; }
.tool-card h3 { margin: 0 0 .45rem; color: var(--navy); font-size: 1rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.privacy-section { max-width: 1180px; margin: 0 auto 100px; padding: 42px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; border-radius: 1.5rem; color: #fff; background: linear-gradient(125deg, #061b55, #172e77 60%, #4d1cc5); }
.privacy-section .eyebrow { color: #bca7ff; }
.privacy-section h2 { max-width: 680px; margin-top: .55rem; color: #fff; }
.privacy-section p { max-width: 680px; margin: 1rem 0 0; color: #d9dff2; line-height: 1.65; }
.privacy-section ul { margin: 0; padding: 0; list-style: none; color: #eef0f9; font-size: .86rem; line-height: 2.1; }
.privacy-section li::before { content: "✓"; margin-right: .55rem; color: #bca7ff; font-weight: 900; }
.privacy-icon { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.08); font-size: 1.5rem; font-weight: 900; }

footer { border-top: 1px solid var(--line); background: #fafbfe; }
.footer-inner { max-width: 1180px; min-height: 170px; margin: auto; padding: 35px 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
.footer-inner img { width: 205px; height: auto; }
.footer-inner p { color: var(--muted); font-size: .82rem; }
.copyright { text-align: right; }
.noscript { margin: 0; padding: 1rem; text-align: center; color: #fff; background: #9b1c1c; }
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; background: #f7f7fc; }
.error-box { padding: 2rem; }
.error-box h1 { margin: 0; color: var(--purple); font-size: 5rem; }
.error-box h2 { font-size: 1.7rem; }
.error-box p { margin: 1rem 0; color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 60px; }
  .hero-panel { max-width: 600px; }
  .editor-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-section { grid-template-columns: auto 1fr; }
  .privacy-section ul { grid-column: 2; }
}

@media (max-width: 640px) {
  .header-inner { height: 66px; padding-inline: 16px; }
  .brand img { width: 196px; }
  nav { display: none; }
  .hero { min-height: auto; padding: 48px 18px 50px; }
  h1 { font-size: 2.65rem; }
  .workspace { margin: 0 12px 70px; padding: 20px 14px; border-radius: 1.1rem; }
  .tool-heading { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .tool-heading h2 { font-size: 1.7rem; }
  textarea { min-height: 220px; }
  .action-row { align-items: stretch; flex-direction: column; }
  .tool-options { width: 100%; }
  .tools-section { padding: 10px 16px 70px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 140px; }
  .privacy-section { margin: 0 12px 70px; padding: 28px 22px; grid-template-columns: 1fr; }
  .privacy-section ul { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr; gap: .6rem; }
  .copyright { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
