/* App AdWatch : écran clair pour l'atelier et le téléphone, bon d'atelier pensé pour l'impression (format Lettre). */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/Poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/Poppins-500.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/Poppins-600.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/Poppins-700.woff2) format("woff2"); }
:root {
  color-scheme: light dark;
  --fond: #f6f6f7; --carte: #fff; --encre: #1a1a1a; --doux: #63676c; --trait: #e1e3e5; --trait-fort: #c9cdd1;
  --accent: #85663a; --bouton: #121212; --bouton-texte: #fff;
  --ok: #0f6b37; --ok-fond: #e7f4ec; --alerte: #b03427; --alerte-fond: #fbeceb; --attention: #8f4408; --attention-fond: #fef3c7;
  --rayon: 12px; --ombre: 0 1px 2px rgba(22, 32, 43, .06), 0 8px 24px rgba(22, 32, 43, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0e0f13; --carte: #17191f; --encre: #e9eaec; --doux: #9aa1ab; --trait: #272b33; --trait-fort: #3a3f49;
    --accent: #d9c3a0; --bouton: #d9c3a0; --bouton-texte: #121212;
    --ok: #5fdc93; --ok-fond: #14301f; --alerte: #ff8d84; --alerte-fond: #3a1b1a; --attention: #fbbf24; --attention-fond: #33270d;
    --ombre: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 15px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .6rem; }
h3 { font-size: .9rem; font-weight: 600; margin: 1.2rem 0 .3rem; }
address { font-style: normal; }
.discret { color: var(--doux); font-size: .87rem; }
.droite { text-align: right; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 5; display: flex; gap: .5rem 1.2rem; align-items: center; justify-content: space-between; padding: .7rem max(1rem, calc((100% - 1160px) / 2)); background: var(--carte); border-bottom: 1px solid var(--trait); }
.marque { font-weight: 700; letter-spacing: .14em; color: inherit; text-decoration: none; margin: 0; }
.marque span { font-weight: 400; letter-spacing: 0; color: var(--doux); margin-left: .3rem; }
.entete nav { display: flex; gap: 1.1rem; align-items: center; font-size: .92rem; }
.entete nav a, .entete .lien { color: var(--encre); text-decoration: none; padding: .4rem 0; }
.entete form { margin: 0; }
.page { max-width: 1192px; margin: 0 auto; padding: 1.4rem 1rem 3rem; }
.titre-ligne { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.titre-ligne p { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actualiser { display: flex; gap: .8rem; align-items: center; }
.retour { margin: 0 0 .8rem; }

/* Boutons et champs (44 px au moins : faciles à toucher) */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--bouton); border-radius: 10px; background: var(--bouton); color: var(--bouton-texte); font: inherit; font-weight: 600; line-height: 1.25; padding: .5rem 1.1rem; cursor: pointer; text-decoration: none; text-align: center; }
.bouton:hover { opacity: .88; }
.bouton:disabled { opacity: .5; cursor: default; }
.bouton.discret { background: var(--carte); color: var(--encre); border-color: var(--trait-fort); font-weight: 500; font-size: .92rem; }
.bouton.large { display: flex; }
.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .9rem 0 .25rem; }
input:not([type=file], [type=hidden]), select, textarea { width: 100%; min-height: 44px; font: inherit; font-size: 16px; padding: .5rem .7rem; border: 1px solid var(--trait-fort); border-radius: 10px; background: var(--carte); color: var(--encre); }
input[type=file] { width: 100%; font: inherit; font-size: .88rem; }
textarea { resize: vertical; }
.aide { margin: .3rem 0; font-size: .88rem; color: var(--doux); }
summary { cursor: pointer; padding: .4rem 0; }

/* Messages */
.message { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 10px; background: var(--ok-fond); color: var(--ok); }
.message.erreur, .message.retard { background: var(--alerte-fond); color: var(--alerte); }
.message.attention { background: var(--attention-fond); color: var(--attention); overflow-wrap: anywhere; }
.vide { padding: 2.5rem 1rem; text-align: center; color: var(--doux); background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); }

/* Pastilles */
.pastille { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: var(--fond); color: var(--encre); box-shadow: inset 0 0 0 1px var(--trait); }
.pastille.perso { background: var(--encre); color: var(--carte); }
.pastille.retard, .woo-cancelled, .woo-refunded, .woo-failed { background: var(--alerte-fond); color: var(--alerte); box-shadow: none; }
.pastille.proche, .woo-on-hold, .woo-pending { background: var(--attention-fond); color: var(--attention); box-shadow: none; }
.woo-payee { background: var(--ok-fond); color: var(--ok); box-shadow: none; }

/* Accueil */
.filtres { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.onglets { display: flex; gap: .4rem; overflow-x: auto; max-width: 100%; }
.onglets a { display: inline-flex; gap: .35rem; align-items: center; min-height: 44px; padding: 0 .9rem; border-radius: 10px; color: var(--doux); text-decoration: none; white-space: nowrap; font-weight: 500; }
.onglets a[aria-current] { background: var(--carte); color: var(--encre); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.compte { font-size: .85em; }
.recherche { display: flex; gap: .4rem; flex: 1 1 260px; max-width: 380px; }
.commande { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 400px); gap: .6rem 1.2rem; align-items: center; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); padding: .9rem 1rem; margin-bottom: .8rem; }
.commande.en-retard { border-color: var(--alerte); }
.commande h2 { margin: 0; }
.commande h2 a { color: inherit; text-decoration: none; }
.commande .infos p { margin: .15rem 0 0; }
.commande .infos .discret { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; margin-top: .4rem; }
.vignette { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f6f6f7; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.suite { display: grid; gap: .7rem; justify-items: stretch; }
.suite > .pastille { justify-self: start; }
.pages { display: flex; gap: .6rem; justify-content: center; margin-top: 1rem; }
.pied-outil { margin-top: 1.5rem; font-size: .9rem; }

/* Étapes */
.frise { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0; padding: 0; font-size: .74rem; line-height: 1.25; color: var(--doux); }
.frise li { border-top: 4px solid var(--trait); padding-top: .35rem; }
.frise .faite { border-color: var(--accent); }
.frise .actuelle { color: var(--encre); font-weight: 600; }
.frise small { display: block; font-size: 1em; font-weight: 400; color: var(--doux); }
.avancement .frise { font-size: .9rem; gap: 8px; }
.avancement .actions { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; margin-top: 1.1rem; }
.avancement .lien { font-size: .88rem; padding: .5rem 0; }
.confirmer { max-width: 480px; margin: 4vh auto 0; }
.confirmer > .message { margin: 1.1rem 0 0; }
.confirmer .bouton { width: 100%; margin-top: .7rem; }
.confirmer > p { margin: .4rem 0; }

/* Connexion */
.connexion { max-width: 360px; margin: 12vh auto 0; }
.connexion .marque { margin-bottom: 1.2rem; }
.connexion .bouton { width: 100%; margin-top: 1.2rem; }

/* Fiche commande */
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 1rem; align-items: start; }
.article { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.2rem; }
.article.est-perso { grid-template-columns: 280px minmax(0, 1fr); }
.article .visuel img { width: 100%; height: auto; display: block; border-radius: 8px; background: var(--fond); }
.article:not(:has(.visuel)) { grid-template-columns: 1fr; }
.options { width: 100%; border-collapse: collapse; margin: .6rem 0; }
.options th { text-align: left; font-weight: 400; color: var(--doux); padding: .32rem .8rem .32rem 0; width: 42%; vertical-align: top; }
.options td { padding: .32rem 0; font-weight: 600; }
.options tr + tr th, .options tr + tr td { border-top: 1px solid var(--trait); }
.options tr.gravure td, .options tr.gravure th { background: var(--attention-fond); padding-left: .5rem; }
.autres, .historique { margin: 0; padding: 0; list-style: none; }
.autres li, .historique li { padding: .4rem 0; border-top: 1px solid var(--trait); }
.autres li:first-child, .historique li:first-child { border-top: 0; }
.totaux { border-collapse: collapse; margin-left: auto; width: min(100%, 320px); }
.totaux th { text-align: left; font-weight: 400; padding: .2rem 1rem .2rem 0; }
.totaux td { text-align: right; padding: .2rem 0; white-space: nowrap; }
.totaux .total th, .totaux .total td { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--trait); padding-top: .5rem; }
.carte form .bouton { margin-top: 1.1rem; width: 100%; }
.carte form + form { margin-top: .6rem; }
.note-client { background: var(--attention-fond); padding: .6rem .8rem; border-radius: 8px; margin: 0; }

@media (max-width: 900px) {
  .fiche { grid-template-columns: 1fr; }
  .commande { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
  .commande .suite { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .article, .article.est-perso { grid-template-columns: 1fr; }
  .article .visuel { max-width: 260px; }
  .entete nav { gap: .9rem; font-size: .85rem; }
  .entete nav a[href$="/"], .marque span { display: none; }
  .avancement .frise { font-size: .78rem; }
  .avancement .actions .bouton { width: 100%; }
  .recherche { max-width: none; }
  .titre-ligne:has(.actualiser) { flex-wrap: nowrap; }
  .actualiser span { display: none; }
}

/* ---------- Bon d'atelier ---------- */
body.bons { --encre: #1a1a1a; --doux: #555; --bouton: #fff; --bouton-texte: #121212; color-scheme: light; background: #d9d6cf; color: #000; }
.bon-barre { position: sticky; top: 0; z-index: 2; display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .6rem 1.25rem; background: var(--encre); color: #fff; }
.bon-barre a { color: #fff; }
.bon { width: 8.5in; min-height: 11in; margin: 1.2rem auto; padding: .55in .6in; background: #fff; color: #000; display: flex; flex-direction: column; gap: .22in; font-size: 11.5pt; line-height: 1.4; }
.bon h1 { font-size: 19pt; }
.bon h2 { font-size: 9pt; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .08in; color: #444; }
.bon p { margin: 0 0 .04in; }
.bon-tete { display: flex; justify-content: space-between; gap: .3in; padding-bottom: .15in; border-bottom: 2.5pt solid #000; }
.bon-numero { font-size: 22pt; font-weight: 800; line-height: 1.1; margin-top: .05in !important; }
.bon-meta { text-align: right; font-size: 10.5pt; }
.bon-alerte { border: 1.5pt solid #000; padding: 1pt 5pt; }
.bon-montre { display: grid; grid-template-columns: 2.9in 1fr; gap: .3in; align-items: start; }
.bon-montre:not(:has(.bon-image)) { grid-template-columns: 1fr; }
.bon-image { width: 100%; height: auto; border: .75pt solid #bbb; border-radius: 6pt; }
.bon-type { color: #444; font-size: 10pt; margin: .03in 0 .1in !important; }
.bon-quantite { border: 1.5pt solid #000; padding: 0 6pt; border-radius: 4pt; }
.bon-table { width: 100%; border-collapse: collapse; }
.bon-table th { text-align: left; font-weight: 400; color: #333; width: 38%; }
.bon-table th, .bon-table td { padding: 3.6pt 4pt; border-bottom: .75pt solid #bbb; }
.bon-table td:last-child { font-weight: 700; }
.bon-table td.case { width: 20pt; padding-left: 0; }
.case > span { display: inline-block; width: 11pt; height: 11pt; border: 1.2pt solid #000; border-radius: 2pt; vertical-align: -1.5pt; }
.bon-gravure { border: 2pt solid #000; border-radius: 6pt; padding: .12in .18in; }
.bon-gravure.sans { border: .75pt dashed #777; }
.texte-gravure { font-size: 22pt; font-weight: 700; line-height: 1.2; margin: .02in 0 .06in !important; overflow-wrap: anywhere; }
.bon-bloc ul { margin: 0; padding: 0; list-style: none; }
.bon-bloc li { padding: 2pt 0; }
.bon-deux { display: grid; grid-template-columns: 1fr 1fr; gap: .3in; }
.bon-lignes { height: .7in; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(.35in - .75pt), #999 calc(.35in - .75pt), #999 .35in); }
.bon-pied { margin-top: auto; padding-top: .12in; border-top: .75pt solid #000; font-size: 10.5pt; }
.bon-pied p { margin-bottom: .09in; }

@page { size: letter; margin: 0; }
@media print {
  body, body.bons { background: #fff; }
  .entete, .bon-barre, .vide { display: none !important; }
  .bon { margin: 0; width: auto; min-height: 0; height: 11in; break-after: page; overflow: hidden; }
  .bon:last-of-type { break-after: auto; }
  .bon-image, .bon-gravure, .case > span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* « Tout relire sur le site » en haut à droite (5/12/2026) */
.entete .bouton.relire { min-height: 0; padding: .45rem .8rem; font-size: .85rem; }
@media (max-width: 640px) { .entete .bouton.relire { padding: .4rem .6rem; font-size: .78rem; } }
