*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F7F6F2;
  --bg-card: #FFFFFF;
  --border: #E5E3DC;
  --border-2: #C8C5BB;
  --text: #1A1917;
  --text-2: #6B6860;
  --text-3: #A8A49B;
  --accent: #3C3489;
  --sidebar-w: 220px;
  --r: 9px;
  --r-sm: 5px;
  --r-lg: 13px;
}

html { font-size: 15px; }
body { font-family: system-ui,-apple-system,'Segoe UI',sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; }

/* ── HEADER ── */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg-card); padding: 0 20px; height: 50px; display: flex; align-items: center; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.back-link { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-2); text-decoration: none; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 5px 10px; transition: all .1s; }
.back-link:hover { border-color: var(--border-2); color: var(--text); }
.btn-propose-nav { font-size: .8rem; font-weight: 500; color: var(--accent); background: rgba(110,97,246,.08); border: 1px solid rgba(110,97,246,.25); border-radius: var(--r-sm); padding: 5px 12px; cursor: pointer; transition: all .1s; }
.btn-propose-nav:hover { background: rgba(110,97,246,.15); border-color: var(--accent); }
.header-logo { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--text); }
.logo-mark { width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid var(--accent); display: inline-block; }

/* ── LAYOUT ── */
.media-layout { display: flex; min-height: calc(100vh - 50px); }

/* ── SIDEBAR ── */
.media-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-card); border-right: 1px solid var(--border);
  padding: 14px 0; position: sticky; top: 50px; height: calc(100vh - 50px); overflow-y: auto;
}
.sidebar-search { display: flex; align-items: center; gap: 7px; margin: 0 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 9px; color: var(--text-3); }
.sidebar-search input { border: none; background: none; outline: none; font-size: .84rem; color: var(--text); width: 100%; }
.sidebar-search input::placeholder { color: var(--text-3); }

.sidebar-section { padding: 10px 10px 8px; border-top: 1px solid var(--border); margin-top: 6px; }
.sidebar-section:first-of-type { border-top: none; margin-top: 0; }
.sidebar-section-label { font-size: .68rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); padding: 0 4px; margin-bottom: 6px; }
.mf-btn { display: flex; align-items: center; gap: 7px; width: 100%; background: none; border: none; border-radius: var(--r-sm); padding: 5px 8px; font-size: .83rem; color: var(--text-2); cursor: pointer; text-align: left; transition: background .1s, color .1s; }
.mf-btn:hover { background: var(--bg); color: var(--text); }
.mf-btn.active { background: var(--bg); color: var(--text); font-weight: 600; }

.tag-filter-wrap { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 4px 4px; }
.tag-filter-btn { padding: 3px 9px; border-radius: 20px; font-size: .74rem; border: 1px solid var(--border); background: none; color: var(--text-2); cursor: pointer; transition: all .1s; }
.tag-filter-btn:hover { border-color: var(--border-2); color: var(--text); }
.tag-filter-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

.sidebar-propose { display: flex; flex-direction: column; gap: 10px; }
.propose-text { font-size: .78rem; color: var(--text-2); line-height: 1.5; padding: 0 4px; }
.btn-signal { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 7px 12px; font-size: .8rem; font-weight: 500; color: var(--text-2); background: none; cursor: pointer; transition: all .1s; }
.btn-signal:hover { border-color: var(--accent); color: var(--accent); }

#signal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); z-index: 50; align-items: center; justify-content: center; padding: 16px; }
.signal-modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; width: min(600px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.18); }
.signal-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); border-radius: 16px 16px 0 0; }
.signal-modal-title { font-size: .9rem; font-weight: 600; color: var(--text); }
.modal-close { background: none; border: 1px solid var(--border); border-radius: 50%; width: 28px; height: 28px; font-size: 1rem; cursor: pointer; color: var(--text-2); display: flex; align-items: center; justify-content: center; transition: all .1s; }
.modal-close:hover { background: var(--bg); color: var(--text); }
#form-signal { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
#form-signal .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#form-signal label { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; font-weight: 500; color: var(--text-2); }
#form-signal input, #form-signal select, #form-signal textarea { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 10px; font-size: .84rem; background: var(--bg); color: var(--text); font-family: inherit; transition: border-color .1s; }
#form-signal input:focus, #form-signal select:focus, #form-signal textarea:focus { outline: none; border-color: var(--border-2); }
.signal-form-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.btn-signal-submit { background: var(--text); color: var(--bg-card); border: none; border-radius: var(--r-sm); padding: 9px 22px; font-size: .85rem; font-weight: 600; cursor: pointer; transition: opacity .1s; }
.btn-signal-submit:hover { opacity: .85; }
.btn-signal-submit:disabled { opacity: .5; cursor: not-allowed; }
.signal-success { font-size: .82rem; color: #1a7a3c; font-weight: 500; }
.signal-error { font-size: .82rem; color: #c0392b; }

/* ── MAIN ── */
.media-main { flex: 1; padding: 28px 28px 60px; min-width: 0; }

.media-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.media-header-left h1 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: 4px; }
.media-subtitle { font-size: .84rem; color: var(--text-2); }
.media-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.feed-count { font-size: .78rem; color: var(--text-3); white-space: nowrap; }
.feed-sort { display: flex; gap: 3px; }
.sort-pill { background: none; border: 1px solid transparent; border-radius: 20px; padding: 4px 11px; font-size: .78rem; color: var(--text-2); cursor: pointer; transition: all .1s; }
.sort-pill:hover { border-color: var(--border); }
.sort-pill.active { background: var(--text); color: #fff; border-color: var(--text); }

.media-notice { display: flex; align-items: flex-start; gap: 9px; background: #FEF9EC; border: 1px solid #F5E28A; border-radius: var(--r-sm); padding: 10px 14px; font-size: .78rem; color: #7A5C00; margin-bottom: 22px; line-height: 1.5; }
.media-notice svg { flex-shrink: 0; margin-top: 1px; }

/* ── FEED ── */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-empty { text-align: center; padding: 64px 20px; color: var(--text-3); font-size: .9rem; }

.feed-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
  display: flex; gap: 0; overflow: hidden; transition: border-color .15s;
}
.feed-item:hover { border-color: var(--border-2); }
.feed-item-stripe { width: 4px; flex-shrink: 0; }
.feed-item-stripe--presse     { background: #0C447C; }
.feed-item-stripe--television { background: #633806; }
.feed-item-stripe--radio      { background: #085041; }

.feed-item-body { flex: 1; padding: 14px 18px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.feed-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-type-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 600; letter-spacing: .03em; padding: 2px 8px; border-radius: 20px; border: 1px solid; white-space: nowrap; }
.feed-type-badge--presse     { color: #0C447C; background: #E6F1FB; border-color: #85B7EB; }
.feed-type-badge--television { color: #633806; background: #FAEEDA; border-color: #FAC775; }
.feed-type-badge--radio      { color: #085041; background: #E1F5EE; border-color: #5DCAA5; }
.feed-source { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.feed-date   { font-size: .75rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }

.feed-title { font-size: .95rem; font-weight: 600; color: var(--text); line-height: 1.35; letter-spacing: -.01em; }
.feed-desc  { font-size: .82rem; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed-item-footer { display: flex; align-items: center; justify-content: space-between; }
.feed-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.feed-tag { font-size: .68rem; padding: 2px 7px; border-radius: 20px; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); }
.feed-link { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--accent); text-decoration: none; font-weight: 500; flex-shrink: 0; transition: opacity .1s; }
.feed-link:hover { opacity: .75; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .media-sidebar { display: none; }
  .media-main { padding: 16px; }
  .media-header { flex-direction: column; gap: 10px; }
}

/* ── FOOTER URGENCE ── */
.site-footer { border-top: 1px solid var(--border); }
.footer-urgence { display: flex; align-items: center; gap: 7px; padding: 10px 20px; background: #FFF8F0; border-bottom: 1px solid #FFE4C4; font-size: .78rem; color: #7A4500; flex-wrap: wrap; }
.footer-urgence svg { flex-shrink: 0; stroke: #C47A00; }
.footer-urgence a { color: #7A4500; }
.footer-urgence a:hover { text-decoration: underline; }
