/* Bosco Site — landing + tutoriel d'installation MJ */

:root {
  --fond: #f9f2e4;
  --sable: #e8dcc1;
  --bordure: #d9c9a8;
  --texte: #1c1b1a;
  --texte-doux: #5a4f44;
  --brique: #b14438;
  --brique-fonce: #8a3329;
}

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

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

body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  background: var(--fond);
  color: var(--texte);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 40rem) {
  body {
    padding: 3rem 2rem 5rem;
  }
}

/* Titres */

h1 {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--texte);
  line-height: 1.15;
}

@media (min-width: 40rem) {
  h1 {
    font-size: 2.75rem;
  }
}

h2 {
  margin: 3rem 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brique);
  line-height: 1.25;
}

.tagline {
  margin: 0.25rem 0 1.75rem;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--texte-doux);
}

@media (min-width: 40rem) {
  .tagline {
    font-size: 1.5rem;
  }
}

footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bordure);
  font-size: 0.9rem;
  color: var(--texte-doux);
}

footer p {
  margin: 0;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--texte);
  line-height: 1.3;
}

h4 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--texte);
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Liens */

a {
  color: var(--brique);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--brique);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Code inline */

code {
  background: var(--sable);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  color: var(--texte);
  word-break: break-all;
}

/* Bloc URL manifest mis en valeur */

.manifest-url {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}

/* Centre les paragraphes qui contiennent une URL en bloc manifest */
p:has(.manifest-url) {
  text-align: center;
}

/* Bouton d'accès à l'app (contraste blanc sur brique : 5,6:1, AA) */

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

.bouton-app {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--brique);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}

.bouton-app:hover {
  background: var(--brique-fonce);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.bouton-app:focus-visible {
  outline: 2px solid var(--brique-fonce);
  outline-offset: 3px;
}

/* Texte présent pour les lecteurs d'écran, masqué visuellement */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Bandeau version (rempli par le script) */

#infos-module {
  font-size: 0.95rem;
  color: var(--texte-doux);
  text-align: center;
}

/* Section tutoriel */

.intro {
  font-size: 1.05rem;
  color: var(--texte-doux);
  margin-bottom: 2rem;
}

.prerequis,
.etape,
#cas-particuliers,
#depannage,
#aller-plus-loin {
  margin-top: 2.5rem;
}

/* Numéro d'étape */

.numero {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brique);
}

/* Captures */

figure {
  margin: 1.5rem 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--bordure);
  border-radius: 4px;
  background: #fff;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--texte-doux);
}

/* Tableau de dépannage */

#depannage table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

#depannage th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: var(--sable);
  color: var(--brique);
  font-weight: 600;
  border-bottom: 2px solid var(--brique);
}

#depannage td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--bordure);
  vertical-align: top;
}

/* Sur mobile, le tableau passe en cartes empilées pour éviter le scroll horizontal */

@media (max-width: 39.99rem) {
  #depannage table,
  #depannage thead,
  #depannage tbody,
  #depannage tr,
  #depannage th,
  #depannage td {
    display: block;
    width: 100%;
  }

  #depannage thead {
    position: absolute;
    left: -9999px;
  }

  #depannage tr {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--sable);
    border-radius: 4px;
  }

  #depannage td {
    padding: 0.4rem 0;
    border: none;
  }

  #depannage td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brique);
    margin-bottom: 0.15rem;
  }
}
