/* Espace client Autoflow. Même charte que autoflowia.com : joints clairs, bleu canard, surligneur jaune. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-wdth.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; }
@font-face { font-family: "Caveat"; src: url("/fonts/caveat-latin-600.woff2") format("woff2"); font-weight: 600; }
:root {
  --grout: #F2F5F4; --paper: #FFFFFF; --tile: #0C3A45; --mosaic: #176B79; --mint: #DCEAE8;
  --ink: #0F2229; --muted: #4B6168; --line: #C8D5D6; --marker: #F5C431; --pen: #B23A27;
  --nav: 4.3rem; --demo: 3.1rem;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grout); color: var(--ink); font: 400 1.0625rem/1.5 "Archivo", system-ui, sans-serif; }
img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--mosaic); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--mosaic); outline-offset: 2px; border-radius: 4px; }
h1:focus { outline: none; }
h1, h2, h3 { color: var(--tile); margin: 0; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.7vw, 2.5rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 750; font-stretch: 106%; }
h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.petit { font-size: 0.9rem; }
.doux { color: var(--muted); }

/* Bandeau de maquette */
.demo { position: sticky; top: 0; z-index: 30; min-height: var(--demo); display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 1rem; background: var(--marker); font-size: 0.84rem; line-height: 1.25; font-weight: 600; }
.demo-choix { display: flex; flex: none; border: 2px solid var(--tile); border-radius: 6px; overflow: hidden; }
.demo-choix button { border: 0; background: transparent; padding: 0.45rem 0.6rem; min-height: 2.2rem; font-weight: 700; }
.demo-choix button[aria-pressed="true"] { background: var(--tile); color: #fff; }
.demo-choix button:focus-visible { outline-offset: -4px; }
.demo-choix button[aria-pressed="true"]:focus-visible { outline-color: var(--marker); }
.ex { display: inline-block; padding: 0 0.4em; border: 1px dashed var(--muted); border-radius: 3px; font-size: 0.8rem; font-weight: 600; line-height: 1.5; color: var(--muted); background: var(--paper); white-space: nowrap; vertical-align: 0.06em; }

/* Cadre */
.entete { background: var(--tile); color: #fff; }
.entete .dedans { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; max-width: 1180px; margin: auto; }
.entete img { width: 46px; height: 27px; }
.entete strong { font-weight: 800; font-stretch: 116%; font-size: 1.1rem; }
.entete .qui { margin-left: auto; text-align: right; font-size: 0.9rem; line-height: 1.25; color: var(--mint); }
main { padding: 1.5rem 1rem calc(var(--nav) + 2.5rem); max-width: 46rem; margin: auto; }
.tete { margin-bottom: 1.4rem; display: grid; gap: 0.5rem; }
.tete p { max-width: 58ch; }
.bloc { margin-top: 2.2rem; }
.bloc > h2 { margin-bottom: 0.7rem; }

/* Navigation : en bas sur téléphone, à gauche sur ordinateur */
.nav { position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav ul { display: grid; grid-template-columns: repeat(5, 1fr); }
.nav a, .nav summary { position: relative; display: grid; justify-items: center; align-content: center; gap: 0.15rem; min-height: var(--nav); color: var(--muted); font-size: 0.78rem; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav a[aria-current="page"], .nav .actif > summary { color: var(--tile); box-shadow: inset 0 4px 0 var(--marker); }
.nav .nb { position: absolute; top: 0.45rem; left: calc(50% + 0.5rem); min-width: 1.25rem; padding: 0 0.3rem; border-radius: 99px; background: var(--tile); color: #fff; font-size: 0.74rem; line-height: 1.25rem; text-align: center; }
.plus-menu { position: absolute; right: 0.6rem; bottom: calc(var(--nav) + 0.5rem); width: 15rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px -10px rgba(12, 58, 69, 0.45); overflow: hidden; }
.nav .plus-menu a { justify-items: start; padding: 0 1rem; min-height: 3.2rem; font-size: 1rem; color: var(--ink); }
.plus-menu a + a { border-top: 1px solid var(--line); }
.large { display: none; }
@media (min-width: 900px) {
  .cadre { display: grid; grid-template-columns: 15rem minmax(0, 1fr); max-width: 1180px; margin: auto; }
  .nav { position: sticky; inset: auto; top: var(--demo); align-self: start; height: calc(100vh - var(--demo)); background: transparent; border: 0; border-right: 1px solid var(--line); padding: 1.5rem 1rem 0 0; }
  .nav ul { grid-template-columns: 1fr; gap: 0.2rem; padding-left: 1rem; }
  .nav a { display: flex; align-items: center; gap: 0.7rem; min-height: 2.9rem; padding: 0 0.7rem; font-size: 1rem; border-radius: 6px; }
  .nav a:hover { background: var(--mint); color: var(--tile); }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--marker); background: var(--paper); }
  .nav .nb { position: static; margin-left: auto; }
  .etroit { display: none; }
  .large { display: block; }
  main { padding: 2.2rem 2.5rem 4rem; margin: 0; width: 100%; }
  main.ample { max-width: none; }
}

/* Boutons et champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0.6rem 1.2rem; border: 2px solid var(--tile); border-radius: 6px; background: transparent; color: var(--tile); font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center; }
.btn:hover { background: var(--mint); }
.btn.principal { background: var(--marker); border-color: var(--marker); color: var(--ink); }
.btn.principal:hover { background: #E8B51F; border-color: #E8B51F; }
.btn[disabled] { background: var(--grout); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.lien { border: 0; background: none; padding: 0.6rem 0; min-height: 2.75rem; color: var(--mosaic); font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.champ { display: grid; gap: 0.35rem; }
.champ > label, legend { font-weight: 700; color: var(--tile); padding: 0; }
.champ input, .champ textarea { width: 100%; min-height: 3rem; padding: 0.65rem 0.8rem; border: 1.5px solid #6C8288; border-radius: 6px; background: var(--paper); }
.champ textarea { min-height: 6.5rem; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { margin-bottom: 0.5rem; }
.puces { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.puces label { position: relative; }
.puces input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.puces span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.35rem 0.9rem; border: 1.5px solid #6C8288; border-radius: 99px; background: var(--paper); font-weight: 600; }
.puces input:checked + span { background: var(--tile); border-color: var(--tile); color: #fff; }
.puces input:focus-visible + span { outline: 3px solid var(--mosaic); outline-offset: 2px; }
.erreur { color: var(--pen); font-weight: 600; }
.erreur:empty { display: none; }
.forme { display: grid; gap: 1.3rem; }

/* Connexion */
.porte { min-height: calc(100vh - var(--demo)); max-width: none; display: grid; background: var(--tile); padding: 2rem 1rem; place-items: center; }
.porte-carte { width: min(25rem, 100%); background: var(--paper); border-radius: 12px; padding: 1.8rem 1.4rem; display: grid; gap: 1.3rem; }
.porte-carte .marque { display: flex; align-items: center; gap: 0.6rem; color: var(--tile); font-weight: 800; font-stretch: 116%; font-size: 1.25rem; }
.porte-carte h1 { font-size: 1.7rem; }
.porte-carte .btn { width: 100%; }
.champ .code { font-size: 1.6rem; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }

/* À faire */
.liste { border-top: 1px solid var(--line); }
.liste > li { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: 0.2rem 0.8rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.case { width: 1.8rem; height: 1.8rem; border: 2px solid var(--tile); border-radius: 5px; background: var(--paper); }
.case svg { width: 2.3rem; height: 2.3rem; margin: -0.6rem 0 0 -0.15rem; overflow: visible; }
.case path, .coche path { fill: none; stroke: var(--marker); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.case.faite { background: var(--tile); }
.liste .corps { display: grid; gap: 0.45rem; justify-items: start; }
.liste .actions { margin-top: 0.35rem; }
.premier { background: var(--paper); border: 2px solid var(--tile); border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); }
.premier img { width: 100%; height: 100%; object-fit: cover; }
.premier .corps { padding: 1.1rem 1rem; display: grid; gap: 0.5rem; align-content: center; justify-items: start; }
.premier .btn { margin-top: 0.3rem; }
@media (max-width: 420px) { .premier { grid-template-columns: 5.6rem minmax(0, 1fr); } }
.faits li { display: flex; gap: 0.7rem; padding: 0.45rem 0; color: var(--muted); }
.coche { flex: none; width: 1.5rem; height: 1.5rem; }
.coche path { stroke: var(--mosaic); stroke-width: 3.5; }

/* À valider */
.regles { background: var(--mint); border-radius: 8px; padding: 0.9rem 1.1rem; display: grid; gap: 0.3rem; }
.regles li { padding-left: 1.1rem; position: relative; }
.regles li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 0.5rem; height: 0.18rem; background: var(--tile); }
.barre { height: 0.7rem; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; display: flex; }
.barre i { display: block; background: var(--mosaic); }
.barre i.mod { background: var(--marker); }
.barre i.non { background: var(--pen); }
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 0.9rem; }
@media (min-width: 620px) { .grille { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vignette { color: inherit; text-decoration: none; display: grid; gap: 0.4rem; align-content: start; }
.vignette .photo { position: relative; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--tile); }
.vignette .photo > img { width: 100%; height: 100%; object-fit: cover; }
.vignette:hover h3 { text-decoration: underline; }
.vignette h3 { font-size: 1rem; line-height: 1.25; }
.etat { font-weight: 700; font-size: 0.9rem; color: var(--ink); display: flex; gap: 0.4rem; align-items: center; }
.etat::before { content: ""; flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--tile); }
.etat.valide::before { background: var(--mosaic); border-color: var(--mosaic); }
.etat.modif::before { background: var(--marker); }
.etat.refus { color: var(--pen); }
.etat.refus::before { background: var(--pen); border-color: var(--pen); }
.vignette .feuille { display: block; height: 100%; padding: 1rem 0.9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 0.86rem; white-space: pre-line; overflow: hidden; }
.envoi > h2 { margin-bottom: 0.2rem; }
.envoi > .doux { margin-bottom: 0.9rem; }
.lecture { position: absolute; inset: auto auto 0.5rem 0.5rem; background: var(--tile); color: #fff; border-radius: 4px; padding: 0.1rem 0.5rem; font-size: 0.82rem; font-weight: 600; }

/* Une publication */
.pourquoi { margin-bottom: 1.2rem; }
.apercu .compte small { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.apercu .compte { line-height: 1.2; }
.texte-bloc { position: relative; }
.premier.sans { grid-template-columns: 1fr; }
.retour { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.fiche { display: grid; gap: 1.4rem; }
.cote { display: grid; gap: 1.4rem; }
.apercu { background: var(--paper); border: 1px solid var(--line); margin-inline: -1rem; border-inline-width: 0; }
.apercu .compte { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; font-weight: 700; }
.apercu .rond { width: 2rem; height: 2rem; border-radius: 50%; background: var(--mint); color: var(--tile); display: grid; place-items: center; font-size: 0.85rem; }
.media { position: relative; overflow: hidden; background: #10262D; }
.media > img, .media > video { width: 100%; }
.media.haut > img, .media.haut > video { max-height: 34rem; object-fit: contain; }
.sauts { position: sticky; top: var(--demo); z-index: 15; display: flex; gap: 0.4rem; margin: 0 -1rem 1rem; padding: 0.5rem 1rem; background: var(--grout); border-bottom: 1px solid var(--line); }
.sauts button { flex: 1 1 auto; min-height: 2.75rem; padding: 0.3rem 0.5rem; border: 1.5px solid var(--tile); border-radius: 6px; background: var(--paper); color: var(--tile); font-size: 0.9rem; font-weight: 700; line-height: 1.15; }
#b-visuel, #b-texte, #b-google { scroll-margin-top: calc(var(--demo) + 4.5rem); }
#b-visuel:focus, #b-texte:focus, #b-google:focus { outline: none; }
.texte-bloc { background: var(--paper); border: 2px solid var(--tile); border-radius: 10px; padding: 1rem; }
.texte-pub { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); white-space: pre-line; overflow-wrap: anywhere; }
.raisons { display: grid; gap: 0.1rem; }
.raisons label { display: flex; align-items: center; gap: 0.7rem; min-height: 2.75rem; cursor: pointer; }
.raisons input { width: 1.4rem; height: 1.4rem; flex: none; margin: 0; accent-color: var(--tile); }
.tampon { position: absolute; right: 0.9rem; top: 0.7rem; padding: 0.1rem 0.9rem 0.3rem; background: var(--marker); color: var(--tile); font: 600 1.9rem/1.1 "Caveat", cursive; transform: rotate(-5deg); border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .tampon.neuf { animation: pose 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
  @keyframes pose { from { opacity: 0; transform: rotate(-12deg) scale(1.7); } }
}
.google { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.google h2, .google p { padding: 0.9rem 1rem; }
.google img { width: 100%; max-height: 17rem; object-fit: cover; }
.date-pub { display: grid; gap: 0.15rem; justify-items: start; }
.date-pub strong { font-size: 1.15rem; color: var(--tile); font-stretch: 106%; }
.question { border-left: 5px solid var(--marker); background: var(--paper); padding: 0.9rem 1rem; display: grid; gap: 0.6rem; }
.question label { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 600; }
.question input[type="checkbox"] { width: 1.5rem; height: 1.5rem; flex: none; margin: 0; accent-color: var(--tile); }
.decision { position: fixed; inset: auto 0 0 0; z-index: 25; background: var(--paper); border-top: 1px solid var(--line); padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.decision .tout { grid-column: 1 / -1; }
.decision .forme { grid-column: 1 / -1; max-height: 70vh; overflow: auto; padding: 0.2rem; gap: 0.9rem; }
.decision .info { grid-column: 1 / -1; overflow-wrap: anywhere; }
.decision .lien { padding: 0; }
@media (min-width: 900px) {
  .fiche { grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
  .apercu { margin: 0; border-inline-width: 1px; border-radius: 10px; overflow: hidden; position: sticky; top: calc(var(--demo) + 1rem); }
  .sauts { display: none; }
  .fiche.sans { grid-template-columns: minmax(0, 40rem); }
  .pourquoi { max-width: 46rem; }
  .decision { position: static; border: 0; background: none; padding: 0; order: -1; }
  .decision .forme { max-height: none; }
}
@media (max-width: 899px) {
  .avec-decision main { padding-bottom: 15rem; }
  .avec-decision .nav { display: none; }
}

/* Envoyer */
.depot { position: relative; border: 2px dashed var(--mosaic); border-radius: 12px; background: var(--paper); padding: 1.6rem 1rem; text-align: center; display: grid; gap: 0.4rem; justify-items: center; }
.depot input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.depot:focus-within { outline: 3px solid var(--mosaic); outline-offset: 2px; }
.choisis { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choisis li { background: var(--mint); border-radius: 4px; padding: 0.25rem 0.6rem; overflow-wrap: anywhere; font-size: 0.92rem; }

/* Listes */
.rangs { border-top: 1px solid var(--line); }
.rangs > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.3rem 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.rangs .gauche { flex: 1 1 14rem; display: grid; gap: 0.15rem; overflow-wrap: anywhere; }
details.etape { border-bottom: 1px solid var(--line); }
details.etape > summary { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; justify-content: space-between; align-items: center; padding: 1rem 0; min-height: 3.4rem; cursor: pointer; }
details.etape > summary h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.etape ol { counter-reset: e; display: grid; gap: 0.7rem; padding-bottom: 1.3rem; }
.etape ol li { counter-increment: e; display: grid; grid-template-columns: 1.8rem 1fr; gap: 0.6rem; }
.etape ol li::before { content: counter(e); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--tile); color: #fff; font-weight: 700; font-size: 0.92rem; display: grid; place-items: center; }
.etape .note { padding-bottom: 1.3rem; }
.capture { border: 1px dashed var(--muted); border-radius: 8px; padding: 1.4rem 1rem; text-align: center; color: var(--muted); margin-bottom: 1.2rem; background: var(--paper); }
.jours > li { display: grid; grid-template-columns: 3.4rem 3.2rem minmax(0, 1fr); gap: 0.9rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.jours .jour { line-height: 1.15; color: var(--muted); font-size: 0.9rem; }
.jours .jour b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--tile); font-variant-numeric: tabular-nums; }
.jours img { width: 3.2rem; height: 4rem; object-fit: cover; border-radius: 4px; }
.rdv { border-left: 5px solid var(--mosaic); background: var(--paper); padding: 1rem; display: grid; gap: 0.5rem; justify-items: start; }

/* Côté Michael */
.composer { background: var(--paper); border: 2px solid var(--tile); border-radius: 12px; padding: 1.2rem 1rem; margin-top: 0.8rem; }
.composer .raisons small { display: block; color: var(--muted); font-size: 0.88rem; }
.courrier { scroll-margin-top: calc(var(--demo) + 1rem); display: grid; gap: 0.8rem; }
.courrier:focus { outline: none; }
.lettre { max-width: 38rem; background: var(--paper); border: 1px dashed var(--muted); border-radius: 8px; }
.lettre dl { margin: 0; padding: 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.9rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.lettre dt { color: var(--muted); }
.lettre dd { margin: 0; }
.lettre-corps { padding: 1rem; display: grid; gap: 0.9rem; }
.lettre-corps li { padding-left: 1rem; position: relative; }
.lettre-corps li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.45rem; height: 0.15rem; background: var(--tile); }
.clients .lien { display: block; padding: 0.3rem 0; }
.michael main { max-width: 1180px; padding-bottom: 3rem; margin: auto; }
.filtres { margin: 1rem 0; }
.clients { width: 100%; border-collapse: collapse; background: var(--paper); }
.clients th, .clients td { text-align: left; padding: 0.9rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.clients thead th { font-size: 0.9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--tile); }
.clients .n { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; }
.clients .zero { color: var(--muted); font-weight: 400; }
.clients .rouge { color: var(--pen); }
.clients tbody th { font-weight: 700; color: var(--tile); min-width: 11rem; }
.clients tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; }
@media (max-width: 760px) {
  .clients thead { position: absolute; left: -9999px; }
  .clients, .clients tbody { display: block; background: none; }
  .clients tr { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.9rem; padding: 0.9rem; gap: 0.7rem 0.4rem; }
  .clients td, .clients tbody th { border: 0; padding: 0; }
  .clients tbody th, .clients td.ligne { grid-column: 1 / -1; }
  .clients td::before { content: attr(data-t); display: block; font-size: 0.8rem; color: var(--muted); font-weight: 400; line-height: 1.2; }
  .clients td.ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
}
.annonce { position: fixed; left: 50%; bottom: calc(var(--nav) + 1rem); transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100% - 2rem); background: var(--tile); color: #fff; border-radius: 8px; padding: 0.7rem 1.1rem; font-weight: 600; pointer-events: none; }
.annonce:empty { display: none; }
@media (max-width: 899px) { .avec-decision .annonce { bottom: auto; top: 4rem; } }
