/* Entrepreneur OS : le site de presentation et de telechargement.
   Charte : celle de l'application (plugins/dsh-brand) : marine #3e4462,
   menthe #8bdfb9, cuivre #e4ac7b, gris-bleu #d7e0e3. Menthe et cuivre sont
   fonces pour le theme clair (lisibilite), pris tels quels en sombre.
   Polices hebergees ici (voir polices/LICENCES.txt) : aucune requete vers un
   tiers, donc aucune adresse IP de visiteur transmise a qui que ce soit. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/polices/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/polices/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --fond: #fbfcfd;
  --fond-2: #eef3f5;
  --surface: #ffffff;
  --bordure: #c4d2d7;
  --bordure-douce: #dde6e9;
  --encre: #22263a;
  --titre: #3e4462;
  --secondaire: #555d7b;
  --accent: #1f7a55;
  --accent-fond: #e3f5ec;
  --cuivre: #a35f22;
  --cuivre-fond: #fbeee2;
  --cuivre-texte: #874b16;
  --danger: #b03a2e;
  --danger-fond: #fcebea;
  --bouton: #3e4462;
  --bouton-survol: #2d334d;
  --bouton-texte: #ffffff;
  --code-fond: #eef3f5;
  --ombre: 0 1px 2px rgba(34, 38, 58, 0.06), 0 12px 32px -12px rgba(34, 38, 58, 0.22);
  --rayon: 16px;
  --titres: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --texte: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1c1f30;
    --fond-2: #22263a;
    --surface: #2d334d;
    --bordure: #474e70;
    --bordure-douce: #383f5e;
    --encre: #eef1f6;
    --titre: #ffffff;
    --secondaire: #b4bbd2;
    --accent: #8bdfb9;
    --accent-fond: #243a37;
    --cuivre: #e4ac7b;
    --cuivre-fond: #3a3130;
    --cuivre-texte: #e4ac7b;
    --danger: #ff8a80;
    --danger-fond: #3b2a33;
    --bouton: #8bdfb9;
    --bouton-survol: #a7e8ca;
    --bouton-texte: #1c1f30;
    --code-fond: #22263a;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
p, ul, ol, h1, h2, h3, figure { margin: 0; }
code, kbd { font-family: var(--mono); font-size: 0.88em; background: var(--code-fond); border-radius: 6px; padding: 1px 6px; word-break: break-word; }
.ui { font-weight: 700; color: var(--titre); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aller-au-contenu { position: absolute; left: 16px; top: -100px; background: var(--surface); color: var(--titre); padding: 10px 14px; border-radius: 10px; z-index: 20; }
.aller-au-contenu:focus { top: 12px; }

.enveloppe { max-width: 72rem; margin-inline: auto; padding-inline: 20px; }
.etroit { max-width: 46rem; }

/* --- En-tete ------------------------------------------------------------ */
.entete {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bordure-douce);
}
.entete .enveloppe { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.marque { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--titre); }
.marque img { width: 34px; height: auto; }
.marque span { font-family: var(--titres); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
@media (max-width: 400px) { .marque span { font-size: 17px; } .marque img { width: 28px; } }
.logo-sombre { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-clair { display: none; }
  .logo-sombre { display: block; }
}
.menu { display: flex; gap: 4px; margin-left: auto; }
.menu a { color: var(--secondaire); text-decoration: none; font-weight: 600; font-size: 15.5px; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.menu a:hover { color: var(--titre); background: var(--fond-2); }
.entete .bouton { margin-left: 8px; }
@media (max-width: 860px) { .menu { display: none; } .entete .bouton { margin-left: auto; } }

/* --- Boutons ------------------------------------------------------------ */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px; border-radius: 12px; border: 2px solid transparent;
  font-family: var(--texte); font-weight: 700; font-size: 16.5px; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.bouton svg { width: 20px; height: 20px; flex: none; }
.bouton.principal { background: var(--bouton); color: var(--bouton-texte); }
.bouton.principal:hover { background: var(--bouton-survol); text-decoration: none; }
.bouton.principal:active { transform: translateY(1px); }
.bouton.secondaire { background: transparent; color: var(--titre); border-color: var(--bordure); }
.bouton.secondaire:hover { border-color: var(--titre); text-decoration: none; }
.bouton.petit { min-height: 44px; padding: 8px 14px; font-size: 15px; }
.bouton[data-etat="ok"] { background: var(--accent); color: var(--bouton-texte); border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .bouton[data-etat="ok"] { color: #1c1f30; } }

/* --- Hero --------------------------------------------------------------- */
.hero { padding-block: 64px 56px; }
.hero .enveloppe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero .enveloppe { grid-template-columns: 1fr; gap: 36px; } .hero { padding-block: 40px 32px; } }
.surtitre { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cuivre); }
h1 { font-family: var(--titres); font-weight: 700; font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.04; letter-spacing: -0.025em; color: var(--titre); text-wrap: balance; margin-top: 12px; }
h1 em { font-style: normal; color: var(--accent); }
.chapeau { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--secondaire); margin-top: 18px; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.meta-version { margin-top: 14px; font-size: 14.5px; color: var(--secondaire); font-variant-numeric: tabular-nums; }
.meta-version .sep { margin-inline: 6px; color: var(--secondaire); }
.ecran { border-radius: 14px; border: 1px solid var(--bordure-douce); box-shadow: var(--ombre); overflow: hidden; background: var(--surface); }
.ecran .barre { height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding-inline: 14px; background: var(--fond-2); border-bottom: 1px solid var(--bordure-douce); }
.ecran .barre i { display: block; width: 10px; height: 1.5px; background: var(--secondaire); opacity: 0.7; }
.ecran .barre i:nth-child(2) { height: 9px; background: none; border: 1.5px solid var(--secondaire); width: 9px; }
.ecran .barre i:nth-child(3) { position: relative; background: none; }
.ecran .barre i:nth-child(3)::before, .ecran .barre i:nth-child(3)::after { content: ""; position: absolute; left: 0; top: -1px; width: 12px; height: 1.5px; background: var(--secondaire); transform: rotate(45deg); }
.ecran .barre i:nth-child(3)::after { transform: rotate(-45deg); }

/* --- Sections ----------------------------------------------------------- */
section { padding-block: 72px; }
section.alterne { background: var(--fond-2); }
@media (max-width: 700px) { section { padding-block: 52px; } }
.entete-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
h2 { font-family: var(--titres); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; letter-spacing: -0.02em; color: var(--titre); text-wrap: balance; }
h3 { font-family: var(--titres); font-weight: 700; font-size: 1.2rem; line-height: 1.3; color: var(--titre); }
.intro { color: var(--secondaire); font-size: 1.08rem; max-width: 40rem; }

/* Ce que fait l'application */
.atouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .atouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .atouts { grid-template-columns: minmax(0, 1fr); } }
.atout { background: var(--surface); border: 1px solid var(--bordure-douce); border-radius: var(--rayon); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.icone { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-fond); color: var(--accent); }
.icone svg { width: 22px; height: 22px; }
.atout p { color: var(--secondaire); font-size: 16px; }

/* Onglets d'installation */
.onglets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 560px) { .onglets { grid-template-columns: 1fr; } }
.onglet {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  padding: 16px 18px; min-height: 72px; border-radius: var(--rayon);
  border: 2px solid var(--bordure-douce); background: var(--surface); color: var(--titre);
  font-family: var(--texte); transition: border-color 160ms ease, background-color 160ms ease;
}
.onglet:hover { border-color: var(--bordure); }
.onglet .icone { flex: none; }
.onglet strong { display: block; font-size: 17px; line-height: 1.25; }
.onglet small { display: block; color: var(--secondaire); font-size: 14.5px; margin-top: 2px; }
.onglet[aria-selected="true"] { border-color: var(--accent); background: var(--accent-fond); }
.panneau { display: flex; flex-direction: column; gap: 14px; }
.panneau[hidden] { display: none; }

.etapes { list-style: none; padding: 0; margin: 0; counter-reset: n; display: grid; gap: 12px; }
.etapes > li {
  counter-increment: n; position: relative; background: var(--surface); border: 1px solid var(--bordure-douce);
  border-radius: var(--rayon); padding: 18px 20px 18px 70px; display: flex; flex-direction: column; gap: 8px;
}
.etapes > li::before {
  content: counter(n); position: absolute; left: 20px; top: 17px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--titre); color: var(--fond);
  font-family: var(--titres); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) { .etapes > li::before { background: var(--accent); color: #1c1f30; } }
.etapes h3 { font-size: 1.12rem; }
.etapes p { color: var(--secondaire); }
.etapes p strong { color: var(--encre); }
@media (max-width: 480px) { .etapes > li { padding: 16px 16px 16px 60px; } .etapes > li::before { left: 14px; } }

.note { border-radius: 12px; padding: 12px 16px; font-size: 15.5px; display: flex; gap: 10px; align-items: flex-start; }
.note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.note.info { background: var(--accent-fond); color: var(--encre); }
.note.info svg { color: var(--accent); }
.note.prudence { background: var(--cuivre-fond); color: var(--encre); }
.note.prudence svg { color: var(--cuivre); }

.texte-agent {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  background: var(--code-fond); border: 1px solid var(--bordure-douce); border-radius: 12px; padding: 16px; margin: 0;
  max-height: 22rem; overflow: auto;
}
.rangee { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Cles */
.cles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 800px) { .cles { grid-template-columns: minmax(0, 1fr); } }
.cle { background: var(--surface); border: 1px solid var(--bordure-douce); border-radius: var(--rayon); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.cle-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.cle-tete h3 { font-size: 1.25rem; }
.badge { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; white-space: nowrap; margin-left: auto; }
.badge.essentielle { background: var(--cuivre-fond); color: var(--cuivre-texte); }
.badge.conseillee { background: var(--accent-fond); color: var(--accent); }
.badge.facultative { background: var(--fond-2); color: var(--secondaire); }
.cle > p { color: var(--secondaire); }
.cle dl { margin: 0; display: grid; gap: 8px; }
.cle dt { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--secondaire); }
.cle dd { margin: 0 0 4px; }
.capture { border: 1px solid var(--bordure-douce); border-radius: 10px; overflow: hidden; }
.abonnements { margin-top: 20px; }

/* Mises a jour */
.maj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .maj { grid-template-columns: 1fr; } }
.maj-texte { display: flex; flex-direction: column; gap: 14px; }
.maj-texte p { color: var(--secondaire); }
.fenetre-maj { background: var(--surface); border: 1px solid var(--bordure-douce); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 12px; }
.fenetre-maj .titre-fenetre { font-weight: 700; color: var(--titre); }
.fenetre-maj .notes { font-size: 15.5px; color: var(--secondaire); }
.fenetre-maj .notes ul { padding-left: 20px; display: grid; gap: 6px; }
.fenetre-maj .boutons { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.fenetre-maj .faux-bouton { font-size: 14.5px; font-weight: 700; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--bordure); color: var(--titre); }
.fenetre-maj .faux-bouton.defaut { border: 2px solid var(--accent); }
.fenetre-maj .legende { font-size: 13.5px; color: var(--secondaire); }

/* Questions frequentes */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--bordure-douce); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; min-height: 56px; font-weight: 700; color: var(--titre); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform 200ms ease; color: var(--secondaire); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .reponse { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 10px; color: var(--secondaire); }
.faq .reponse strong { color: var(--encre); }

/* Pied */
.pied { padding-block: 36px 48px; border-top: 1px solid var(--bordure-douce); color: var(--secondaire); font-size: 15px; }
.pied .enveloppe { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.pied nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pied a { color: var(--secondaire); min-height: 44px; display: inline-flex; align-items: center; }

/* Page des nouveautes */
.journal { display: grid; gap: 18px; }
.version { background: var(--surface); border: 1px solid var(--bordure-douce); border-radius: var(--rayon); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.version-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.version-tete h2 { font-size: 1.6rem; }
.version-tete time { color: var(--secondaire); font-size: 15px; }
.version-tete .badge { margin-left: 0; }
.version ul { padding-left: 22px; display: grid; gap: 8px; }
.version li { color: var(--encre); }
.retour { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-decoration: none; }
.retour svg { width: 18px; height: 18px; }
