@font-face { font-family: Moderat; src: url(moderat-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Moderat; src: url(moderat-black.woff2) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --marine: #002f84;
  --rose: #ed1a92;
  --bleu: #1890d7;
  --saumon: #ff959a;
  --bleu-pale: #dbe5fa;
  --rose-pale: #ffe6f4;
  --encre: #1c2340;
  --gris: #657184;
  --ligne: #e3e8f2;
  --fond: #f6f7fb;
  --carte: #ffffff;
  --rayon: 14px;
  --ombre: 0 1px 2px rgb(0 47 132 / 6%), 0 4px 16px rgb(0 47 132 / 6%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 16px/1.5 Moderat, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête ---------- */
.top { background: #fff; border-bottom: 1px solid var(--ligne); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: block; line-height: 0; }
.brand img { height: 52px; width: auto; }
.tag {
  font-weight: 900; color: var(--marine); font-size: 15px; letter-spacing: .02em;
  padding: 6px 14px; border-radius: 999px; background: var(--rose-pale); white-space: nowrap;
}
.tag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--rose); vertical-align: 1px; }

/* ---------- Bandeau ---------- */
.hero { background: var(--marine); color: #fff; position: relative; overflow: hidden; }
.hero .wrap { padding-top: 28px; padding-bottom: 32px; position: relative; }
.hero::after {
  content: ""; position: absolute; right: max(16px, calc(50% - 560px)); top: 18px;
  width: 84px; height: 84px; background: url(stars-jaunes.svg) no-repeat center / contain; opacity: .9;
}
.hero h1 {
  margin: 6px 0 4px; font-weight: 900; font-size: clamp(24px, 4vw, 38px); line-height: 1.15;
  padding-right: 96px; overflow-wrap: anywhere;
}
.hero h1::after { content: ""; display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--rose); margin-top: 14px; }
.hero .count { margin: 12px 0 0; color: var(--bleu-pale); font-size: 14px; }

.crumbs { font-size: 14px; color: var(--bleu-pale); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding-right: 96px; }
.crumbs a { color: #fff; text-decoration: none; opacity: .85; }
.crumbs a:hover { opacity: 1; text-decoration: underline; }
.crumbs .sep { opacity: .5; }

/* ---------- Barre d'outils ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; margin: 24px 0 16px; }
.search { flex: 1; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gris); pointer-events: none; }
.search input {
  width: 100%; font: inherit; color: var(--encre); background: #fff;
  border: 1.5px solid var(--ligne); border-radius: 999px; padding: 11px 16px 11px 42px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--bleu); box-shadow: 0 0 0 4px rgb(24 144 215 / 15%); }
.views { display: flex; background: #fff; border: 1.5px solid var(--ligne); border-radius: 999px; padding: 3px; }
.views button {
  font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--gris); cursor: pointer;
  padding: 7px 12px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
}
.views button svg { width: 16px; height: 16px; }
.views button[aria-pressed="true"] { background: var(--marine); color: #fff; }

/* ---------- Liste ---------- */
.list { list-style: none; margin: 0 0 40px; padding: 0; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.list li + li { border-top: 1px solid var(--ligne); }
.item { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 16px; padding: 12px 20px; text-decoration: none; transition: background .12s; }
.item:hover, .item:focus-visible { background: #f0f5ff; outline: none; }
.item:hover .name { color: var(--marine); }
.name { font-weight: 400; overflow-wrap: anywhere; }
.item.dir .name { font-weight: 900; color: var(--marine); }
.sub { display: block; font-size: 13px; color: var(--gris); font-weight: 400; }
.meta, .size { font-size: 14px; color: var(--gris); white-space: nowrap; font-variant-numeric: tabular-nums; }
.size { min-width: 72px; text-align: right; }

.ico { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; flex: none;
  font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #fff; background: var(--gris); }
.ico img { width: 100%; height: 100%; object-fit: contain; background: var(--fond); }
.ico:has(img) { border: 1px solid var(--ligne); }
.ico.dir { background: var(--bleu-pale); color: var(--marine); }
.ico.dir svg { width: 26px; height: 26px; }
.ico.pdf { background: #d93025; }
.ico.doc { background: #2b579a; }
.ico.xls { background: #217346; }
.ico.ppt { background: #d24726; }
.ico.img { background: var(--bleu); }
.ico.vid { background: #7b3fe4; }
.ico.aud { background: #0f9d8a; }
.ico.zip { background: #6b7280; }
.ico.art { background: var(--rose); }

.empty { text-align: center; color: var(--gris); padding: 48px 16px; }
.empty svg { width: 40px; height: 40px; color: var(--bleu-pale); display: block; margin: 0 auto 8px; }

/* ---------- Grille ---------- */
body.grid .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; background: transparent; box-shadow: none; overflow: visible; }
body.grid .list li + li { border-top: 0; }
body.grid .item {
  grid-template-columns: 1fr; gap: 10px; padding: 10px; height: 100%;
  background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); align-content: start;
}
body.grid .item:hover { background: #fff; box-shadow: 0 0 0 2px var(--bleu), var(--ombre); }
body.grid .ico { width: 100%; height: auto; aspect-ratio: 4 / 3; font-size: 18px; }
body.grid .ico.dir svg { width: 52px; height: 52px; }
body.grid .ico img { object-fit: contain; background: var(--fond); }
body.grid .name { font-size: 14px; line-height: 1.35; }
body.grid .meta { display: none; }
body.grid .size { text-align: left; min-width: 0; font-size: 13px; }

/* ---------- Pied de page ---------- */
footer { background: var(--marine); color: var(--bleu-pale); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
footer img { height: 40px; width: auto; }
footer a { color: #fff; }
footer p { margin: 0; }

.hidden { display: none !important; }

@media (max-width: 720px) {
  .top .wrap { min-height: 64px; }
  .brand img { height: 40px; }
  .tag { font-size: 13px; padding: 5px 10px; }
  .hero::after { width: 56px; height: 56px; top: 14px; }
  .hero h1, .crumbs { padding-right: 64px; }
  .item { grid-template-columns: 44px 1fr auto; gap: 12px; padding: 10px 14px; }
  .ico { width: 44px; height: 44px; }
  .item .meta { display: none; }
  .views .lbl { display: none; }
  body.grid .list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
