@font-face{font-family:"Syne";font-style:normal;font-weight:700;font-display:swap;src:url("/fonts/syne-latin-700-normal.woff2") format("woff2")}
@font-face{font-family:"Syne";font-style:normal;font-weight:800;font-display:swap;src:url("/fonts/syne-latin-800-normal.woff2") format("woff2")}
@font-face{font-family:"Inter Tight";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/inter-tight-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Inter Tight";font-style:normal;font-weight:500;font-display:swap;src:url("/fonts/inter-tight-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"Inter Tight";font-style:normal;font-weight:600;font-display:swap;src:url("/fonts/inter-tight-latin-600-normal.woff2") format("woff2")}
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Inter Tight", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Inter Tight", system-ui, sans-serif;

  /* Palette Clair - Style Studio Clean SaaS */
  --bg: #F8FAFC;
  --bg-subtle: #F1F5F9;
  --sheet: #FFFFFF;
  --surface: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --surface-hover: #F1F5F9;

  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #94A3B8;

  --border: #E2E8F0;
  --border-subtle: #F1F5F9;
  --border-hover: #CBD5E1;
  --border-focus: rgba(37, 99, 235, 0.35);

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EFF6FF;
  --primary-glow: rgba(37, 99, 235, 0.22);
  --cobalt: #2563EB;
  --cobalt-soft: #EFF6FF;
  --cobalt-ink: #FFFFFF;
  --cobalt-hover: #1D4ED8;

  --disabled: #E2E8F0;
  --disabled-ink: #94A3B8;
  --ok: #10B981;
  --ok-soft: #ECFDF5;
  --ok-border: #A7F3D0;
  --ok-ink: #065F46;
  --err: #EF4444;
  --err-soft: #FEF2F2;
  --err-border: #FECACA;
  --warn: #F59E0B;
  --warn-soft: #FFFBEB;
  --warn-border: #FDE68A;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.07), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.08), 0 6px 16px -4px rgba(15, 23, 42, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Palette Sombre - Confort & Haute Lisibilité */
    --bg: #0B0F19;
    --bg-subtle: #111827;
    --sheet: #161F30;
    --surface: #161F30;
    --surface-subtle: #1B2539;
    --surface-hover: #222F48;

    --ink: #F9FAFB;
    --ink-2: #9CA3AF;
    --ink-3: #6B7280;

    --border: #243049;
    --border-subtle: #1C263B;
    --border-hover: #374151;
    --border-focus: rgba(59, 130, 246, 0.45);

    --primary: #3B82F6;
    --primary-hover: #60A5FA;
    --primary-soft: rgba(59, 130, 246, 0.15);
    --primary-glow: rgba(59, 130, 246, 0.35);
    --cobalt: #3B82F6;
    --cobalt-soft: rgba(59, 130, 246, 0.15);
    --cobalt-ink: #FFFFFF;
    --cobalt-hover: #60A5FA;

    --disabled: #1F2937;
    --disabled-ink: #4B5563;
    --ok: #34D399;
    --ok-soft: rgba(16, 185, 129, 0.15);
    --ok-border: rgba(52, 211, 153, 0.3);
    --ok-ink: #6EE7B7;
    --err: #F87171;
    --err-soft: rgba(239, 68, 68, 0.15);
    --err-border: rgba(248, 113, 113, 0.3);
    --warn: #FBBF24;
    --warn-soft: rgba(245, 158, 11, 0.15);
    --warn-border: rgba(251, 191, 36, 0.3);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 25px -4px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 18px 40px -6px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Barre de navigation
   ========================================================================== */
header {
  padding: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: transform 0.15s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand .mark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  color: var(--ink);
}

.right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.eu-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--sheet);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.eu-icon {
  flex-shrink: 0;
  border-radius: 4px;
}

.header-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: var(--ink);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--sheet);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--ink);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

/* ==========================================================================
   Bandeau des outils (Pill Subnav)
   ========================================================================== */
nav.tools {
  position: relative;
  padding: 8px 0 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  justify-content: center;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tools-row::-webkit-scrollbar {
  display: none;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--sheet);
  border: 1px solid var(--border);
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.tool-pill:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--ink);
  transform: translateY(-1px);
}

.tool-pill[aria-current="page"] {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}

.tool-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Menu « Plus d'outils » : <details> natif, donc sans une ligne de JavaScript. */
.more-tools {
  position: relative;
}

.more-tools > summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 600;
}

.more-tools > summary::-webkit-details-marker {
  display: none;
}

.more-tools[open] > summary {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.more-tools[open] .more-caret {
  transform: rotate(180deg);
}

.more-caret {
  transition: transform 0.15s ease;
}

.more-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(158px, 1fr));
  gap: 4px;
  width: max-content;
  max-width: min(88vw, 440px);
  padding: 10px;
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.more-panel .tool-pill {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
}

.more-panel .tool-pill:hover {
  background: var(--surface-hover);
  transform: none;
}

/* Couleurs des icônes dans les pilules */
.pill-red .tool-pill-icon { color: #EF4444; }
.pill-blue .tool-pill-icon { color: #2563EB; }
.pill-indigo .tool-pill-icon { color: #6366F1; }
.pill-purple .tool-pill-icon { color: #8B5CF6; }
.pill-orange .tool-pill-icon { color: #F97316; }
.pill-green .tool-pill-icon { color: #10B981; }
.pill-cyan .tool-pill-icon { color: #06B6D4; }
.pill-pink .tool-pill-icon { color: #EC4899; }
.pill-teal .tool-pill-icon { color: #0D9488; }
.pill-emerald .tool-pill-icon { color: #059669; }
.pill-amber .tool-pill-icon { color: #D97706; }
.pill-rose .tool-pill-icon { color: #E11D48; }

/* ==========================================================================
   Hero Centré & Trust Badge
   ========================================================================== */
.hero {
  text-align: center;
  padding: 14px 0 28px;
  max-width: 780px;
  margin: 0 auto;
}

h1 {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 em {
  font-style: normal;
  color: var(--primary);
}

.lede {
  font-size: 16.5px;
  color: var(--ink-2);
  line-height: 1.58;
  margin: 0 auto 18px auto;
  max-width: 600px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  color: var(--ok-ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

.trust-badge svg {
  color: var(--ok);
  flex-shrink: 0;
}

/* ==========================================================================
   Workbench / Zone Centrale de Travail
   ========================================================================== */
.bench {
  max-width: 840px;
  margin: 0 auto 56px auto;
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
}

.bench-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.bench-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.meta {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.bench-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-clear {
  background: none;
  border: none;
  color: #EF4444;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-clear:hover {
  background: var(--err-soft);
  text-decoration: underline;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--sheet);
  border: 1px solid var(--border-hover);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.btn-add:hover {
  background: var(--surface-hover);
  border-color: var(--ink-3);
  transform: translateY(-1px);
}

.drop {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  background: var(--surface-subtle);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.drop:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.drop.over {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.drop-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px auto;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease;
}

.drop:hover .drop-icon {
  transform: scale(1.08);
}

.drop-title {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 5px;
}

.drop-sub {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 16px;
}

.drop-formats {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fmt-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2.5px 8px;
}

/* Boutons communs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  padding: 11px 24px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.25;
  user-select: none;
}

.btn.primary, .btn-run {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm), 0 3px 10px -2px var(--primary-glow);
}

.btn.primary:hover:not(:disabled), .btn-run:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow), 0 5px 15px -2px var(--primary-glow);
}

.btn.primary:active:not(:disabled), .btn-run:active:not(:disabled) {
  transform: translateY(0.5px);
}

.btn.primary:disabled, .btn-run:disabled {
  background: var(--disabled);
  color: var(--disabled-ink);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.8;
}

.btn.ghost {
  background: var(--sheet);
  border-color: var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover:not(:disabled) {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

/* Grille des vignettes A4 */
.pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.pg {
  position: relative;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  font-size: 12px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.pg[draggable="true"] {
  cursor: grab;
}

.pg:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pg.dragging {
  opacity: 0.35;
  transform: scale(0.96);
}

.pg.target {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
  border-color: var(--primary);
}

.pg .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 2px 7.5px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pg .frame {
  aspect-ratio: 1 / 1.38;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  margin-bottom: 6px;
}

.pg canvas, .pg img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 3px;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.pg .doc {
  font-size: 38px;
  color: var(--ink-3);
}

.pg .n {
  margin-top: 4px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

.pg .n span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg .ctl {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.pg .ctl button {
  border: 1px solid var(--border);
  background: var(--sheet);
  color: var(--ink);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  line-height: 1;
  padding: 0;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pg .ctl button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.pg .ctl button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Barre de contrôles basse */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

.hint {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.opts label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}

input[type=text], input[type=number], select {
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--sheet);
  color: var(--ink);
  padding: 8px 12px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

input[type=text]:focus, input[type=number]:focus, select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input[type=text] {
  min-width: 170px;
}

input[type=number] {
  width: 72px;
}

.btns {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.status:not(:empty) {
  padding: 10px 16px;
}

.status.err {
  color: var(--err);
  background: var(--err-soft);
  border: 1px solid var(--err-border);
}

.status.ok {
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
}

.status.warn {
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
}

/* Lien de signalement, ajouté au message d'erreur : hérite de sa couleur pour rester lisible
   dans les deux thèmes, souligné pour se distinguer du texte qui le précède. */
.status .report {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* Zone Markdown & Rapport de sécurité */
textarea {
  width: 100%;
  min-height: 220px;
  font: 14px/1.6 ui-monospace, Menlo, Monaco, Consolas, monospace;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--sheet);
  color: var(--ink);
  margin-top: 16px;
  resize: vertical;
}

textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.report {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  background: var(--sheet);
  box-shadow: var(--shadow-sm);
}

.report div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.report div:last-child {
  border-bottom: 0;
}

.report .head {
  background: var(--surface-subtle);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.report .lvl {
  font-weight: 700;
  font-size: 12.5px;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.report .val {
  font-weight: 600;
}

.report .lvl.r0 { color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-border); }
.report .lvl.r1, .report .r1 { color: var(--warn); }
.report .lvl.r1 { background: var(--warn-soft); border: 1px solid var(--warn-border); }
.report .lvl.r2, .report .r2 { color: var(--err); }
.report .lvl.r2 { background: var(--err-soft); border: 1px solid var(--err-border); }
.report .val.r0 { color: var(--ink-2); }
.report .note { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.5; margin-top: 4px; }
.hidden { display: none !important; }

/* ==========================================================================
   Grille d'accueil & Cartes d'outils
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.tool-card:hover .card-icon {
  transform: scale(1.06);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: fit-content;
  flex-shrink: 0;
}

/* Styles colorés par catégorie */
.icon-red { background: #FEF2F2; color: #EF4444; }
.badge-red { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

.icon-blue { background: #EFF6FF; color: #2563EB; }
.badge-blue { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

.icon-indigo { background: #EEF2FF; color: #6366F1; }
.badge-indigo { background: #EEF2FF; color: #4F46E5; border: 1px solid #C7D2FE; }

.icon-purple { background: #F5F3FF; color: #8B5CF6; }
.badge-purple { background: #F5F3FF; color: #7C3AED; border: 1px solid #DDD6FE; }

.icon-orange { background: #FFF7ED; color: #F97316; }
.badge-orange { background: #FFF7ED; color: #EA580C; border: 1px solid #FFEDD5; }

.icon-green { background: #ECFDF5; color: #10B981; }
.badge-green { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }

.icon-cyan { background: #ECFEFF; color: #06B6D4; }
.badge-cyan { background: #ECFEFF; color: #0891B2; border: 1px solid #BAE6FD; }

.icon-pink { background: #FDF2F8; color: #EC4899; }
.badge-pink { background: #FDF2F8; color: #DB2777; border: 1px solid #FBCFE8; }

.icon-teal { background: #F0FDFA; color: #0D9488; }
.badge-teal { background: #F0FDFA; color: #0F766E; border: 1px solid #99F6E4; }

.icon-emerald { background: #ECFDF5; color: #059669; }
.badge-emerald { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

.icon-amber { background: #FFFBEB; color: #D97706; }
.badge-amber { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }

.icon-rose { background: #FFF1F2; color: #E11D48; }
.badge-rose { background: #FFF1F2; color: #BE123C; border: 1px solid #FECDD3; }

@media (prefers-color-scheme: dark) {
  .icon-red { background: rgba(239, 68, 68, 0.15); color: #F87171; }
  .badge-red { background: rgba(239, 68, 68, 0.15); color: #F87171; border-color: rgba(239, 68, 68, 0.3); }

  .icon-blue { background: rgba(37, 99, 235, 0.15); color: #60A5FA; }
  .badge-blue { background: rgba(37, 99, 235, 0.15); color: #60A5FA; border-color: rgba(37, 99, 235, 0.3); }

  .icon-indigo { background: rgba(99, 102, 241, 0.15); color: #818CF8; }
  .badge-indigo { background: rgba(99, 102, 241, 0.15); color: #818CF8; border-color: rgba(99, 102, 241, 0.3); }

  .icon-purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; }
  .badge-purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; border-color: rgba(139, 92, 246, 0.3); }

  .icon-orange { background: rgba(249, 115, 22, 0.15); color: #FB923C; }
  .badge-orange { background: rgba(249, 115, 22, 0.15); color: #FB923C; border-color: rgba(249, 115, 22, 0.3); }

  .icon-green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
  .badge-green { background: rgba(16, 185, 129, 0.15); color: #34D399; border-color: rgba(16, 185, 129, 0.3); }

  .icon-cyan { background: rgba(6, 182, 212, 0.15); color: #22D3EE; }
  .badge-cyan { background: rgba(6, 182, 212, 0.15); color: #22D3EE; border-color: rgba(6, 182, 212, 0.3); }

  .icon-pink { background: rgba(236, 72, 153, 0.15); color: #F472B6; }
  .badge-pink { background: rgba(236, 72, 153, 0.15); color: #F472B6; border-color: rgba(236, 72, 153, 0.3); }

  .icon-teal { background: rgba(13, 148, 136, 0.15); color: #2DD4BF; }
  .badge-teal { background: rgba(13, 148, 136, 0.15); color: #2DD4BF; border-color: rgba(13, 148, 136, 0.3); }

  .icon-emerald { background: rgba(5, 150, 105, 0.15); color: #34D399; }
  .badge-emerald { background: rgba(5, 150, 105, 0.15); color: #34D399; border-color: rgba(5, 150, 105, 0.3); }

  .icon-amber { background: rgba(217, 119, 6, 0.15); color: #FBBF24; }
  .badge-amber { background: rgba(217, 119, 6, 0.15); color: #FBBF24; border-color: rgba(217, 119, 6, 0.3); }

  .icon-rose { background: rgba(225, 29, 72, 0.15); color: #FB7185; }
  .badge-rose { background: rgba(225, 29, 72, 0.15); color: #FB7185; border-color: rgba(225, 29, 72, 0.3); }
}

.tool-card b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  color: var(--ink);
  display: block;
}

.tool-card span {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.card-cta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
}

.card-arrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  transform: translateX(-3px);
  opacity: 0.4;
  transition: all 0.15s ease;
}

.tool-card:hover .card-arrow {
  transform: translateX(0);
  opacity: 1;
}

/* ==========================================================================
   Étapes & Bento Features
   ========================================================================== */
.steps-section {
  margin: 40px 0 52px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.step-card {
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.4;
  margin-bottom: 8px;
  line-height: 1;
}

.step-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}

.step-card p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 20px 0 52px;
  padding: 36px 0 0;
  border-top: 1px solid var(--border);
}

.feat-card {
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feat-icon-green { background: #ECFDF5; color: #10B981; }
.feat-icon-blue { background: #EFF6FF; color: #2563EB; }
.feat-icon-amber { background: #FFFBEB; color: #D97706; }
.feat-icon-purple { background: #F5F3FF; color: #8B5CF6; }

@media (prefers-color-scheme: dark) {
  .feat-icon-green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
  .feat-icon-blue { background: rgba(37, 99, 235, 0.15); color: #60A5FA; }
  .feat-icon-amber { background: rgba(217, 119, 6, 0.15); color: #FBBF24; }
  .feat-icon-purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; }
}

.feat-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}

.feat-card p {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Article & FAQ
   ========================================================================== */
article {
  max-width: 840px;
  margin: 0 auto;
  padding: 12px 0 32px;
}

.info-card {
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.info-card h2, .faq-card-section h2, .static-article h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}

.info-card p, .static-article p {
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 15px;
  margin: 0;
}

.faq-grid {
  display: grid;
  gap: 14px;
}

.faq-card {
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.faq-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}

.faq-card p {
  color: var(--ink-2);
  margin: 0;
  line-height: 1.6;
  font-size: 14.5px;
}

/* ==========================================================================
   Pied de page
   ========================================================================== */
footer {
  color: var(--ink-2);
  font-size: 13.5px;
  padding: 44px 0 52px;
  border-top: 1px solid var(--border);
  margin-top: 52px;
}

.foot-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.foot-brand {
  max-width: 320px;
}

.foot-tagline {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.foot-security {
  max-width: 520px;
}

.foot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.sec-badge.eu {
  color: var(--ink-2);
  background: var(--surface-subtle);
  border-color: var(--border);
}

.sec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.foot-security p {
  margin: 5px 0;
  line-height: 1.55;
  font-size: 13px;
}

.foot-sub {
  color: var(--ink-3);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.foot-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.foot-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--sheet);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.foot-links a:hover {
  color: var(--ink);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.foot-copy {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Responsive & Accessibilité
   ========================================================================== */
@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }
  header {
    padding: 14px 0 10px;
  }
  .brand {
    font-size: 19px;
  }
  .eu-badge {
    display: none;
  }
  .tools-row {
    justify-content: center;
    gap: 6px 4px;
  }
  .tool-pill {
    padding: 5px 10px;
    font-size: 12px;
  }
  /* Le panneau se cale sur la largeur de la barre, pas sur la pastille. */
  .more-tools {
    position: static;
  }
  .more-panel {
    left: 0;
    right: 0;
    transform: none;
    width: auto;
    max-width: none;
    top: calc(100% - 10px);
  }
  h1 {
    font-size: 28px;
  }
  .bench {
    padding: 18px;
    border-radius: 16px;
  }
  .drop {
    padding: 36px 14px;
  }
  .bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btns {
    width: 100%;
  }
  .btns .btn {
    width: 100%;
  }
  .foot-top {
    flex-direction: column;
    gap: 20px;
  }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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