/* manuel.css — styles partagés pour les pages d'aide BIRSG HEPHC */
*,*::before,*::after { box-sizing:border-box }
body {
  margin:0; padding:0; min-height:100vh;
  background:#f1f5f9;
  background-image:
    radial-gradient(1200px 600px at 0% -10%, #eef2ff 0%, transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, #ecfeff 0%, transparent 55%);
  font-family:'Segoe UI',system-ui,-apple-system,sans-serif;
  color:#0f172a; line-height:1.55;
}

/* ─── Barre de marque supérieure ─────────────────────────────────────── */
.doc-topbar {
  background:linear-gradient(90deg,#0f172a 0%,#1e293b 100%);
  color:#fff; padding:.48rem 1.6rem;
  display:flex; align-items:center; justify-content:space-between;
  font-size:.78rem; letter-spacing:.03em; gap:1rem;
  position:sticky; top:0; z-index:100;
  box-shadow:0 1px 0 rgba(255,255,255,.06);
}
.doc-topbar-brand {
  display:flex; align-items:center; gap:.6rem;
}
.doc-topbar-logo {
  width:26px; height:26px; flex-shrink:0;
}
.doc-topbar-name {
  font-weight:800; font-size:.88rem; color:#fff; letter-spacing:.05em;
}
.doc-topbar-sep { opacity:.35; }
.doc-topbar-sub { color:#94a3b8; font-size:.78rem; }
.doc-topbar-right { display:flex; align-items:center; gap:1rem; color:#94a3b8; }
.doc-topbar-right a {
  color:#94a3b8; text-decoration:none; font-size:.78rem; transition:color .15s;
}
.doc-topbar-right a:hover { color:#e2e8f0; }

/* ─── Wrapper ────────────────────────────────────────────────────────── */
.manuel-wrap { max-width:980px; margin:0 auto; padding:1.5rem 1.25rem 3rem; }

/* ─── Header bandeau — variantes couleur par rôle ───────────────────── */
.manuel-hdr {
  background:linear-gradient(135deg,#312e81 0%,#4f46e5 100%);
  color:#fff; border-radius:14px; padding:1.4rem 1.6rem;
  margin-bottom:1.4rem; box-shadow:0 8px 24px rgba(49,46,129,.25);
  display:flex; align-items:flex-start; gap:1.2rem; flex-wrap:wrap;
  position:relative; overflow:hidden;
}
/* Motif de fond décoratif */
.manuel-hdr::before {
  content:''; position:absolute; inset:0;
  background-image:
    radial-gradient(ellipse 400px 250px at 100% -20%, rgba(255,255,255,.12) 0%, transparent 60%),
    radial-gradient(ellipse 300px 200px at 0% 110%, rgba(255,255,255,.07) 0%, transparent 60%);
  pointer-events:none;
}

/* Variantes de couleur */
.manuel-hdr.hdr-admin    { background:linear-gradient(135deg,#0f766e 0%,#0d9488 50%,#14b8a6 100%); box-shadow:0 8px 24px rgba(13,148,136,.3); }
.manuel-hdr.hdr-etudiant { background:linear-gradient(135deg,#065f46 0%,#059669 60%,#10b981 100%); box-shadow:0 8px 24px rgba(5,150,105,.3); }
.manuel-hdr.hdr-coordinateur { background:linear-gradient(135deg,#1e3a8a 0%,#1d4ed8 60%,#3b82f6 100%); box-shadow:0 8px 24px rgba(29,78,216,.3); }
.manuel-hdr.hdr-enseignant   { background:linear-gradient(135deg,#4c1d95 0%,#6d28d9 60%,#8b5cf6 100%); box-shadow:0 8px 24px rgba(109,40,217,.3); }
.manuel-hdr.hdr-tfe          { background:linear-gradient(135deg,#92400e 0%,#b45309 60%,#d97706 100%); box-shadow:0 8px 24px rgba(180,83,9,.3); }
.manuel-hdr.hdr-jury         { background:linear-gradient(135deg,#831843 0%,#be185d 60%,#ec4899 100%); box-shadow:0 8px 24px rgba(190,24,93,.3); }
.manuel-hdr.hdr-infra        { background:linear-gradient(135deg,#0f172a 0%,#1e293b 60%,#334155 100%); box-shadow:0 8px 24px rgba(30,41,59,.4); }
.manuel-hdr.hdr-rgpd         { background:linear-gradient(135deg,#7f1d1d 0%,#b91c1c 60%,#ef4444 100%); box-shadow:0 8px 24px rgba(185,28,28,.3); }

.manuel-hdr-icon {
  font-size:2.8rem; line-height:1; flex-shrink:0; margin-top:.1rem;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
.manuel-hdr-text { flex:1; min-width:220px; position:relative; }
.manuel-hdr h1 {
  margin:0 0 .3rem; font-size:1.6rem; font-weight:900;
  letter-spacing:-.01em; text-shadow:0 1px 3px rgba(0,0,0,.2);
}
.manuel-hdr p  { margin:0 0 .8rem; opacity:.88; font-size:.9rem; }
.manuel-hdr-badge {
  display:inline-flex; align-items:center; gap:.35rem;
  background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.25);
  color:#fff; padding:.25rem .7rem; border-radius:20px;
  font-size:.75rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
}
.manuel-hdr-actions {
  display:flex; flex-direction:column; gap:.45rem; flex-shrink:0;
  position:relative;
}
.back {
  background:rgba(255,255,255,.18); color:#fff; text-decoration:none;
  padding:.5rem .9rem; border-radius:8px; font-size:.85rem; font-weight:600;
  transition:background .15s; white-space:nowrap; text-align:center;
  border:1px solid rgba(255,255,255,.2);
}
.back:hover { background:rgba(255,255,255,.3); }
/* Compat ancien */
.manuel-hdr .back-btn {
  background:rgba(255,255,255,.18); color:#fff; text-decoration:none;
  padding:.5rem .9rem; border-radius:8px; font-size:.85rem; font-weight:600;
  border:1px solid rgba(255,255,255,.2);
}

/* ─── TOC ────────────────────────────────────────────────────────────── */
.manuel-toc {
  background:#fff; border:1.5px solid #e2e8f0; border-radius:12px;
  padding:1.1rem 1.4rem; margin-bottom:1.5rem; box-shadow:0 2px 10px rgba(15,23,42,.04);
}
.manuel-toc h2 { margin:0 0 .55rem; font-size:.8rem; font-weight:800; color:#64748b; text-transform:uppercase; letter-spacing:.07em; }
.manuel-toc strong { font-size:.8rem; font-weight:800; color:#64748b; text-transform:uppercase; letter-spacing:.07em; display:block; margin-bottom:.5rem; }
.manuel-toc ol, .manuel-toc ul { margin:0; padding-left:1.3rem; columns:2; column-gap:1.4rem; font-size:.9rem; }
.manuel-toc ol li, .manuel-toc ul li { margin-bottom:.2rem; }
.manuel-toc a { color:#4338ca; text-decoration:none; font-weight:500; }
.manuel-toc a:hover { text-decoration:underline; }

/* ─── Sections de contenu ────────────────────────────────────────────── */
.manuel-section {
  background:#fff; border:1.5px solid #e2e8f0; border-radius:14px;
  padding:1.5rem 1.7rem; margin-bottom:1.2rem; box-shadow:0 2px 10px rgba(15,23,42,.04);
}
.manuel-section h2 {
  margin:0 0 .8rem; font-size:1.25rem; color:#1e1b4b; font-weight:800;
  padding-bottom:.55rem; border-bottom:2px solid #e0e7ff;
  display:flex; align-items:center; gap:.5rem;
}
.manuel-section h3 {
  margin:1.4rem 0 .5rem; font-size:1.02rem; color:#312e81; font-weight:700;
}
.manuel-section h4 {
  margin:1rem 0 .3rem; font-size:.95rem; color:#1e293b; font-weight:700;
}
.manuel-section p, .manuel-section ul, .manuel-section ol {
  font-size:.92rem; color:#334155; margin:.5rem 0;
}
.manuel-section ul, .manuel-section ol { padding-left:1.5rem; }
.manuel-section ul li, .manuel-section ol li { margin-bottom:.25rem; }
.manuel-section strong { color:#0f172a; font-weight:700; }
.manuel-section a { color:#4338ca; }
.manuel-section code {
  background:#f1f5f9; padding:.1rem .35rem; border-radius:4px;
  font-family:Menlo,Monaco,Consolas,monospace; font-size:.85em; color:#312e81;
}
.manuel-section pre {
  background:#0f172a; color:#e2e8f0; padding:.9rem 1.1rem; border-radius:8px;
  overflow-x:auto; font-size:.82rem; line-height:1.5;
}
.manuel-section pre code { background:none; color:inherit; padding:0; font-size:inherit; }

/* ─── Tables ─────────────────────────────────────────────────────────── */
.manuel-section table { width:100%; border-collapse:collapse; margin:.7rem 0 1.2rem; font-size:.88rem; }
.manuel-section table th, .manuel-section table td {
  padding:.55rem .75rem; border-bottom:1px solid #e2e8f0; text-align:left; vertical-align:top;
}
.manuel-section table thead th {
  background:#f8fafc; font-weight:700; color:#1e293b;
  font-size:.78rem; text-transform:uppercase; letter-spacing:.04em;
  border-bottom:2px solid #e2e8f0;
}
.manuel-section table tbody tr:hover { background:#fafbff; }

/* ─── Callouts ───────────────────────────────────────────────────────── */
.callout {
  margin:1rem 0; padding:.85rem 1.1rem; border-radius:10px;
  border-left:4px solid #4f46e5; background:#eef2ff;
  font-size:.9rem;
}
.callout.warn   { background:#fef3c7; border-left-color:#f59e0b; color:#854d0e; }
.callout.danger { background:#fee2e2; border-left-color:#dc2626; color:#991b1b; }
.callout.tip    { background:#dcfce7; border-left-color:#16a34a; color:#166534; }
.callout strong { color:inherit; }

/* ─── Cards (page d'accueil aide) ───────────────────────────────────── */
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1rem; }
.card {
  background:#fff; border:1.5px solid #e2e8f0; border-radius:14px;
  padding:1.3rem 1.5rem; text-decoration:none; color:inherit;
  transition:all .2s; cursor:pointer; box-shadow:0 2px 10px rgba(15,23,42,.04);
}
.card:hover { transform:translateY(-3px); box-shadow:0 8px 24px rgba(79,70,229,.18); border-color:#a5b4fc; }
.card .icon { font-size:2rem; margin-bottom:.5rem; line-height:1; }
.card .title { font-size:1.05rem; font-weight:800; color:#1e1b4b; margin-bottom:.3rem; }
.card .desc  { font-size:.85rem; color:#64748b; line-height:1.45; }

/* ─── Recherche ──────────────────────────────────────────────────────── */
.search-bar {
  position:sticky; top:39px; z-index:10; background:#f1f5f9;
  padding:.75rem 0; margin-bottom:1rem;
}
.search-bar input {
  width:100%; padding:.65rem 1rem .65rem 2.6rem; border:1.5px solid #cbd5e1; border-radius:10px;
  font-size:.92rem; background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") .75rem center/16px no-repeat;
}
.search-bar input:focus { outline:none; border-color:#4f46e5; box-shadow:0 0 0 3px rgba(79,70,229,.12); }

/* ─── Surlignage de recherche ────────────────────────────────────────── */
.manuel-section.hl { box-shadow:0 0 0 3px rgba(79,70,229,.3); }
.manuel-section.dimmed { opacity:.3; }

/* ─── Badge version ──────────────────────────────────────────────────── */
.doc-version {
  display:inline-flex; align-items:center; gap:.3rem;
  background:#f1f5f9; border:1px solid #e2e8f0; border-radius:6px;
  padding:.2rem .5rem; font-size:.72rem; color:#64748b; font-weight:600;
  margin-left:.5rem; vertical-align:middle;
}

/* ─── Print ──────────────────────────────────────────────────────────── */
@media print {
  body { background:#fff; }
  .doc-topbar { display:none; }
  .search-bar { display:none; }
  .back, .back-btn, .manuel-hdr-actions { display:none; }
  .manuel-hdr { border-radius:0; box-shadow:none; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .manuel-section { box-shadow:none; page-break-inside:avoid; }
  .manuel-toc { page-break-inside:avoid; }
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width:680px) {
  .manuel-toc ol, .manuel-toc ul { columns:1; }
  .manuel-section { padding:1.1rem 1.2rem; }
  .manuel-hdr { padding:1.1rem 1.2rem; }
  .manuel-hdr h1 { font-size:1.3rem; }
  .doc-topbar { padding:.4rem 1rem; }
}
