/* MyAssistant : feuille de style de la vitrine (thème Ardoise de l'application). */

:root {
  --fond: #f3f5f7;
  --surface: #ffffff;
  --bulle: #e4e9ee;
  --encre: #18212b;
  --encre-pale: #536070;
  --trait: #d9e0e7;
  --accent: #1f5f8b;
  --accent-fonce: #174a6d;
  --sur-accent: #ffffff;
  --bon: #2f7d55;
  --attention: #8a5a00;
  --ardoise: #1d2833;
  --ardoise-trait: #33414f;

  --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --titre: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;

  --mesure: 40rem;
  --large: 72rem;
  --rayon: 6px;
}

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-fonce); }

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

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

/* ─── Titres ─── */

h1, h2, h3 {
  overflow-wrap: break-word;
  hyphens: auto;
  font-family: var(--titre);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.005em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; }

p, ul, ol { margin: 0 0 1em; }

.cadre { max-width: var(--large); margin: 0 auto; padding: 0 1.25rem; }
.lecture { max-width: var(--mesure); }

/* ─── En-tête ─── */

.entete {
  background: var(--surface);
  border-bottom: 1px solid var(--trait);
}
.entete .cadre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--encre);
  text-decoration: none;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.25rem;
}
.marque svg { width: 1.9rem; height: 1.9rem; flex: none; }
.navigation { flex: 1 1 auto; }
.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.1rem;
}
.navigation a {
  color: var(--encre);
  text-decoration: none;
  font-size: .98rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.navigation a:hover { border-bottom-color: var(--trait); }
.navigation a[aria-current="page"] { border-bottom-color: var(--accent); }
.acces { display: flex; gap: .6rem; align-items: center; }

@media (max-width: 52rem) {
  .entete .cadre { gap: .6rem 1rem; }
  .navigation { order: 3; flex-basis: 100%; margin: 0 -1.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .navigation ul { flex-wrap: nowrap; gap: 0; padding: 0 1.25rem; }
  .navigation a { display: block; padding: .55rem .75rem; white-space: nowrap; }
  .navigation li:first-child a { padding-left: 0; }
  .acces { margin-left: auto; }
}
@media (max-width: 30rem) {
  .entete .cadre { padding-top: .6rem; padding-bottom: .2rem; }
  .acces { gap: .4rem; }
  .acces .bouton { padding: .5rem .65rem; font-size: .9rem; border-width: 1.5px; }
  .marque { font-size: 1.05rem; gap: .4rem; }
  .marque svg { width: 1.6rem; height: 1.6rem; }
}
@media (max-width: 22.5rem) {
  .cadre { padding: 0 1rem; }
  .navigation { margin: 0 -1rem; }
  .navigation ul { padding: 0 1rem; }
  .entete .cadre { gap: .5rem .6rem; }
  .acces { gap: .3rem; }
  .acces .bouton { padding: .42rem .45rem; font-size: .8rem; }
  .marque { font-size: .98rem; gap: .35rem; }
  .marque svg { width: 1.4rem; height: 1.4rem; }
  .navigation a { padding: .55rem .55rem; font-size: .92rem; }
}

/* ─── Boutons ─── */

.bouton {
  display: inline-block;
  padding: .7rem 1.15rem;
  border-radius: var(--rayon);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--sur-accent);
  cursor: pointer;
  font-family: inherit;
}
.bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: var(--sur-accent); }
.bouton.second { background: transparent; color: var(--accent); }
.bouton.second:hover { background: var(--bulle); color: var(--accent-fonce); }
.boutons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 30rem) {
  .boutons .bouton { flex: 1 1 100%; text-align: center; padding-top: .85rem; padding-bottom: .85rem; }
  .formulaire .bouton { width: 100%; padding-top: .85rem; padding-bottom: .85rem; }
}

/* ─── Accueil : la dictée devient un devis ─── */

.ouverture { padding: 3rem 0 3.5rem; }
.ouverture .cadre {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3rem;
  align-items: center;
}
.ouverture .chapeau { font-size: 1.15rem; color: var(--encre-pale); max-width: 34rem; }
@media (max-width: 60rem) {
  .ouverture .cadre { grid-template-columns: 1fr; gap: 2rem; }
}

.scene {
  margin: 0;
  background: var(--ardoise);
  color: #e8eef3;
  border-radius: 10px;
  padding: 1.4rem;
  display: grid;
  gap: 1.1rem;
}
.scene .legende {
  font-size: .85rem;
  color: #9fb0c0;
  margin: 0 0 .35rem;
}
.dictee {
  background: #26323d;
  border-radius: 14px 14px 14px 4px;
  padding: .9rem 1rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.dictee .micro { color: #7db8e2; font-weight: 600; margin-right: .3rem; }
.brouillon {
  background: var(--surface);
  color: var(--encre);
  border-radius: var(--rayon);
  padding: 1rem 1rem .9rem;
  border-left: 4px solid var(--accent);
}
.brouillon .tete {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
  font-size: .92rem;
  color: var(--encre-pale);
  margin-bottom: .6rem;
}
.brouillon .tete strong { color: var(--encre); font-size: 1rem; }
.brouillon table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.brouillon caption { text-align: left; font-weight: 600; padding-bottom: .3rem; }
.brouillon th, .brouillon td { text-align: left; padding: .38rem .25rem; border-top: 1px solid var(--trait); vertical-align: top; }
.brouillon th { font-weight: 600; color: var(--encre-pale); font-size: .82rem; }
.brouillon td.qte { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.brouillon th.qte { text-align: right; }
.repere {
  display: inline-block;
  max-width: 100%;
  font-size: .78rem;
  font-weight: 600;
  padding: .05rem .4rem;
  border-radius: 3px;
  margin-left: .3rem;
  white-space: normal;
}
.repere.prix { background: #e3efe8; color: #24603f; }
.repere.chiffrer { background: #fbefd5; color: var(--attention); }
.brouillon .pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .8rem;
  font-size: .88rem;
  color: var(--encre-pale);
}
.brouillon .faux-bouton {
  background: var(--accent);
  color: var(--sur-accent);
  border-radius: var(--rayon);
  padding: .45rem .8rem;
  font-weight: 600;
  font-size: .9rem;
}

/* ─── Bandes et sections ─── */

.bande { padding: 3.25rem 0; border-top: 1px solid var(--trait); }
@media (max-width: 30rem) {
  .ouverture { padding: 1.75rem 0 2.25rem; }
  .bande { padding: 2.25rem 0; }
  .page-tete { padding: 1.75rem 0 1rem; }
  .scene { padding: 1rem; border-radius: 8px; }
  .brouillon { padding: .8rem .75rem; }
  .brouillon td.qte { padding-left: .5rem; }
  .formule { padding: 1.15rem; }
  .fonction { padding: 1.5rem 0; }
  body { font-size: 1rem; }
}
.bande.claire { background: var(--surface); }
.bande.sombre { background: var(--ardoise); color: #e8eef3; border-top: 0; }
.bande.sombre a { color: #9cc9ea; }
.bande.sombre .bouton { background: #5aa3d6; border-color: #5aa3d6; color: #0d1a24; }
.bande.sombre .bouton:hover { background: #7db8e2; border-color: #7db8e2; }
.bande.sombre .bouton.second { background: transparent; color: #cfe3f2; border-color: #5f7b93; }
.bande.sombre .bouton.second:hover { background: #26323d; }

.intro { color: var(--encre-pale); max-width: var(--mesure); font-size: 1.08rem; }
.bande.sombre .intro { color: #b5c3cf; }

/* Trois métiers du bureau, en colonnes séparées par un trait (pas de cartes). */
.colonnes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 2rem;
}
.colonnes > div { padding: 0 1.5rem; border-left: 1px solid var(--trait); }
.colonnes > div:first-child { padding-left: 0; border-left: 0; }
.colonnes ul { padding-left: 1.1rem; }
.colonnes li { margin-bottom: .35rem; }
@media (max-width: 52rem) {
  .colonnes { grid-template-columns: 1fr; gap: 1.75rem; }
  .colonnes > div { padding: 0; border-left: 0; }
}

.deux {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 52rem) { .deux { grid-template-columns: 1fr; gap: 1.5rem; } }

.regles { list-style: none; padding: 0; margin: 0; }
.regles li {
  padding: .75rem 0 .75rem 2rem;
  border-top: 1px solid var(--trait);
  position: relative;
}
.regles li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: 1.15rem;
  width: .9rem;
  height: .5rem;
  border-left: 3px solid var(--bon);
  border-bottom: 3px solid var(--bon);
  transform: rotate(-45deg);
}
.bande.sombre .regles li { border-top-color: var(--ardoise-trait); }
.bande.sombre .regles li::before { border-color: #6cc497; }

/* ─── Fonctionnalités ─── */

.page-tete { padding: 2.75rem 0 1.5rem; }
.page-tete p { color: var(--encre-pale); font-size: 1.12rem; max-width: var(--mesure); }

.sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
.sommaire a {
  display: inline-block;
  padding: .3rem .7rem;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--surface);
  color: var(--encre);
  text-decoration: none;
  font-size: .93rem;
}
.sommaire a:hover { border-color: var(--accent); }

.fonction {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1rem 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--trait);
}
.fonction h2 { font-size: 1.4rem; }
.fonction .resume { color: var(--encre-pale); font-size: .98rem; }
.fonction ul { padding-left: 1.1rem; margin: 0; max-width: 44rem; }
.fonction li { margin-bottom: .45rem; }
.fonction .note { font-size: .93rem; color: var(--encre-pale); margin: .8rem 0 0; }
@media (max-width: 52rem) { .fonction { grid-template-columns: 1fr; } }

/* ─── Tarifs ─── */

.formules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 52rem;
  margin: 1.5rem 0 2rem;
}
@media (max-width: 44rem) { .formules { grid-template-columns: 1fr; } }
.formule {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: 8px;
  padding: 1.5rem;
}
.formule.mise-en-avant { border: 2px solid var(--accent); }
.formule h2 { font-size: 1.5rem; margin-bottom: .2rem; }
.formule .prix { font-family: var(--titre); font-size: 2.6rem; font-weight: 700; line-height: 1.1; margin: .4rem 0 .1rem; }
.formule .prix small { font-family: var(--texte); font-size: 1rem; font-weight: 400; color: var(--encre-pale); }
.formule .tva { font-size: .88rem; color: var(--encre-pale); margin-bottom: 1rem; }
.formule ul { padding-left: 1.1rem; }

/* ─── Questions ─── */

.questions details {
  border-top: 1px solid var(--trait);
  padding: .2rem 0;
  max-width: 46rem;
}
.questions details:last-child { border-bottom: 1px solid var(--trait); }
.questions summary {
  cursor: pointer;
  font-weight: 600;
  padding: .85rem 2rem .85rem 0;
  list-style: none;
  position: relative;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "+";
  position: absolute;
  right: .3rem;
  top: .7rem;
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 1;
}
.questions details[open] summary::after { content: "\2212"; }
.questions details > div { padding: 0 0 1rem; color: var(--encre); max-width: var(--mesure); }

/* ─── Formulaire ─── */

.formulaire { max-width: 34rem; }
.champ { margin-bottom: 1.15rem; }
.champ label { display: block; font-weight: 600; margin-bottom: .3rem; }
.champ .aide { display: block; font-size: .9rem; color: var(--encre-pale); margin: -.15rem 0 .35rem; }
.champ input, .champ textarea {
  width: 100%;
  font: inherit;
  font-size: max(1rem, 16px);
  padding: .7rem .75rem;
  border: 1px solid #b7c2cd;
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--encre);
}
.champ input:focus, .champ textarea:focus { border-color: var(--accent); }
.facultatif { font-weight: 400; color: var(--encre-pale); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mention-form { font-size: .9rem; color: var(--encre-pale); margin-top: 1.25rem; }

/* ─── Pages de texte (légal, aide) ─── */

.texte { padding-bottom: 3rem; }
.texte h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.texte h3 { margin-top: 1.4rem; }
.texte ul, .texte ol { padding-left: 1.3rem; }
.texte li { margin-bottom: .4rem; }
.texte table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 0 0 1.2rem; }
.texte th, .texte td { border-top: 1px solid var(--trait); padding: .55rem .5rem .55rem 0; text-align: left; vertical-align: top; }
.texte th { font-weight: 600; }
.defilement { overflow-x: auto; }
/* Sur téléphone, chaque ligne d'un tableau devient une fiche : le nom de la colonne précède la valeur. */
@media (max-width: 40rem) {
  .texte table.fiches, .texte table.fiches tbody, .texte table.fiches tr, .texte table.fiches td { display: block; width: 100%; }
  .texte table.fiches thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .texte table.fiches tr { border-top: 1px solid var(--trait); padding: .7rem 0 .4rem; }
  .texte table.fiches td { border: 0; padding: .15rem 0 .45rem; }
  .texte table.fiches td::before {
    content: attr(data-titre);
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--encre-pale);
  }
  .texte table.fiches td:first-child { font-weight: 600; }
  .texte table.fiches td:first-child::before { content: none; }
}
.maj { color: var(--encre-pale); font-size: .93rem; }

.etapes { counter-reset: etape; list-style: none; padding: 0 !important; }
.etapes > li {
  counter-increment: etape;
  position: relative;
  padding: .2rem 0 .9rem 2.6rem;
}
.etapes > li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: .1rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--sur-accent);
  font-weight: 700;
  font-size: .95rem;
  display: grid;
  place-items: center;
}
.encadre {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--accent);
  border-radius: var(--rayon);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

/* ─── Pied de page ─── */

.pied-page {
  background: var(--surface);
  border-top: 1px solid var(--trait);
  padding: 2rem 0 2.5rem;
  font-size: .94rem;
  color: var(--encre-pale);
}
.pied-page .cadre { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; }
.pied-page ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.pied-page a { color: var(--encre-pale); }
.pied-page a:hover { color: var(--encre); }
.pied-page p { margin: 0; }
@media (max-width: 30rem) {
  .pied-page ul { gap: 0 1.2rem; }
  .pied-page li a { display: inline-block; padding: .45rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .entete .navigation, .acces, .pied-page ul, .boutons { display: none; }
  body { background: #fff; }
}

.suite { margin-top: 1.5rem; }
.sr-seul {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
