/* Page Outils — styles isolés, illustrations vectorielles, aucun script ajouté. */
.tools-page {
  --tools-ink: #2d2738;
  --tools-muted: #655d70;
  --tools-purple: #6251be;
  background: #f8f7fc;
}

.tools-directory {
  position: relative;
  isolation: isolate;
  padding: 118px 24px 58px;
  color: var(--tools-ink);
  background:
    radial-gradient(ellipse at 79% 8%, #e9e5fa 0, transparent 42%),
    radial-gradient(ellipse at 4% 45%, #f0edfc 0, transparent 38%),
    #f8f7fc;
}

.tools-shell { max-width: 1120px; margin: 0 auto; }
.tools-hero { position: relative; margin-bottom: 30px; }
.tools-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tools-purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.tools-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #8f80dc;
}
.tools-hero h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 14px;
  font-size: clamp(34px, 4.4vw, 53px);
  line-height: 1.14;
  font-weight: 650;
  letter-spacing: -.045em;
}
.tools-hero h1 span { color: var(--tools-purple); }
.tools-intro {
  position: relative;
  z-index: 1;
  max-width: 640px;
  color: var(--tools-muted);
  font-size: 16px;
  line-height: 1.7;
}
.tools-hero-decor {
  position: absolute;
  top: -20px;
  right: 12px;
  width: 226px;
  height: 158px;
  pointer-events: none;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
}
.tool-item { grid-column: auto; min-width: 0; }
.tool-item--featured { grid-column: span 3; }
.tool-tile {
  --tool-accent: #6251be;
  --tool-tint: #f1edff;
  --tool-edge: #e1daef;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 26px 22px;
  border: 1px solid var(--tool-edge);
  border-radius: 23px;
  background: #fff;
  color: var(--tools-ink);
  text-decoration: none;
  box-shadow: 0 4px 15px #33294f04, 0 1px 2px #33294f03;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-tile--books {
  --tool-accent: #35694c;
  --tool-tint: #eaf4ed;
  --tool-edge: #dce9df;
  background: linear-gradient(120deg, #fff 38%, #f5faf6);
}
.tool-tile--text { background: linear-gradient(120deg, #fff 38%, #f6f3ff); }
.tool-tile--image { --tool-accent: #995129; --tool-tint: #fcf0e7; --tool-edge: #eddfd4; }
.tool-tile--pdf { --tool-accent: #a44452; --tool-tint: #fbebee; --tool-edge: #eddae0; }
.tool-tile--featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  min-height: 232px;
}
.tool-copy { position: relative; z-index: 1; flex: 1; }
.tool-tile--featured .tool-copy { grid-column: 1; grid-row: 1; align-self: center; }
.tool-category {
  display: block;
  margin-bottom: 7px;
  color: var(--tool-accent);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tool-tile h2 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.025em;
  font-weight: 650;
}
.tool-tile p {
  margin-top: 9px;
  color: var(--tools-muted);
  font-size: 14px;
  line-height: 1.65;
}
.tool-art {
  order: -1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  height: 112px;
  margin: -4px 0 13px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--tool-tint), #fff);
  pointer-events: none;
}
.tool-art svg { display: block; width: 166px; height: 112px; overflow: visible; }
.tool-tile--featured .tool-art {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  width: 184px;
  height: 178px;
  margin: 0;
  background: transparent;
}
.tool-tile--featured .tool-art svg { width: 200px; height: 178px; }
.tool-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  margin-top: auto;
  padding-top: 19px;
  color: var(--tool-accent);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
}
.tool-tile--featured .tool-action { grid-column: 1; grid-row: 2; padding-top: 17px; }
.tool-action-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--tool-edge);
  border-radius: 50%;
  background: var(--tool-tint);
  transition: transform .18s ease, background .18s ease;
}
.tool-action-arrow svg { width: 16px; height: 16px; }
.tool-tile:focus-visible {
  outline: 3px solid #6251be;
  outline-offset: 4px;
  border-color: var(--tool-accent);
  box-shadow: 0 12px 30px #33294f10;
}
@media (hover: hover) and (pointer: fine) {
  .tool-tile:hover {
    transform: translateY(-3px);
    border-color: var(--tool-accent);
    box-shadow: 0 15px 30px #33294f0e;
  }
  .tool-tile:hover .tool-action-arrow { transform: translateX(2px); }
}

.tools-backup {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 24px;
  padding: 17px 21px;
  border: 1px solid #e5dfef;
  border-radius: 17px;
  background: #ffffffa8;
}
.tools-backup-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #efebfa;
  color: var(--tools-purple);
}
.tools-backup-icon svg { width: 21px; height: 21px; }
.tools-backup-copy { flex: 1; min-width: 0; }
.tools-backup-copy h2 { font-size: 14px; line-height: 1.5; font-weight: 650; }
.tools-backup-copy p { margin-top: 3px; color: var(--tools-muted); font-size: 13px; line-height: 1.6; }
.tools-backup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 2px;
  color: var(--tools-purple);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #beb3df;
  text-underline-offset: 4px;
}
.tools-backup-link svg { flex: 0 0 16px; width: 16px; height: 16px; }
.tools-backup-link:hover { text-decoration-color: currentColor; }
.tools-backup-link:focus-visible, .tools-skip-link:focus-visible {
  outline: 3px solid #6251be;
  outline-offset: 4px;
  border-radius: 5px;
}
.tools-skip-link {
  position: fixed;
  top: 10px;
  left: 16px;
  z-index: 1100;
  padding: 10px 15px;
  border-radius: 9px;
  background: #fff;
  color: #44339a;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-160%);
}
.tools-skip-link:focus { transform: none; }
.tools-directory:focus { outline: none; }

@media (max-width: 1000px) {
  .tool-tile--featured { grid-template-columns: minmax(0, 1fr) 140px; }
  .tool-tile--featured .tool-art { width: 140px; }
  .tool-tile--featured .tool-art svg { width: 150px; }
  .tools-hero-decor { width: 180px; right: 0; }
}
@media (max-width: 860px) {
  .tools-directory { padding-top: 106px; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .tool-item, .tool-item--featured { grid-column: auto; }
  .tool-item:last-child { grid-column: auto; }
  .tool-tile--featured { display: flex; min-height: 0; }
  .tool-tile--featured .tool-art { order: -1; align-self: stretch; width: auto; height: 125px; margin: -4px 0 13px; background: linear-gradient(120deg, var(--tool-tint), #fff); }
  .tool-tile--featured .tool-art svg { width: 156px; height: 125px; }
  .tool-tile--featured .tool-action { padding-top: 19px; }
  .tools-hero-decor { display: none; }
  .tools-backup { flex-wrap: wrap; }
  .tools-backup-link { margin-left: 53px; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .tools-directory { padding: 96px 18px 36px; }
  .tools-hero { margin-bottom: 24px; }
  .tools-hero h1 { max-width: 400px; font-size: clamp(34px, 8.8vw, 43px); line-height: 1.15; margin-bottom: 12px; }
  .tools-intro { font-size: 14px; line-height: 1.7; }
  .tools-kicker { font-size: 10px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tool-item, .tool-item--featured, .tool-item:last-child { grid-column: 1; }
  .tool-tile, .tool-tile--featured, .tool-tile--pomodoro {
    display: flex;
    min-height: 0;
    padding: 21px 20px 17px;
    border-radius: 19px;
  }
  .tool-tile .tool-copy { align-self: stretch; min-width: 0; padding-right: 92px; }
  .tool-tile .tool-art, .tool-tile--featured .tool-art, .tool-tile--pomodoro .tool-art {
    position: absolute;
    top: 20px;
    right: 18px;
    left: auto;
    width: 84px;
    height: 100px;
    margin: 0;
    background: transparent;
    transform: none;
  }
  .tool-tile .tool-art svg, .tool-tile--featured .tool-art svg { width: 92px; height: 94px; }
  .tool-tile h2 { font-size: 19px; }
  .tool-tile p { font-size: 14px; line-height: 1.65; margin-top: 7px; }
  .tool-category { margin-bottom: 5px; font-size: 10px; }
  .tool-tile .tool-action { padding-top: 15px; margin-top: 0; font-size: 13px; }
  .tools-backup { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; padding: 16px; margin-top: 20px; }
  .tools-backup-icon { width: 32px; height: 32px; border-radius: 9px; }
  .tools-backup-link { grid-column: 2; margin-left: 0; padding: 6px 0; }
}
@media (max-width: 360px) {
  .tools-directory { padding-inline: 14px; }
  .tool-tile, .tool-tile--featured, .tool-tile--pomodoro { padding-inline: 17px; }
  .tool-tile .tool-copy { padding-right: 78px; }
  .tool-tile .tool-art, .tool-tile--featured .tool-art, .tool-tile--pomodoro .tool-art { width: 66px; }
  .tool-tile h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-tile, .tool-action-arrow { transition: none; }
  .tool-tile:hover, .tool-tile:hover .tool-action-arrow { transform: none; }
}
@media (forced-colors: active) {
  .tool-tile, .tools-backup, .tool-action-arrow { border-color: CanvasText; }
  .tool-tile:focus-visible, .tools-backup-link:focus-visible, .tools-skip-link:focus-visible { outline-color: Highlight; }
}

/* PHILOSOPHAL DARK V1 */
@media screen {
html[data-site-theme="dark"] .tools-page{--tools-ink:#d1ccdb;--tools-muted:#bbb5c5;--tools-purple:#a89edb;background:#191627}
html[data-site-theme="dark"] .tools-directory{background:radial-gradient(ellipse at 79% 8%, #1b172a 0, transparent 42%),
    radial-gradient(ellipse at 4% 45%, #1a1728 0, transparent 38%),
    #191627}
html[data-site-theme="dark"] .tools-kicker::before{background:#25213a}
html[data-site-theme="dark"] .tool-tile{--tool-accent:#a89edb;--tool-tint:#1a1628;--tool-edge:#5b4587;background:#1d1921}
html[data-site-theme="dark"] .tool-tile--books{--tool-accent:#a7d3ba;--tool-tint:#172a1d;--tool-edge:#624f7d;background:linear-gradient(120deg, #1d1921 38%, #16271a)}
html[data-site-theme="dark"] .tool-tile--text{background:linear-gradient(120deg, #1d1921 38%, #1a1627)}
html[data-site-theme="dark"] .tool-tile--image{--tool-accent:#dfb39a;--tool-tint:#291f17;--tool-edge:#876245}
html[data-site-theme="dark"] .tool-tile--pdf{--tool-accent:#d8a1a9;--tool-tint:#29171a;--tool-edge:#87455a}
html[data-site-theme="dark"] .tool-art{background:linear-gradient(120deg, var(--tool-tint), #1d1921)}
html[data-site-theme="dark"] .tool-tile:focus-visible{outline:3px solid #504587}
html[data-site-theme="dark"] .tools-backup{border:1px solid #5e4587;background:rgba(29,25,33,0.659)}
html[data-site-theme="dark"] .tools-backup-icon{background:#1c1729}
html[data-site-theme="dark"] .tools-backup-link:focus-visible,html[data-site-theme="dark"] .tools-skip-link:focus-visible{outline:3px solid #504587}
html[data-site-theme="dark"] .tools-skip-link{background:#1d1921;color:#a69bde}
@media (max-width: 860px){html[data-site-theme="dark"] .tool-tile--featured .tool-art{background:linear-gradient(120deg, var(--tool-tint), #1d1921)}}
}

.tool-tile--prompter {--tool-accent:#356d75;--tool-tint:#eaf4f5;--tool-edge:#d3e5e7;}
@media screen {
  html[data-site-theme="dark"] .tool-tile--prompter {--tool-accent:#b1dbe0;--tool-tint:#1a2b30;--tool-edge:#4e727a;}
}

/* V41 : la zone de gestion n'apparaît qu'après authentification. */
.has-professional-workspace .tools-hero{margin-top:36px}
.pro-status-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 21px;background:#302642;border:1px solid #5e4c76;border-radius:15px;color:#fff;box-shadow:0 13px 30px #3026421c}
.pro-status-copy{display:flex;align-items:center;gap:15px}.pro-status-copy>div{display:flex;flex-direction:column;gap:1px}.pro-status-copy strong{font-size:14px;font-weight:720}.pro-status-copy span:not(.pro-status-dot){font-size:12px;color:#c9bfd5}.pro-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:#b8e1cb;box-shadow:0 0 0 5px #b8e1cb25}
.pro-logout{border:1px solid #7a698d;color:#f1eafa;background:#ffffff0b;padding:10px 14px;border-radius:9px;font-weight:650;font-size:12px;white-space:nowrap;cursor:pointer}.pro-logout:hover{background:#ffffff25}
.pro-public-head{display:flex;align-items:baseline;gap:14px;margin-bottom:15px}.pro-public-head>span{color:#6f61a5;font-size:10px;font-weight:800;letter-spacing:.16em}.pro-public-head>p{font-size:12px;color:#7a7384;margin:0}
.pro-workspace{margin:43px 0 15px;border:1px solid #d8c9e4;border-radius:22px;padding:26px;background:linear-gradient(130deg,#f2ecf9 0%,#fdfbff 75%);box-shadow:0 14px 45px #4130520c}
.pro-workspace-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.pro-workspace-kicker{color:#71518e;font-size:10px;letter-spacing:.13em;font-weight:800}.pro-workspace-kicker span{font-size:14px;letter-spacing:0}.pro-workspace-head h2{color:#2b223e;margin:5px 0 4px;font-weight:730;letter-spacing:-.03em;font-size:27px}.pro-workspace-head p{color:#746983;margin:0;font-size:13px}.pro-workspace-indicator{display:inline-flex;align-items:center;gap:8px;color:#4a785f;font-size:12px;font-weight:730;border-radius:30px;background:#e6f2eb;border:1px solid #cde4d6;padding:6px 11px;white-space:nowrap}.pro-workspace-indicator span{font-size:10px}
.pro-tools-list{margin-top:23px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.pro-tool-card{display:flex;align-items:center;gap:17px;min-height:137px;text-decoration:none;color:#352744;border:1px solid #d8cce5;border-radius:15px;padding:20px;background:white;transition:transform .2s,border-color .2s,box-shadow .2s}.pro-tool-card:hover{transform:translateY(-2px);border-color:#9474b5;box-shadow:0 10px 30px #45355712}.pro-tool-card h3{font-size:19px;letter-spacing:-.02em;margin:3px 0}.pro-tool-card p{margin:0;font-size:12px;color:#72677c;line-height:1.55}.pro-tool-label{font-size:9px;letter-spacing:.14em;font-weight:800;color:#8460a8}.pro-card-icon{width:57px;height:57px;display:grid;place-items:center;flex:none;border-radius:14px;background:#efe7f6;color:#8261a6}.pro-card-icon svg{width:36px;height:36px}.pro-tool-arrow{align-self:start;margin-left:auto;color:#7e6796;font-size:18px}
@media(max-width:740px){.pro-status-banner{flex-wrap:wrap}.pro-public-head{display:block}.pro-tools-list{grid-template-columns:1fr}.pro-workspace{padding:20px}.pro-workspace-indicator{display:none}}
@media(prefers-reduced-motion:reduce){.pro-tool-card{transition:none}}

/* Convertisseur universel : carte dédiée dans la grille publique. */
.tool-tile--converter{--tool-accent:#367d86;--tool-tint:#e9f5f5;--tool-edge:#d5e9e9;background:linear-gradient(120deg,#fff 38%,#f2fbfa)}
@media(max-width:860px){.tool-item--converter{grid-column:1/-1}}

/* V54 : troisième outil, visible seulement dans le panneau professionnel. */
.pro-tool-card--audiovisuel .pro-card-icon{background:#e5f3ef;color:#35776a}
.pro-tool-card--audiovisuel:hover{border-color:#76a999}

/* V54.1 : présentation plus homogène de l'espace professionnel et workflow. */
@media(min-width:1120px){.pro-tools-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.pro-tool-card{padding:17px;gap:12px;align-items:flex-start;min-height:163px}.pro-card-icon{width:47px;height:47px;border-radius:12px}.pro-card-icon svg{width:28px;height:28px}.pro-tool-card h3{font-size:17px}.pro-tool-arrow{margin-left:auto}}
.pro-tool-card:focus-visible{outline:3px solid #a180cc;outline-offset:4px}
.pro-workflow{margin-top:17px;border:1px solid #ded4e8;background:#ffffffaf;border-radius:13px;padding:15px 17px;display:flex;gap:14px;align-items:center;flex-wrap:wrap;justify-content:space-between}
.pro-workflow-label{font-size:10px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;color:#806298}.pro-workflow-text{font-size:12px;line-height:1.5;color:#655b70;margin:3px 0 0}
.pro-workflow-steps{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.pro-workflow-steps a{display:inline-flex;text-decoration:none;align-items:center;border:1px solid #d8c6e5;border-radius:9px;background:#fff;color:#513568;font-weight:720;font-size:11px;padding:9px 12px}
.pro-workflow-steps a:hover{border-color:#9271b6;background:#f9f5fd}.pro-workflow-steps a:focus-visible{outline:3px solid #a180cc;outline-offset:3px}
.pro-workflow-separator{font-size:17px;color:#8e81a1}
html[data-site-theme="dark"] .pro-workspace{background:linear-gradient(130deg,#272033,#1f1b27);border-color:#584569}
html[data-site-theme="dark"] .pro-workspace-head h2{color:#f1eafa}
html[data-site-theme="dark"] .pro-workspace-head p,html[data-site-theme="dark"] .pro-public-head p{color:#c3b5d2}
html[data-site-theme="dark"] .pro-tool-card{background:#302a38;color:#f4eefa;border-color:#635272}
html[data-site-theme="dark"] .pro-tool-card p{color:#ccbed5}
html[data-site-theme="dark"] .pro-tool-label{color:#cdb4e9}
html[data-site-theme="dark"] .pro-tool-arrow{color:#e2c8f9}
html[data-site-theme="dark"] .pro-workflow{background:#302a38;border-color:#635272}
html[data-site-theme="dark"] .pro-workflow-text{color:#c7b9d0}
html[data-site-theme="dark"] .pro-workflow-label{color:#d6b5f2}
html[data-site-theme="dark"] .pro-workflow-steps a{background:#42334d;border-color:#745b84;color:#f0e5fa}
