/* ===== UDs — Calendrier académique ===== */
.uds-ac { --uds-orange:#F68B1F; --uds-navy:#262B67; --uds-border:#e4e7ec; font-family:Roboto,Arial,sans-serif; color:#1f2430; max-width:100%; }
.uds-ac * { box-sizing:border-box; }

/* Toolbar */
.uds-ac-toolbar { display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:2px solid var(--uds-orange); margin-bottom:14px; }
.uds-ac-title { font-size:20px; font-weight:700; color:var(--uds-navy); }
.uds-ac-title strong { color:var(--uds-orange); }
.uds-ac-ico { font-style:normal; margin-right:6px; }
.uds-ac-controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.uds-ac-filters select { padding:8px 10px; border:1px solid var(--uds-border); border-radius:6px; font-size:13px; background:#fff; cursor:pointer; }
.uds-ac-viewswitch { display:inline-flex; border:1px solid var(--uds-border); border-radius:6px; overflow:hidden; }
.uds-ac-vbtn { padding:8px 16px; border:none; background:#fff; cursor:pointer; font-size:13px; font-weight:500; color:var(--uds-navy); transition:background .2s,color .2s; }
.uds-ac-vbtn.is-active { background:var(--uds-navy); color:#fff; }

/* Légende */
.uds-ac-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin-bottom:16px; font-size:12px; color:#555; }
.uds-ac-leg { display:inline-flex; align-items:center; gap:6px; cursor:pointer; opacity:.9; }
.uds-ac-leg.is-off { opacity:.3; text-decoration:line-through; }
.uds-ac-dot { width:11px; height:11px; border-radius:50%; display:inline-block; }

/* Barre de recherche */
.uds-ac-searchbar { display:flex; align-items:center; gap:8px; margin-bottom:16px; border:1px solid var(--uds-border); border-radius:8px; padding:4px 12px; background:#fff; max-width:640px; }
.uds-ac-searchbar:focus-within { border-color:var(--uds-orange); box-shadow:0 0 0 3px rgba(246,139,31,.12); }
.uds-ac-search-ico { font-style:normal; opacity:.6; font-size:15px; }
.uds-ac-search { flex:1; border:none; outline:none; padding:9px 4px; font-size:14px; background:transparent; color:#1f2430; font-family:inherit; }
.uds-ac-search::placeholder { color:#9aa0aa; }
.uds-ac-search-count { font-size:12px; color:var(--uds-orange); font-weight:600; white-space:nowrap; }
.uds-ac-filter-annee { font-weight:700; color:var(--uds-navy); border-color:var(--uds-orange) !important; }

/* Boutons de téléchargement PDF */
.uds-ac-downloads { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.uds-ac-downloads:empty { display:none; }
.uds-ac-dl { display:inline-flex; align-items:center; gap:8px; padding:9px 18px; background:var(--uds-navy); color:#fff !important; font-size:13px; font-weight:600; text-decoration:none !important; border-radius:6px; border:2px solid var(--uds-navy); transition:background .2s,color .2s; }
.uds-ac-dl:hover { background:#fff; color:var(--uds-navy) !important; }
.uds-ac-dl-ico { font-size:15px; }

/* ===== Vue calendrier ===== */
.uds-ac-cal-nav { display:flex; align-items:center; justify-content:center; gap:20px; margin-bottom:12px; }
.uds-ac-cal-nav button { width:38px; height:38px; border:1px solid var(--uds-border); background:#fff; border-radius:50%; cursor:pointer; font-size:20px; color:var(--uds-navy); transition:background .2s,color .2s; }
.uds-ac-cal-nav button:hover { background:var(--uds-orange); color:#fff; border-color:var(--uds-orange); }
.uds-ac-monthlabel { font-size:18px; font-weight:700; color:var(--uds-navy); min-width:220px; text-align:center; text-transform:capitalize; }

.uds-ac-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.uds-ac-wd { text-align:center; font-size:12px; font-weight:700; color:#888; padding:6px 0; text-transform:uppercase; }
.uds-ac-cell { min-height:78px; border:1px solid var(--uds-border); border-radius:6px; padding:5px; background:#fff; position:relative; overflow:hidden; }
.uds-ac-cell.is-empty { background:#fafafa; border-style:dashed; }
.uds-ac-cell.is-today { border-color:var(--uds-orange); box-shadow:inset 0 0 0 1px var(--uds-orange); }
.uds-ac-cell.has-ev { cursor:pointer; }
.uds-ac-cell.has-ev:hover { background:#fff8f0; }
.uds-ac-datenum { font-size:12px; font-weight:600; color:#666; }
.uds-ac-cell.is-today .uds-ac-datenum { color:var(--uds-orange); }
.uds-ac-evs { margin-top:3px; display:flex; flex-direction:column; gap:2px; }
.uds-ac-ev { font-size:10px; line-height:1.25; color:#fff; padding:2px 4px; border-radius:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.uds-ac-more { font-size:10px; color:#999; padding-left:2px; }

/* Liste des événements du jour cliqué */
.uds-ac-daylist { margin-top:16px; }
.uds-ac-daycard { border:1px solid var(--uds-border); border-left:4px solid var(--uds-orange); border-radius:6px; padding:12px 16px; margin-bottom:10px; background:#fff; }
.uds-ac-daycard h4 { margin:0 0 6px; font-size:15px; color:var(--uds-navy); }
.uds-ac-daycard .uds-ac-dc-meta { font-size:12px; color:#666; }
.uds-ac-daycard .uds-ac-dc-en { display:block; font-size:12px; font-style:italic; color:#888; margin-top:3px; }
.uds-ac-dc-badge { display:inline-block; font-size:10px; color:#fff; padding:2px 8px; border-radius:10px; margin-bottom:6px; }

/* ===== Vue tableau ===== */
.uds-ac-tableview { overflow-x:auto; }
.uds-ac-table { width:100%; border-collapse:collapse; font-size:14px; }
.uds-ac-table thead th { background:var(--uds-navy); color:#fff; text-align:left; padding:10px 12px; font-weight:600; font-size:13px; }
.uds-ac-table tbody td { padding:10px 12px; border-bottom:1px solid var(--uds-border); vertical-align:top; }
.uds-ac-row:hover { background:#fff8f0; }
.uds-ac-row.is-important td { font-weight:700; }
.uds-ac-num { text-align:center; color:#999; width:44px; }
.uds-ac-act { position:relative; padding-left:18px !important; }
.uds-ac-catbar { position:absolute; left:0; top:12px; bottom:12px; width:4px; border-radius:2px; }
.uds-ac-en { display:block; font-size:12px; font-style:italic; color:#999; font-weight:400; margin-top:2px; }
.uds-ac-period { white-space:nowrap; color:#444; }
.uds-ac-sem { white-space:nowrap; color:#666; font-size:13px; }

/* ===== Widget événements à venir ===== */
.uds-ac-upcoming { --uds-orange:#F68B1F; --uds-navy:#262B67; font-family:Roboto,Arial,sans-serif; border:1px solid #e4e7ec; border-radius:10px; overflow:hidden; background:#fff; max-width:420px; }
.uds-ac-up-head { background:var(--uds-navy); color:#fff; padding:12px 16px; font-size:15px; font-weight:700; }
.uds-ac-up-list { list-style:none; margin:0; padding:6px 0; }
.uds-ac-up-item { display:flex; align-items:center; gap:12px; padding:9px 16px; border-bottom:1px solid #f0f0f0; }
.uds-ac-up-item:last-child { border-bottom:none; }
.uds-ac-up-date { flex:0 0 auto; width:46px; height:46px; border:2px solid var(--uds-orange); border-radius:8px; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1; }
.uds-ac-up-day { font-size:18px; font-weight:800; color:var(--uds-navy); }
.uds-ac-up-mon { font-size:10px; text-transform:uppercase; color:#888; }
.uds-ac-up-title { font-size:13px; color:#333; line-height:1.35; }
.uds-ac-up-empty { padding:16px; font-size:13px; color:#888; text-align:center; }
.uds-ac-up-more { display:block; text-align:center; padding:11px; background:#faf3ea; color:var(--uds-orange); font-weight:600; font-size:13px; text-decoration:none; transition:background .2s; }
.uds-ac-up-more:hover { background:var(--uds-orange); color:#fff; }

/* Pastilles report / intermédiaire dans la grille */
.uds-ac-ev.is-reported { text-decoration:line-through; opacity:.7; }
.uds-ac-ev.is-reportnew { outline:2px dotted rgba(255,255,255,.85); outline-offset:-3px; }
.uds-ac-ev.is-inter { box-shadow:0 0 0 2px #fff, 0 0 0 3px #E53935; }

/* Badges (tableau + modal) */
.uds-ac-badge { display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:10px; margin-right:4px; white-space:nowrap; vertical-align:middle; }
.uds-ac-badge-inter { background:#FDECEA; color:#B32D2E; border:1px solid #f3b4ae; }
.uds-ac-badge-report { background:#FFF3E0; color:#8a5300; border:1px solid #f0c98a; }
.uds-ac-row.is-inter { background:#fffaf9; }

/* Fenêtre modale */
.uds-ac-modal { position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; }
.uds-ac-modal[hidden] { display:none; }
.uds-ac-modal-overlay { position:absolute; inset:0; background:rgba(13,27,62,.55); }
.uds-ac-modal-box { position:relative; z-index:1; background:#fff; width:min(620px,92vw); max-height:86vh; overflow-y:auto; border-radius:12px; padding:24px 26px; box-shadow:0 20px 60px rgba(0,0,0,.35); }
.uds-ac-modal-close { position:absolute; top:12px; right:14px; background:none; border:none; font-size:28px; line-height:1; color:#888; cursor:pointer; padding:0; width:32px; height:32px; }
.uds-ac-modal-close:hover { color:var(--uds-orange); }
.uds-ac-modal-title { margin:0 0 16px; font-size:19px; color:var(--uds-navy); padding-right:30px; }
.uds-ac-mcard { border:1px solid var(--uds-border); border-left:4px solid var(--uds-orange); border-radius:8px; padding:14px 16px; margin-bottom:12px; }
.uds-ac-mcard:last-child { margin-bottom:0; }
.uds-ac-mcard-head { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:8px; }
.uds-ac-dc-badge { display:inline-block; font-size:11px; color:#fff; padding:2px 10px; border-radius:10px; }
.uds-ac-mcard h4 { margin:0 0 4px; font-size:16px; color:#1f2430; }
.uds-ac-mcard-en { font-size:13px; font-style:italic; color:#888; margin-bottom:8px; }
.uds-ac-mcard-meta { font-size:13px; color:#555; margin-bottom:4px; }
.uds-ac-mcard-desc { font-size:14px; color:#333; line-height:1.6; margin:10px 0; padding:10px 12px; background:#f8f9fb; border-radius:6px; }
.uds-ac-mcard-pj { margin-top:10px; font-size:13px; }
.uds-ac-mcard-pj ul { margin:6px 0 0; padding-left:0; list-style:none; }
.uds-ac-mcard-pj li { margin:4px 0; }
.uds-ac-mcard-pj a { color:var(--uds-navy); text-decoration:none; font-weight:500; }
.uds-ac-mcard-pj a:hover { color:var(--uds-orange); text-decoration:underline; }

/* Responsive */
@media(max-width:768px){
  .uds-ac-cell { min-height:56px; padding:3px; }
  .uds-ac-ev { font-size:0; padding:3px; }         /* pastilles seules sur mobile */
  .uds-ac-ev::before { content:''; display:block; width:100%; height:4px; border-radius:2px; }
  .uds-ac-monthlabel { min-width:auto; font-size:15px; }
  .uds-ac-toolbar { flex-direction:column; align-items:flex-start; }
  .uds-ac-en { display:none; }
}
