/* MDSSUP — Veille « Actualités, événements et opportunités » (veille.html) + section admin #veille-admin.
   Variables de style.css ; mobile d'abord ; focus visible ; mouvements réduits respectés. */

.vl-page { max-width: 1180px; margin: 0 auto; padding: 32px 16px 64px; }
.vl-entete { margin-bottom: 24px; }
.vl-entete h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); margin: .2rem 0 .8rem; line-height: 1.2; }
.vl-intro { color: var(--text-muted); max-width: 820px; line-height: 1.6; margin: 0 0 1rem; }
.vl-avertissement { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 4px solid var(--neon-cyan); border-radius: var(--radius); padding: 12px 14px; max-width: 900px; line-height: 1.55; margin: 0 0 .8rem; }
.vl-avertissement svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--neon-cyan); margin-top: 2px; }
.vl-maj { color: var(--text-muted); font-size: .9rem; margin: 0 0 .4rem; }
.vl-lien-hub a { color: var(--neon-cyan); font-weight: 600; }

/* Filtres */
.vl-filtres { display: grid; grid-template-columns: 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.vl-champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vl-champ label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.vl-champ input[type="search"], .vl-champ select, .vl-adm input[type="text"], .vl-adm input[type="url"], .vl-adm input[type="number"],
.vl-adm input[type="date"], .vl-adm input[type="search"], .vl-adm select, .vl-adm textarea {
  width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font: inherit; min-height: 44px; }
.vl-adm textarea { min-height: 90px; resize: vertical; }
/* Safari/WebKit ignore le fond d'un <select> natif (fond clair + texte clair = illisible, constaté le 23/11) :
   apparence neutralisée et flèche dessinée. */
.vl-champ select, .vl-adm select {
  -webkit-appearance: none; appearance: none; background-color: var(--bg); padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2300ffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; text-overflow: ellipsis; }
.vl-champ select option, .vl-adm select option { background-color: var(--bg); color: var(--text); }
.vl-champ--case { flex-direction: row; align-items: center; gap: 8px; }
.vl-champ--case input { width: 20px; height: 20px; accent-color: var(--neon-cyan); }
.vl-champ--case label { font-size: .95rem; color: var(--text); font-weight: 400; }
.vl-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
@media (min-width: 640px) { .vl-filtres { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vl-champ--q { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .vl-filtres { grid-template-columns: repeat(4, minmax(0, 1fr)); } .vl-champ--q { grid-column: span 2; } }

:where(.vl-page, .vl-adm) :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--neon-cyan); outline-offset: 2px; }

/* États */
.vl-compte { color: var(--text-muted); margin: 0 0 12px; min-height: 1.4em; }
.vl-etat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px; border: 1px dashed var(--border);
  border-radius: var(--radius); color: var(--text-muted); margin: 0 0 16px; }
.vl-etat[hidden] { display: none; }
.vl-etat p { margin: 0; }
.vl-etat--erreur { border-color: var(--error); color: var(--error); border-style: solid; }
.vl-etat--vide { flex-direction: column; align-items: flex-start; }
.vl-vide-titre { color: var(--text); font-weight: 600; }
.vl-spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--neon-cyan);
  animation: vl-tourne 0.9s linear infinite; }
@keyframes vl-tourne { to { transform: rotate(360deg); } }

/* Cartes */
.vl-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .vl-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .vl-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vl-carte { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; transition: border-color .2s, transform .2s; min-width: 0; }
.vl-carte:hover, .vl-carte:focus-within { border-color: var(--neon-cyan); transform: translateY(-2px); }
.vl-carte--expire { opacity: .78; }
.vl-carte-cat { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--neon-cyan); font-weight: 700; }
.vl-carte-titre { margin: 0; font-size: 1.08rem; line-height: 1.35; overflow-wrap: anywhere; }
.vl-carte-titre a { color: var(--text); text-decoration: none; }
.vl-carte-titre a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* carte entière cliquable */
.vl-carte-titre a:focus-visible { outline: none; }
.vl-carte:focus-within { outline: 3px solid var(--neon-cyan); outline-offset: 2px; }
.vl-carte-resume { margin: 0; color: var(--text-muted); font-size: .94rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.vl-carte-infos, .vl-detail-infos { margin: 0; display: grid; gap: 4px; font-size: .88rem; }
.vl-carte-infos div, .vl-detail-infos div { display: flex; gap: 6px; flex-wrap: wrap; }
.vl-carte-infos dt, .vl-detail-infos dt { color: var(--text-muted); }
.vl-carte-infos dt::after, .vl-detail-infos dt::after { content: " :"; }
.vl-carte-infos dd, .vl-detail-infos dd { margin: 0; color: var(--text); }
.vl-secteurs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vl-secteurs li { font-size: .78rem; border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; color: var(--text-muted); }
.vl-carte-source { margin: auto 0 0; font-size: .84rem; color: var(--text-muted); padding-top: 6px; border-top: 1px solid var(--border); }

.vl-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.vl-badge { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; border: 1px solid currentColor; line-height: 1.3; }
.vl-badge--externe { color: #c9c9ee; }
.vl-badge--mdssup { color: var(--accent-dark); background: var(--neon-cyan); border-color: var(--neon-cyan); }
.vl-badge--nouveau { color: var(--success); }
.vl-badge--echeance { color: #ffd479; }
.vl-badge--expire { color: var(--error); }
.vl-badge--verifie { color: #9fd8ff; }
.vl-plus-zone { text-align: center; margin: 20px 0 0; }

/* Fiche détaillée */
.vl-detail { scroll-margin-top: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; max-width: 860px; }
.vl-detail:focus { outline: none; }
.vl-retour { color: var(--neon-cyan); font-weight: 600; }
.vl-detail-titre { font-size: clamp(1.3rem, 4vw, 1.9rem); margin: .3rem 0 .6rem; line-height: 1.3; overflow-wrap: anywhere; }
.vl-detail-resume { font-size: 1.04rem; line-height: 1.65; }
.vl-detail h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.vl-detail-infos { font-size: .95rem; gap: 8px; margin: 1rem 0; }
.vl-manques { border: 1px solid #6b5a1e; background: rgba(255, 212, 121, .06); border-radius: 10px; padding: 4px 14px 10px; }
.vl-manques ul { margin: .3rem 0 0; padding-left: 1.2rem; color: var(--text-muted); }
.vl-detail-liens { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2rem 0; }
.vl-detail-liens svg { width: 16px; height: 16px; vertical-align: -2px; }
.vl-attribution { font-size: .85rem; color: var(--text-muted); margin: 0; }
@media (min-width: 700px) { .vl-detail { padding: 28px 32px; } }

@media (prefers-reduced-motion: reduce) {
  .vl-carte, .vl-carte:hover { transition: none; transform: none; }
  .vl-spinner { animation: none; }
}

/* ---------- Espace Admin (#veille-admin) ---------- */
.vl-adm-onglets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.vl-adm-onglets button[aria-pressed="true"] { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.vl-adm-barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.vl-adm-barre > * { flex: 1 1 180px; min-width: 0; }
.vl-adm-barre .btn { flex: 0 0 auto; }
.vl-adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.vl-adm-table th, .vl-adm-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.vl-adm-table-zone { overflow-x: auto; }
.vl-adm-form { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 800px) { .vl-adm-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vl-adm-form .vl-large { grid-column: 1 / -1; } }
.vl-adm-form label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--text-muted); }
.vl-adm-form label.vl-case { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.vl-adm-form fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.vl-adm-form fieldset label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
.vl-adm-alertes { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.vl-adm-alertes li { border: 1px solid var(--border); border-left: 4px solid #ffd479; border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vl-adm-alertes li.vl-bloquante { border-left-color: var(--error); }
.vl-adm-source { white-space: pre-wrap; max-height: 260px; overflow: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; font-size: .85rem; color: var(--text-muted); }
.vl-adm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.vl-adm-statut { display: inline-block; font-size: .78rem; border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.vl-adm-detail { margin-top: 16px; }
.vl-adm-detail[hidden] { display: none; }
.vl-adm-hist { font-size: .85rem; color: var(--text-muted); padding-left: 1.2rem; }
.vl-adm a:not(.btn) { color: var(--neon-cyan); }
