/* Site de KEMS INFORMATIQUE. Couleurs et police : charte « Marine » (KemsCloud/identite).
   Mise en page : un index de questions, puis une question par logiciel avec un extrait de pièce. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("polices/PlusJakartaSans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --fond: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #EEF1F7;
  --bordure: #DCE2EC;
  --texte: #0B1B3F;
  --texte-2: #46536B;
  --accent: #1E54DE;
  --accent-fort: #1844B8;
  --sur-accent: #FFFFFF;
  --accent-texte: #1A4BCB;
  --ciel: #B6DEFA;
  --ciel-2: #D3EAFC;
  --ciel-bord: #A9CFEC;
  --pied: #0B1B3F;
  --pied-texte: #E9EEF8;
  --pied-texte-2: #B0BBD0;
  --pied-trait: #2A3C66;
  --favorable: #14612F;
  --alerte: #A11D1D;
  --attente: #874600;
  --ombre: 0 1px 2px rgba(11, 27, 63, .06), 0 18px 40px -24px rgba(11, 27, 63, .35);
  --police: "Plus Jakarta Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0A1226;
    --surface: #111B33;
    --surface-2: #17233F;
    --bordure: #25334F;
    --texte: #E9EEF8;
    --texte-2: #B0BBD0;
    --accent: #7099FF;
    --accent-fort: #8DADFF;
    --sur-accent: #06102A;
    --accent-texte: #8FB0FF;
    --ciel: #17315F;
    --ciel-2: #10234A;
    --ciel-bord: #2C4A80;
    --pied: #060C1B;
    --pied-trait: #25334F;
    --favorable: #74E3A2;
    --alerte: #FF8F8F;
    --attente: #F4C266;
    --ombre: none;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 1.0625rem/1.6 var(--police);
}

h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -.02em; }
ul, ol { list-style: none; }
a { color: var(--accent-texte); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.cadre { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 5; padding: .6rem 1rem; background: var(--surface); }
.evitement:focus { top: 1rem; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 4; background: var(--ciel); }
.entete .cadre { display: flex; align-items: center; gap: 1.75rem; min-height: 4.25rem; }
.enseigne { margin-right: auto; color: var(--texte); font-weight: 500; text-decoration: none; letter-spacing: .02em; }
.enseigne b { font-weight: 800; }
.entete nav { display: flex; gap: 1.75rem; }
.entete nav a { color: var(--texte); font-weight: 600; font-size: .9375rem; text-decoration: none; padding-block: .6rem; }
.entete nav a:hover { text-decoration: underline; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .55rem 1.3rem; border-radius: 10px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--sur-accent);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
}
.bouton:hover { background: var(--accent-fort); border-color: var(--accent-fort); }
.bouton.second { background: transparent; color: var(--texte); border-color: currentColor; }
.bouton.second:hover { background: var(--surface); }
.entete .bouton { min-height: 44px; font-size: .9375rem; padding-inline: 1rem; }

/* Ouverture */
.ouverture { background: linear-gradient(180deg, var(--ciel) 0%, var(--ciel-2) 55%, var(--fond) 100%); }
.ouverture .cadre {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem 4.5rem; align-items: center;
  padding-block: 3.5rem 5rem;
}
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.chapeau { margin-top: 1.5rem; font-size: 1.1875rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.index { background: var(--surface); border-radius: 14px; box-shadow: var(--ombre); overflow: hidden; }
.index h2 { font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: var(--texte-2); padding: 1.1rem 1.5rem .9rem; }
.index a {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 1.25rem;
  padding: .8rem 1.5rem; border-top: 1px solid var(--bordure);
  color: var(--texte); text-decoration: none; line-height: 1.35;
}
.index a span { font-weight: 600; }
.index a b { color: var(--accent-texte); font-size: .9375rem; font-weight: 700; white-space: nowrap; }
.index a:hover { background: var(--surface-2); }
.index a:focus-visible { outline-offset: -3px; }

/* Un logiciel */
.logiciel { border-top: 1px solid var(--bordure); }
.logiciel:first-of-type { border-top: 0; }
.logiciel .cadre {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.25rem 4.5rem; align-items: center;
  padding-block: 4.25rem;
}
.logiciel h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.35rem); font-weight: 800; }
.logiciel .nom { margin-top: .9rem; font-weight: 700; color: var(--accent-texte); font-size: 1.125rem; }
.logiciel .texte > p + p { margin-top: .5rem; }
.logiciel ul { margin-top: 1.1rem; display: grid; gap: .5rem; color: var(--texte-2); }
.logiciel li { padding-left: 1.25rem; position: relative; }
.logiciel li::before { content: ""; position: absolute; left: 0; top: .72em; width: .6rem; height: 2px; background: var(--accent); }
.logiciel .supports { margin-top: 1.1rem; font-size: .9375rem; color: var(--texte-2); }
.liens { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin-top: 1rem; }
.liens a { font-weight: 700; padding-block: .6rem; }
.liens a + a { font-weight: 500; }

/* L'extrait de pièce : la feuille, telle que le logiciel la montre */
.piece { min-width: 0; background: var(--surface); border-radius: 4px; box-shadow: var(--ombre); border: 1px solid var(--bordure); }
.piece figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding: 1.1rem 1.4rem .8rem; font-weight: 700; }
.piece figcaption small { font-size: .8125rem; font-weight: 500; color: var(--texte-2); align-self: center; }
.defile { overflow-x: auto; }
.piece table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; line-height: 1.35; }
.piece th, .piece td { padding: .62rem .6rem; text-align: left; border-top: 1px solid var(--bordure); }
.piece th:first-child, .piece td:first-child { padding-left: 1.4rem; }
.piece th:last-child, .piece td:last-child { padding-right: 1.4rem; }
.piece thead th { font-size: .8125rem; font-weight: 600; color: var(--texte-2); background: var(--surface-2); }
.piece .n { text-align: right; white-space: nowrap; }
.piece tfoot td, .piece tfoot th { font-weight: 800; border-top: 2px solid var(--texte); }
.piece tbody th { font-weight: 500; }
.piece .etat { padding: .8rem 1.4rem 1rem; border-top: 1px solid var(--bordure); font-size: .9375rem; font-weight: 600; }
.favorable { color: var(--favorable); }
.alerte { color: var(--alerte); }
.attente { color: var(--attente); }

/* Logiciels d'autres éditeurs */
.autres { border-top: 1px solid var(--bordure); }
.autres .cadre { padding-block: 4.5rem; }
.autres h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.35rem); font-weight: 800; }
.autres .paire { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 4.5rem; }
.autres h3 { font-size: 1.5rem; font-weight: 800; }
.autres .versions { margin-block: .35rem .75rem; font-weight: 700; color: var(--accent-texte); }
.autres ul { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.autres li { padding-block: .45rem; border-bottom: 1px solid var(--bordure); }
.autres .marques { margin-top: 2rem; font-size: .9375rem; color: var(--texte-2); }

/* Garanties et démarche */
.commun { background: var(--ciel-2); }
.commun .cadre, .demarche .cadre { padding-block: 4.5rem; }
.commun h2, .demarche h2, .contact h2 { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.35rem); font-weight: 800; }
.commun dl { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 4.5rem; }
.commun dt { font-weight: 800; font-size: 1.125rem; }
.commun dd { margin-top: .3rem; max-width: 32rem; }

.demarche ol { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: etape; }
.demarche li { counter-increment: etape; border-top: 3px solid var(--accent); padding-top: 1rem; }
.demarche h3 { font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }
.demarche h3::before { content: counter(etape) ". "; color: var(--accent-texte); }
.demarche li p { margin-top: .45rem; color: var(--texte-2); }

/* Contact et pied */
.contact { background: var(--pied); color: var(--pied-texte); --accent: #7099FF; --accent-fort: #8DADFF; --sur-accent: #06102A; }
.contact .cadre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.5rem 4.5rem; padding-block: 4.5rem 3.5rem; }
.contact p { margin-top: 1rem; color: var(--pied-texte-2); max-width: 32rem; }
.contact dl { display: grid; align-content: start; }
.contact dl div { display: flex; flex-wrap: wrap; gap: .1rem 1.5rem; padding-block: .95rem; border-bottom: 1px solid var(--pied-trait); }
.contact dl div:first-child { padding-top: 0; }
.contact dt { flex: 0 0 7rem; color: var(--pied-texte-2); }
.contact dd { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.contact dd a { color: var(--pied-texte); display: inline-block; padding-block: .2rem; }
.pied { background: var(--pied); color: var(--pied-texte-2); font-size: .9375rem; }
.pied .cadre { padding-block: 1.25rem 2rem; border-top: 1px solid var(--pied-trait); }

@media (max-width: 56rem) {
  .ouverture .cadre, .logiciel .cadre, .contact .cadre { grid-template-columns: minmax(0, 1fr); }
  .ouverture .cadre { padding-block: 2.25rem 3.5rem; }
  .logiciel .cadre { padding-block: 3.25rem; }
  .demarche ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .entete nav { display: none; }
  .entete .cadre { gap: .75rem; }
  .enseigne { line-height: 1.25; }
  .commun dl, .demarche ol, .autres .paire { grid-template-columns: minmax(0, 1fr); }
  .actions .bouton { flex: 1 1 100%; }
  .piece table { font-size: .875rem; }
  .piece th, .piece td { padding-inline: .4rem; }
  .piece th:first-child, .piece td:first-child, .piece figcaption, .piece .etat { padding-left: 1rem; }
  .piece th:last-child, .piece td:last-child { padding-right: 1rem; }
}
