/* Pages « marchés publics » de pretadeposer.fr. Fichier écrit par outils/generer-pages-marches.mjs :
   le modifier là, pas ici. Palette de la vitrine ; polices servies par le site (aucun appel tiers). */
@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-grotesque.woff2') format('woff2'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('../fonts/public-sans-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --marine: #12314A; --marine-fonce: #0B1F30; --encre: #1B2733; --doux: #4A5A6A;
  --fond: #F6F8FA; --carte: #FFFFFF; --filet: #DCE3EA; --gris-th: #EEF2F6;
  --ambre: #E4720B; --ambre-fonce: #C25F07; --vert: #1FA971; --vert-fonce: #16794F;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
a { color: var(--marine); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--vert-fonce); outline-offset: 2px; border-radius: 3px; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.evitement { position: absolute; left: -9999px; top: 8px; z-index: 10; background: #fff; color: var(--marine); padding: 8px 12px; border-radius: 6px; }
.evitement:focus { left: 16px; }

/* En-tête */
.entete { background: var(--marine-fonce); color: #fff; }
.entete .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.marque .vert { color: #35C48A; }
.entete nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.entete nav a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.45); }
.entete a:focus-visible { outline-color: #7FE0B6; }

/* Corps */
main { padding-top: 22px; padding-bottom: 56px; }
.ariane ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; font-size: 14px; color: var(--doux); }
.ariane li + li::before { content: "›"; margin: 0 8px; }
.ariane [aria-current] { color: var(--encre); }
h1, h2, h3 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; color: var(--marine); letter-spacing: -.015em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(28px, 5.4vw, 42px); line-height: 1.1; margin: 0 0 14px; }
h2 { font-weight: 700; font-size: clamp(22px, 3.4vw, 27px); line-height: 1.2; margin: 44px 0 10px; }
h3 { font-weight: 700; font-size: 18px; line-height: 1.3; margin: 22px 0 6px; }
p { margin: 0 0 12px; }
.chapeau { font-size: 18px; margin: 0 0 22px; max-width: 68ch; }
.note { color: var(--doux); font-size: 15px; max-width: 70ch; }

/* Chiffres clés */
.chiffres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.chiffres li { background: var(--carte); border: 1px solid var(--filet); border-radius: 12px; padding: 14px 16px; }
.chiffres strong { display: block; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 30px; line-height: 1.1; color: var(--marine); }
.chiffres .libelle { display: block; font-size: 15px; margin-top: 4px; }
.chiffres .sous { display: block; font-size: 14px; color: var(--doux); margin-top: 2px; }

/* Consultations ouvertes */
.liste-ouverts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste-ouverts li { background: var(--carte); border: 1px solid var(--filet); border-left: 4px solid var(--marine); border-radius: 10px; padding: 12px 14px; overflow-wrap: anywhere; }
.liste-ouverts a { font-weight: 600; }
.liste-ouverts .meta { display: block; font-size: 14.5px; color: var(--doux); margin-top: 4px; }
.liste-ouverts li.clos { border-left-color: var(--filet); }
.liste-ouverts .etat { font-weight: 600; color: var(--encre); }
.vide { background: var(--carte); border: 1px dashed #B9C5D0; border-radius: 10px; padding: 14px 16px; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; background: var(--carte); border: 1px solid var(--filet); font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--filet); }
thead th { background: var(--gris-th); color: var(--marine); font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
.nombre { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acheteurs td:first-child { overflow-wrap: anywhere; }

/* Appel à l'action : ambre réservé au bouton plein, texte blanc en 19 px gras (grand texte, AA). */
.cta { background: var(--marine); color: #fff; border-radius: 14px; padding: 24px 20px; margin-top: 44px; }
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: rgba(255,255,255,.9); max-width: 64ch; margin-bottom: 18px; }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.bouton { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 19px; line-height: 1.25; text-decoration: none; }
.bouton-action { background: var(--ambre); color: #fff; }
.bouton-action:hover { background: var(--ambre-fonce); }
.bouton-second { color: #fff; border: 2px solid rgba(255,255,255,.75); }
.bouton-second:hover { background: rgba(255,255,255,.1); }
.cta a:focus-visible { outline-color: #7FE0B6; }

/* Encadré, FAQ, pages voisines, méthode */
.encadre { background: var(--carte); border: 1px solid var(--filet); border-radius: 12px; padding: 4px 20px 16px; margin-top: 44px; }
.encadre h2 { margin-top: 18px; }
.bon-a-savoir { border-left: 4px solid var(--vert); }
.bon-a-savoir ul { margin: 0; padding-left: 20px; }
.bon-a-savoir li + li { margin-top: 10px; }
.faq h3 { margin-top: 22px; }
.voisines { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.voisines ul { list-style: none; padding: 0; margin: 0; }
.voisines li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--filet); }
.voisines .nb { color: var(--doux); white-space: nowrap; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.methode p { color: var(--doux); font-size: 15px; max-width: 72ch; }

/* Page d'entrée : tableau métier × département */
.matrice .code { font-weight: 400; color: var(--doux); white-space: nowrap; }
.matrice thead .code { display: block; }
.matrice tbody th, .matrice td { vertical-align: middle; }
.index-liens li { border-bottom: none; padding: 3px 0; font-size: 15px; }
.matrice thead th { vertical-align: bottom; font-size: 14px; text-align: right; }
.matrice thead th:first-child { text-align: left; }
.matrice tbody th { white-space: nowrap; color: var(--marine); font-weight: 700; }
.matrice td { text-align: right; font-variant-numeric: tabular-nums; }
.matrice td a { display: inline-block; min-width: 44px; padding: 4px 0; font-weight: 700; font-size: 17px; }
.matrice .date { display: block; font-size: 12.5px; color: var(--doux); }

/* Pied */
.pied { border-top: 1px solid var(--filet); background: var(--carte); padding: 28px 0 32px; font-size: 15px; }
.pied p { color: var(--doux); max-width: 76ch; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0 12px; }

@media (max-width: 640px) {
  .chapeau { font-size: 17px; }
  .cta { padding: 20px 16px; }
  .bouton { width: 100%; }
  .encadre { padding: 2px 16px 14px; }
  table { font-size: 14.5px; }
  th, td { padding: 8px 10px; }
  /* Le tableau 6 × 6 devient une carte par métier. */
  .matrice, .matrice tbody, .matrice tr, .matrice td, .matrice tbody th { display: block; }
  .matrice { border: none; background: transparent; }
  .matrice thead tr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .matrice tbody tr { background: var(--carte); border: 1px solid var(--filet); border-radius: 10px; margin-bottom: 12px; }
  .matrice tbody th { background: var(--gris-th); border-radius: 10px 10px 0 0; }
  .matrice td { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; padding: 6px 10px; }
  .matrice td::before { content: attr(data-dep); }
  .matrice td a { text-align: right; }
  .matrice .date { display: inline; margin-left: 6px; }
  .matrice tbody tr td:last-child { border-bottom: none; }
}
