/* AJMIRA – Désiderata de stages — charte navy/indigo, Inter */
.ajd-root { --navy: #1e1b4b; --navy-2: #312e81; --indigo: #4f46e5; --indigo-soft: #e0e7ff; --ink: #0f172a; --muted: #64748b;
  --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff; --radius: 10px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); font-size: 14px; line-height: 1.4; }
.ajd-root *, .ajd-root *::before, .ajd-root *::after { box-sizing: border-box; }
.ajd-root button, .ajd-root input, .ajd-root select, .ajd-root textarea { font: inherit; color: inherit; }
.ajd-loading { padding: 40px; text-align: center; color: var(--muted); }
.ajd-muted { color: var(--muted); }
.ajd-small { font-size: 12px; }
.ajd-alert { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; padding: 8px 12px; border-radius: 8px; margin: 8px 0; font-size: 13px; }

/* ---- boutons ---- */
.ajd-btn { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 500; transition: background .15s, border-color .15s; }
.ajd-btn:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.ajd-btn:disabled { opacity: .5; cursor: default; }
.ajd-btn-primary { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.ajd-btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.ajd-btn-ghost { background: transparent; }
.ajd-btn-small { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.ajd-btn-danger:hover { border-color: #dc2626; background: #fee2e2; color: #991b1b; }

/* ---- connexion ---- */
.ajd-login { display: flex; justify-content: center; padding: 24px 0; background: transparent; }
.ajd-login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(30, 27, 75, .08); }
.ajd-login-card h2 { margin: 6px 0 4px; font-size: 22px; color: var(--navy); font-weight: 700; }
.ajd-login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ajd-login-card label, .ajd-dialog label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 13px; }
.ajd-login-card input, .ajd-login-card select, .ajd-dialog input, .ajd-dialog select, .ajd-dialog textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-weight: 400; }
.ajd-login-card input:focus, .ajd-dialog input:focus, .ajd-dialog select:focus, .ajd-dialog textarea:focus { outline: 2px solid var(--indigo-soft); border-color: var(--indigo); }
.ajd-login-msg, .ajd-dialog-msg { color: #b91c1c; font-size: 13px; min-height: 18px; }
.ajd-dialog-msg:not(.err):not(:empty) { color: #15803d; }

/* ---- en-tête ---- */
.ajd-shell { background: var(--bg); border-radius: var(--radius); padding: 0 0 16px; }
.ajd-header { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 16px; background: var(--navy); color: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.ajd-brand { font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; color: inherit; }
.ajd-login .ajd-brand { color: var(--indigo); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.ajd-brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, #818cf8, #4f46e5); display: inline-block; }
.ajd-brand-sep { opacity: .5; margin: 0 2px; }
.ajd-tabs { display: flex; gap: 4px; margin-left: 8px; }
.ajd-tab { background: transparent; border: 0; color: rgba(255,255,255,.75); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.ajd-tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.ajd-tab.on { background: rgba(255,255,255,.14); color: #fff; }
.ajd-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ajd-user .ajd-btn-ghost { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.25); }
.ajd-user .ajd-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.ajd-chip { background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.ajd-chip-admin { background: #818cf8; color: var(--navy); font-weight: 600; }

/* ---- barre d'outils / légende ---- */
.ajd-toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 16px; }
.ajd-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.ajd-lg { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.ajd-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.ajd-switch { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }

/* ---- grille ---- */
.ajd-grid-wrap { overflow: auto; max-height: 75vh; margin: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ajd-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.ajd-grid th, .ajd-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; }
.ajd-grid thead th { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 2px solid var(--navy); min-width: 150px; }
.ajd-grid thead th.ajd-sticky-col { z-index: 4; }
.ajd-sticky-col { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 150px; font-weight: 600; }
.ajd-sem { font-weight: 700; color: var(--navy); }
.ajd-sem-sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.ajd-sem-warn { font-size: 11px; color: #b91c1c; font-weight: 600; }
.ajd-col-current { background: var(--indigo-soft) !important; }
.ajd-col-past { color: var(--muted); }
.ajd-promo-row td { background: var(--navy-2); color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 5px 8px; position: sticky; left: 0; }
.ajd-row-mine th.ajd-sticky-col { background: var(--indigo-soft); color: var(--navy); }
.ajd-row-ancien th.ajd-sticky-col { color: var(--muted); font-style: italic; }
.ajd-me { font-size: 10px; background: var(--indigo); color: #fff; border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }

.ajd-cell { position: relative; min-width: 150px; max-width: 220px; height: 44px; background: #fff; }
.ajd-cell.ajd-editable { cursor: pointer; }
.ajd-cell.ajd-editable:hover { outline: 2px solid var(--indigo); outline-offset: -2px; }
.ajd-c1 { font-weight: 500; padding-right: 30px; }
.ajd-c2 { font-size: 11.5px; color: var(--muted); }
.ajd-empty { color: #cbd5e1; text-align: center; font-size: 18px; line-height: 28px; }
.ajd-badges { position: absolute; top: 4px; right: 5px; display: flex; gap: 3px; }
.ajd-badge { font-size: 10.5px; font-weight: 700; background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 6px; }
.ajd-warn { font-size: 13px; }
.ajd-note { font-size: 11px; color: var(--muted); }
.ajd-hl { outline: 2px dashed var(--indigo) !important; outline-offset: -2px; }

/* ---- types de cellule ---- */
.ajd-t-past { background: #dcfce7; color: #14532d; }
.ajd-t-souhait { background: #fff; }
.ajd-t-dj { background: #fce7f3; color: #831843; }
.ajd-t-interchu { background: #fef9c3; color: #713f12; }
.ajd-t-dispo { background: #e5e7eb; color: #374151; }
.ajd-t-recherche { background: #d1d5db; color: #1f2937; }
.ajd-t-socle { background: #eef2ff; color: var(--navy); }
.ajd-lg.ajd-t-dup, .ajd-cell.ajd-t-dup { background: #e0f2fe; }
/* teintes froides (bleu/turquoise/violet) pour ne pas se confondre avec DJ (rose), InterCHU (jaune), effectué (vert) */
.ajd-cell.ajd-hue-0 { background: #e0f2fe; } .ajd-cell.ajd-hue-1 { background: #ccfbf1; } .ajd-cell.ajd-hue-2 { background: #dbeafe; }
.ajd-cell.ajd-hue-3 { background: #cffafe; } .ajd-cell.ajd-hue-4 { background: #ede9fe; } .ajd-cell.ajd-hue-5 { background: #e0e7ff; }
.ajd-cell.ajd-hue-6 { background: #bae6fd; } .ajd-cell.ajd-hue-7 { background: #99f6e4; }
.ajd-t-conflict { box-shadow: inset 0 0 0 2px #dc2626; }
.ajd-cell.ajd-t-conflict { background: #fee2e2 !important; color: #7f1d1d; }
.ajd-lg.ajd-t-conflict { background: #fee2e2; border-color: #dc2626; }

/* ---- panneau latéral ---- */
.ajd-panel { margin: 14px 16px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.ajd-panel h3 { margin: 0 0 8px; font-size: 14px; color: var(--navy); }
.ajd-panel h4 { margin: 10px 0 4px; font-size: 12.5px; color: var(--indigo); text-transform: uppercase; letter-spacing: .05em; }
.ajd-panel-item { font-size: 13px; padding: 3px 0; }
.ajd-panel-conflict { color: #991b1b; }
.ajd-g4-layout { display: grid; grid-template-columns: 1fr; gap: 0; }

/* ---- G4 ---- */
.ajd-g4 thead th { min-width: 0; }
.ajd-g4-total { text-align: center; font-weight: 700; width: 60px; }
.ajd-g4-n0 { background: #f1f5f9; color: var(--muted); } .ajd-g4-n1 { background: #ede9fe; } .ajd-g4-n2 { background: #c7d2fe; } .ajd-g4-n3 { background: #a5b4fc; } .ajd-g4-n4 { background: #6366f1; color: #fff; }
.ajd-g4-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ajd-pill { background: var(--indigo-soft); color: var(--navy); border-radius: 999px; padding: 2px 8px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.ajd-pill-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 0 2px; line-height: 1; }
.ajd-pill-x:hover { color: #dc2626; }
.ajd-g4-add { display: inline-flex; gap: 4px; }
.ajd-g4-add input { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 12.5px; width: 110px; }
.ajd-g4-add input[name=annee] { width: 70px; }

/* ---- modales ---- */
.ajd-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ajd-dialog { background: #fff; border-radius: 14px; padding: 20px 22px; width: 100%; max-width: 460px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); font-family: inherit; }
.ajd-dialog-wide { max-width: 860px; }
.ajd-dialog h3 { margin: 0 0 12px; color: var(--navy); font-size: 17px; }
.ajd-dialog h4 { margin: 18px 0 6px; font-size: 13.5px; color: var(--navy-2); }
.ajd-dialog form { display: flex; flex-direction: column; gap: 10px; }
.ajd-dialog form.ajd-inline { flex-direction: row; align-items: end; flex-wrap: wrap; }
.ajd-dialog form.ajd-inline label { flex-direction: row; align-items: center; gap: 6px; }
.ajd-dialog-actions { display: flex; gap: 8px; margin-top: 8px; }
.ajd-spacer { flex: 1; }
.ajd-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ajd-admin-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 4px; }
.ajd-admin-table td { padding: 3px 4px; border-top: 1px solid var(--line); }
.ajd-admin-table input:not([type=checkbox]) { width: 100%; padding: 4px 6px; }
.ajd-admin-table .ajd-num { width: 64px; }
.ajd-admin-table tr.ajd-new td { background: #f8fafc; }

/* ---- toast ---- */
.ajd-toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 999px; opacity: 0; transition: all .2s; z-index: 10000; pointer-events: none; font-size: 13px; }
.ajd-toast.on { opacity: 1; transform: translate(-50%, 0); }
.ajd-toast.err { background: #b91c1c; }

@media (max-width: 720px) {
  .ajd-header { gap: 10px; }
  .ajd-user { margin-left: 0; width: 100%; }
  .ajd-grid-wrap { margin: 0 8px; max-height: 70vh; }
  .ajd-cell, .ajd-grid thead th { min-width: 120px; }
  .ajd-sticky-col { min-width: 110px; }
  .ajd-toolbar, .ajd-panel { margin-left: 8px; margin-right: 8px; padding-left: 10px; padding-right: 10px; }
}

/* ---- cellules cliquables / bulle de commentaires ---- */
.ajd-cell.ajd-clickable { cursor: pointer; }
.ajd-cell.ajd-clickable:not(.ajd-editable):hover { outline: 2px solid #94a3b8; outline-offset: -2px; }
.ajd-cbadge { position: relative; font-size: 10.5px; font-weight: 700; background: var(--indigo); color: #fff; border-radius: 8px 8px 8px 2px; padding: 1px 6px; line-height: 15px; }
.ajd-cbadge::before { content: ''; position: absolute; left: 0; bottom: -4px; border: 4px solid transparent; border-top-color: var(--indigo); border-left-color: var(--indigo); }

/* ---- fil de commentaires ---- */
.ajd-comments { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.ajd-comments h4 { margin: 0 0 8px; }
.ajd-comment { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px 8px 8px 2px; padding: 7px 10px; margin-bottom: 6px; font-size: 13px; }
.ajd-comment-admin { background: var(--indigo-soft); border-color: #c7d2fe; }
.ajd-comment-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.ajd-comment-admin .ajd-comment-meta { color: var(--navy-2); font-weight: 600; }
.ajd-comment-text { white-space: pre-wrap; }
.ajd-comment-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ajd-comment-form button { align-self: flex-end; }
.ajd-readonly { padding: 8px 0; }
.ajd-ro-c1 { font-size: 16px; font-weight: 600; color: var(--navy); }
.ajd-ro-c2 { color: var(--muted); font-size: 13px; }
.ajd-ro-note { margin-top: 6px; font-size: 13px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 4px 8px; }

/* ---- journal ---- */
.ajd-log-list { list-style: none; margin: 0; padding: 0; }
.ajd-log-list li { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.ajd-log-list li:last-child { border-bottom: 0; }
.ajd-log-list time { flex: 0 0 110px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.ajd-log-list b { font-weight: 600; color: var(--navy); }
.ajd-log .ajd-btn { margin-top: 8px; }

/* ---- documents ---- */
.ajd-docs-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ajd-doc { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy); font-weight: 500; text-decoration: none; font-size: 13px; }
.ajd-doc::before { content: '📄'; }
.ajd-doc:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.ajd-details summary { cursor: pointer; color: var(--indigo); font-weight: 500; font-size: 13px; }
.ajd-details p, .ajd-details li { font-size: 13px; line-height: 1.5; }
.ajd-details ol { padding-left: 20px; }
@media (max-width: 720px) { .ajd-log-list li { flex-direction: column; gap: 2px; } }

/* ---- encarts : une couleur par section ---- */
.ajd-panel.ajd-log { background: #eef2ff; border-color: #c7d2fe; }
.ajd-panel.ajd-log h3 { color: var(--navy-2); }
.ajd-panel.ajd-dups { background: #fffbeb; border-color: #fde68a; }
.ajd-panel.ajd-dups h3 { color: #92400e; }
.ajd-panel.ajd-dups h4 { color: #b45309; }
.ajd-panel.ajd-docs { background: #f0fdfa; border-color: #99f6e4; }
.ajd-panel.ajd-docs h3 { color: #115e59; }
.ajd-panel.ajd-docs .ajd-details summary { color: #0f766e; }
.ajd-panel.ajd-g4years { background: #faf5ff; border-color: #e9d5ff; }
.ajd-panel.ajd-g4years h3 { color: #6b21a8; }
.ajd-panel.ajd-g4years h4 { color: #7e22ce; }

.ajd-alert-top { margin: 12px 16px 0; }
.ajd-pill-x.ajd-armed, .ajd-btn.ajd-armed { color: #fff !important; background: #dc2626 !important; border-color: #dc2626 !important; border-radius: 6px; padding: 1px 6px; font-size: 11px; }

/* ---- avis de stage ---- */
.ajd-avis-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin: 14px 16px 0; }
.ajd-avis-layout .ajd-panel { margin: 0; }
.ajd-avis-form-panel { background: #fff; }
.ajd-avis-form-panel form { display: flex; flex-direction: column; gap: 10px; }
.ajd-avis-form-panel label, .ajd-field { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 13px; }
.ajd-avis-form-panel input:not([type=checkbox]):not([type=radio]), .ajd-avis-form-panel textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-weight: 400; background: #fff; }
.ajd-avis-form-panel label.ajd-anon { flex-direction: row; align-items: center; flex-wrap: wrap; }
.ajd-rating { display: inline-flex; align-items: center; gap: 2px; flex-direction: row-reverse; justify-content: flex-end; }
.ajd-rating label { cursor: pointer; font-size: 26px; line-height: 1; color: #cbd5e1; }
.ajd-rating label input { position: absolute; opacity: 0; width: 0; height: 0; }
.ajd-rating label:hover, .ajd-rating label:hover ~ label, .ajd-rating input:checked ~ span, .ajd-rating label:has(input:checked), .ajd-rating label:has(input:checked) ~ label { color: #f59e0b; }
.ajd-rating-clear { order: -1; margin-left: 8px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; color: var(--muted); padding: 2px 7px; }
.ajd-guides { background: #f0fdfa; border-color: #99f6e4; }
.ajd-guides h3 { color: #115e59; }
.ajd-h3 { margin: 0; font-size: 15px; color: var(--navy); }
.ajd-search { margin-left: auto; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 220px; }
.ajd-avis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin: 0 16px; }
.ajd-avis-empty { grid-column: 1 / -1; margin: 0; }
.ajd-terrain { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ajd-terrain-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border-bottom: 2px solid var(--navy); padding-bottom: 8px; }
.ajd-terrain-head h4 { margin: 0; font-size: 15px; color: var(--navy); }
.ajd-terrain-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-left: auto; }
.ajd-terrain-guides { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.ajd-doc-small { padding: 3px 8px; font-size: 12px; }
.ajd-moy { font-weight: 700; color: #b45309; }
.ajd-stars { color: #f59e0b; letter-spacing: 1px; font-size: 13px; }
.ajd-stars-off { color: #e2e8f0; }
.ajd-avis { border-left: 3px solid var(--indigo-soft); padding: 4px 0 4px 10px; }
.ajd-avis-anon { border-left-color: #cbd5e1; }
.ajd-avis-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ajd-avis-auteur { font-weight: 600; color: var(--navy); }
.ajd-avis-anon .ajd-avis-auteur { color: var(--muted); font-style: italic; }
.ajd-avis-texte { white-space: pre-wrap; font-size: 13.5px; margin-top: 3px; line-height: 1.5; }
@media (max-width: 860px) { .ajd-avis-layout { grid-template-columns: 1fr; margin-left: 8px; margin-right: 8px; } .ajd-avis-grid { margin: 0 8px; grid-template-columns: 1fr; } .ajd-search { margin-left: 0; width: 100%; } }

/* ---- guides : parchemin ---- */
.ajd-doc.ajd-guide::before { content: '📜'; }
/* ---- bouton maquette dans la colonne des noms ---- */
.ajd-sticky-col .ajd-nom { display: block; }
.ajd-maq-btn { margin-top: 3px; font-size: 10.5px; font-weight: 500; color: var(--indigo); background: var(--indigo-soft); border: 0; border-radius: 4px; padding: 1px 6px; cursor: pointer; }
.ajd-maq-btn:hover { background: var(--indigo); color: #fff; }
/* ---- analyse / simulateur ---- */
.ajd-maq-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.ajd-maq-verdict { font-weight: 700; padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; }
.ajd-maq-verdict.ok { background: #dcfce7; color: #14532d; } .ajd-maq-verdict.ko { background: #fee2e2; color: #7f1d1d; }
.ajd-maq-issues { margin: 0 0 10px; padding: 0; list-style: none; }
.ajd-maq-issues li { padding: 4px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.ajd-maq-error { color: #991b1b; } .ajd-maq-warn { color: #b45309; } .ajd-maq-info { color: var(--muted); }
.ajd-maq-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ajd-maq-table th { text-align: left; font-size: 11px; color: var(--muted); padding: 3px 6px; border-bottom: 1px solid var(--line); }
.ajd-maq-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ajd-maq-table tr.ok td:nth-child(2) { color: #15803d; font-weight: 600; } .ajd-maq-table tr.ko td:nth-child(2) { color: #b91c1c; font-weight: 600; }
.ajd-maq-cells tr.prevu td { color: var(--muted); }
.ajd-sim-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin: 14px 16px 0; }
.ajd-sim-layout .ajd-panel { margin: 0; }
.ajd-sim-panel { background: #fff; }
.ajd-sim-result { background: #eef2ff; border-color: #c7d2fe; }
.ajd-sim-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.ajd-sim-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ajd-sim-table th { text-align: left; font-size: 11px; color: var(--muted); padding: 3px 6px; }
.ajd-sim-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
.ajd-sim-table select, .ajd-sim-table input[name=label] { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: #fff; }
.ajd-sim-year td { background: var(--navy-2); color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 4px 8px; }
@media (max-width: 860px) { .ajd-maq-layout, .ajd-sim-layout { grid-template-columns: 1fr; } .ajd-sim-layout { margin-left: 8px; margin-right: 8px; } }

/* ---- simulateur : frise ---- */
.ajd-sim-wrap { margin: 14px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.ajd-sim-wrap .ajd-panel { margin: 0; }
.ajd-sim-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ajd-sim-head h3 { margin: 0; }
.ajd-sim-head .ajd-sim-actions { margin: 0 0 0 auto; }
.ajd-frise { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.ajd-frise-year { border-radius: 10px; padding: 6px; border: 1px solid var(--line); background: #f8fafc; min-width: 0; }
.ajd-frise-year.ajd-ph-socle { border-color: #c7d2fe; background: #eef2ff; }
.ajd-frise-year.ajd-ph-dj { border-color: #fbcfe8; background: #fdf2f8; }
.ajd-frise-ylabel { font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; gap: 6px; padding: 0 2px 6px; }
.ajd-frise-ylabel span { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.ajd-frise-sems { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ajd-frise-sem { position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; min-height: 78px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: transform .1s, box-shadow .1s; min-width: 0; }
.ajd-frise-sem:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,27,75,.12); }
.ajd-frise-sem.on { outline: 2px solid var(--indigo); outline-offset: 1px; }
.ajd-frise-s { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.ajd-frise-label { font-weight: 600; font-size: 12.5px; line-height: 1.25; overflow-wrap: anywhere; }
.ajd-frise-label i { color: #94a3b8; font-weight: 400; }
.ajd-frise-meta { font-size: 10.5px; color: var(--muted); }
.ajd-cat-vide { border-style: dashed; }
.ajd-cat-rea { background: #e0e7ff !important; border-color: #a5b4fc !important; }
.ajd-cat-anesth { background: #ccfbf1 !important; border-color: #5eead4 !important; }
.ajd-cat-med { background: #e0f2fe !important; border-color: #7dd3fc !important; }
.ajd-cat-dj { background: #fce7f3 !important; border-color: #f9a8d4 !important; }
.ajd-cat-autre { background: #fef3c7 !important; border-color: #fcd34d !important; }
.ajd-cat-dispo { background: #e5e7eb !important; border-color: #cbd5e1 !important; }
.ajd-cat-recherche { background: #d1d5db !important; border-color: #9ca3af !important; }
.ajd-frise-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ajd-sim-edit { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ajd-sim-edit-head { display: flex; align-items: center; gap: 10px; }
.ajd-sim-edit label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
.ajd-sim-edit input:not([type=checkbox]), .ajd-sim-edit select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; font-weight: 400; }
.ajd-sim-fields { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.ajd-sim-fields label.ajd-switch { flex-direction: row; align-items: center; padding-bottom: 8px; }
.ajd-sim-fields > label { min-width: 200px; }
@media (max-width: 900px) { .ajd-frise { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ajd-sim-wrap { margin-left: 8px; margin-right: 8px; } }
@media (max-width: 480px) { .ajd-frise { grid-template-columns: 1fr; } }

.ajd-ok { font-size: 12px; font-weight: 700; color: #15803d; }
.ajd-ro-ok { margin-top: 6px; font-weight: 600; color: #15803d; }
.ajd-valide { margin-top: 2px; }

.ajd-sim-g4 { border-top: 1px solid #c7d2fe; margin-top: 10px; padding-top: 8px; }
.ajd-sim-g4 h4 { margin: 0 0 6px; font-size: 13px; color: var(--navy-2); }
.ajd-sim-g4-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.ajd-sim-g4-row label { display: inline-flex; align-items: center; gap: 6px; }
.ajd-g4-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; }
.ajd-sim-g4 .ajd-num { width: 64px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }

/* ---- Qui est passé en … ? ---- */
.ajd-panel.ajd-qui { background: #fdf4ff; border-color: #f0abfc; }
.ajd-panel.ajd-qui h3 { color: #86198f; }
.ajd-panel.ajd-qui h4 { color: #a21caf; }
.ajd-qui-search { display: block; width: 100%; max-width: 420px; margin: 0 0 10px; }
.ajd-qui-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ajd-chip-t { border: 1px solid #f0abfc; background: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.ajd-chip-t:hover { background: #fae8ff; }
.ajd-chip-t span { color: #a21caf; font-weight: 700; margin-left: 2px; }
.ajd-qui-terrain { margin-bottom: 10px; }
.ajd-qui-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.ajd-qui-list .ajd-pill small { color: var(--muted); font-weight: 400; }
.ajd-pill-ancien { opacity: .7; font-style: italic; }
.ajd-pill-prevu { background: #fff; border: 1px dashed #c4b5fd; }

/* ---- menu latéral ---- */
.ajd-shell-side { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 70vh; background: var(--bg); border-radius: var(--radius); overflow: hidden; padding: 0; }
.ajd-side { background: var(--navy); color: #fff; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; }
.ajd-side-brand { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ajd-logo { max-width: 160px; max-height: 64px; height: auto; display: block; }
.ajd-logo-login { margin: 0 auto 6px; }
.ajd-side .ajd-brand { font-size: 18px; }
.ajd-side-title { font-size: 12px; color: rgba(255,255,255,.7); letter-spacing: .04em; text-transform: uppercase; }
.ajd-nav { display: flex; flex-direction: column; gap: 2px; }
.ajd-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; color: rgba(255,255,255,.8); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500; font-size: 13.5px; }
.ajd-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.ajd-nav-item.on { background: var(--indigo); color: #fff; }
.ajd-nav-ic { width: 22px; text-align: center; font-size: 15px; }
.ajd-side-user { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.ajd-side-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ajd-side .ajd-btn-ghost { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.25); }
.ajd-side .ajd-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.ajd-content { min-width: 0; padding-bottom: 16px; }
.ajd-content-head { padding: 16px 16px 0; }
.ajd-content-head h2 { margin: 0; font-size: 18px; color: var(--navy); }
.ajd-tabwrap { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.ajd-tabwrap .ajd-panel { margin: 0; }
@media (max-width: 860px) {
  .ajd-shell-side { grid-template-columns: 1fr; }
  .ajd-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px; }
  .ajd-side-brand { flex-direction: row; align-items: center; gap: 10px; }
  .ajd-nav { flex-direction: row; overflow-x: auto; width: 100%; gap: 4px; padding-bottom: 2px; }
  .ajd-nav-item { white-space: nowrap; width: auto; padding: 7px 10px; }
  .ajd-side-user { margin-top: 0; width: 100%; border-top: 0; padding-top: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .ajd-tabwrap { padding: 10px 8px 0; }
}

.ajd-panel.ajd-interchu { background: #fefce8; border-color: #fde047; }
.ajd-panel.ajd-interchu h3 { color: #854d0e; }
.ajd-panel.ajd-interchu .ajd-details summary { color: #a16207; }
.ajd-docs-col { flex-direction: column; align-items: flex-start; }
/* ---- logo AJMIRA : sur fond blanc dans le menu navy ---- */
.ajd-side .ajd-logo { background: #fff; border-radius: 8px; padding: 6px 10px; max-width: 200px; max-height: 90px; width: 100%; object-fit: contain; }
.ajd-logo-login { max-width: 260px; max-height: 120px; }
