/* Charte hemicycle.org : noir et blanc, Marianne, titres en capitales. */
@font-face { font-family: Marianne; src: url("/static/fonts/Marianne-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: Marianne; src: url("/static/fonts/Marianne-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Marianne; src: url("/static/fonts/Marianne-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Marianne; src: url("/static/fonts/Marianne-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Marianne; src: url("/static/fonts/Marianne-Bold_Italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --black: #000;
  --ink: #161616;
  --white: #fff;
  --grey: #7a7a7a;
  --line: #e5e5e5;
  --soft: #f6f6f6;
  --green: #18a058;
  --red: #e1000f;
  --radius: 5px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
body { background: var(--white); color: var(--ink); font: 16px/1.5 Marianne, system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: 0.55; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
a { color: inherit; }
.hidden { display: none !important; }

/* ------------------------------------------------------------- En-tête */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 32px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topbar .logo { height: 26px; }
.topbar-tag { padding-left: 14px; border-left: 1px solid var(--line); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who img { width: 28px; height: 28px; border-radius: 50%; background: var(--line); }

/* ------------------------------------------------------------- Boutons */
.btn, .btn-light, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.btn { background: var(--black); color: var(--white); }
.btn:hover:not(:disabled) { background: #333; }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: #e6e6e6; }
.btn-outline { height: 36px; padding: 0 14px; font-size: 13px; border: 1px solid var(--black); }
.btn-outline:hover:not(:disabled) { background: var(--soft); }
.btn-outline.danger { color: var(--red); border-color: var(--red); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* --------------------------------------------------------- Page publique */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 48px 32px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0.4) 100%),
    url("/static/hero.jpg") center / cover no-repeat,
    var(--black);
}
.hero-inner { width: min(1100px, 100%); margin: 0 auto; }
.kicker { font-size: 20px; font-weight: 700; text-transform: uppercase; }
.hero h1 { margin: 6px 0 18px; font-size: clamp(34px, 5vw, 48px); font-style: italic; line-height: 1.1; text-transform: uppercase; }
.lead { max-width: 560px; margin-bottom: 30px; font-weight: 300; color: rgba(255, 255, 255, 0.85); }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.downloads .btn-light small { font-weight: 400; text-transform: none; opacity: 0.6; }
.note { margin-top: 18px; max-width: 560px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* ------------------------------------------------------------ Admin */
.page { width: min(1100px, 100%); margin: 0 auto; padding: 36px 32px 64px; }
.page h1 { font-size: 32px; text-transform: uppercase; margin-bottom: 6px; }
.page h2 { font-size: 22px; text-transform: uppercase; }
.muted { color: var(--grey); }
.section { margin-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }

.tabs { display: flex; gap: 6px; margin-top: 24px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 16px; font-weight: 700; text-transform: uppercase; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { border-color: var(--black); }

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 28px;
  text-align: center;
  border: 2px dashed #c9c9c9;
  border-radius: var(--radius);
  background: var(--soft);
  cursor: pointer;
}
.dropzone.over { border-color: var(--black); background: #eee; }
.dropzone strong { text-transform: uppercase; }
.dropzone small { color: var(--grey); }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--black); }

.progress { flex: 1; min-width: 200px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--black); transition: width 0.2s; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); font-weight: 700; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--soft);
  border: 1px solid var(--line);
}
.badge.on { background: var(--black); color: var(--white); border-color: var(--black); }
.badge.update { background: #fff4d6; border-color: #f0c040; }
.mod-title { display: flex; align-items: center; gap: 10px; }
.mod-title img, .mod-ph { flex: none; width: 32px; height: 32px; border-radius: var(--radius); background: var(--soft); }
.mod-title .sub { display: block; font-size: 13px; color: var(--grey); }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.input {
  flex: 1;
  min-width: 240px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #c9c9c9;
  border-radius: var(--radius);
  background: var(--white);
}
.input:focus { outline: 2px solid var(--black); outline-offset: -1px; }
.empty { padding: 28px; text-align: center; color: var(--grey); background: var(--soft); border-radius: var(--radius); }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
}
.toast.error { background: var(--red); }

.login-box { max-width: 460px; margin: 80px auto; text-align: center; }
.login-box h1 { margin-bottom: 12px; }
.login-box p { margin-bottom: 26px; color: var(--grey); }
.error-text { color: var(--red); margin-top: 16px; }

@media (max-width: 720px) {
  .topbar, .page, .hero { padding-left: 16px; padding-right: 16px; }
  .topbar-tag, #who-name { display: none; }
  .topbar { gap: 10px; }
  .topbar .logo { height: 22px; }
  table { display: block; overflow-x: auto; }
  .hide-sm { display: none; }
}
