/* CPGC Actu — direction artistique tirée du logo :
   bleu nuit institutionnel, globe argenté et son orbite, sérif de presse, laiton pour les épingles. */

@font-face { font-family: "Newsreader"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/newsreader-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/newsreader-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/newsreader-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/newsreader-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 600; font-display: swap; src: url("../fonts/jost-latin-600-normal.woff2") format("woff2"); }

:root {
  --nuit: #0D1444;
  --marine: #1B2568;
  --cobalt: #3A4A9A;
  --ciel: #6F7FD0;
  --argent: #C9CEEA;
  --papier: #F3F4F9;
  --blanc: #FFFFFF;
  --encre: #161B3F;
  --gris: #5C6286;
  --trait: #DEE1EE;
  --laiton: #A8822F;
  --laiton-vif: #D9B25C;
  --laiton-clair: #F8F3E6;
  --danger: #A33A3A;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --r-lg: 18px;
  --r-md: 10px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
  line-height: 1.5;
}
button, input, textarea { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ciel); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================ connexion */
.login-page {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: calc(32px + var(--safe-t)) 22px calc(32px + var(--safe-b));
  color: var(--blanc);
  background:
    radial-gradient(ellipse 80% 60% at 30% 12%, #34449A 0%, transparent 60%),
    radial-gradient(ellipse 70% 70% at 80% 100%, #131c5c 0%, transparent 70%),
    var(--nuit);
  overflow: hidden;
  position: relative;
}
.orbits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.orbits ellipse, .orbits path { fill: none; stroke: var(--argent); }
.orbits .o1 { stroke-opacity: .32; stroke-width: 1.4; stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 2.2s .15s var(--ease-out) forwards; }
.orbits .o2 { stroke-opacity: .12; stroke-width: 1; animation: breathe 9s ease-in-out infinite; }
.orbits .o3 { stroke-opacity: .07; stroke-width: 1; }
.orbits .sat { opacity: 0; animation: fade-in .8s 1.6s forwards; }
.orbits .sat-small { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes breathe { 50% { stroke-opacity: .2; } }
@keyframes fade-in { to { opacity: 1; } }

.login { position: relative; width: 100%; max-width: 380px; text-align: center; }
.login-logo {
  width: 168px; height: auto;
  filter: drop-shadow(0 18px 40px rgba(3, 6, 30, .55));
  animation: logo-in .9s var(--ease-spring) both, float 7s 1s ease-in-out infinite;
}
@keyframes logo-in { from { opacity: 0; transform: scale(.85) translateY(10px); } }
@keyframes float { 50% { transform: translateY(-6px); } }
.login-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: 1.2rem; line-height: 1.4;
  color: var(--argent);
  margin: 22px 0 34px;
  animation: rise .7s .35s var(--ease-out) both;
}
.login form { text-align: left; display: grid; gap: 18px; }
.field-in { animation: rise .6s calc(.5s + var(--d) * .08s) var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.login label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; color: #E4E7F6; }
.login input {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid rgba(201, 206, 234, .35);
  background: rgba(255, 255, 255, .07);
  color: var(--blanc);
  font-size: 16px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.login input::placeholder { color: rgba(201, 206, 234, .55); }
.login input:focus { outline: none; border-color: var(--argent); background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 4px rgba(201, 206, 234, .12); }
.login .btn-enter {
  margin-top: 6px; padding: 14px;
  border: 0; border-radius: var(--r-md);
  background: var(--blanc); color: var(--marine);
  font-weight: 600; font-size: 1rem;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .15s var(--ease-out), box-shadow .2s;
}
.login .btn-enter::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(111, 127, 208, .25) 50%, transparent 70%);
  transform: translateX(-100%);
}
.login .btn-enter:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .35); transform: translateY(-1px); }
.login .btn-enter:hover::after { animation: sheen .9s var(--ease-out); }
.login .btn-enter:active { transform: translateY(1px) scale(.99); }
.login .btn-enter.loading::after { animation: sheen 1s linear infinite; }
@keyframes sheen { to { transform: translateX(100%); } }
.login-error {
  background: rgba(163, 58, 58, .22);
  border: 1px solid rgba(255, 150, 150, .35);
  color: #FFE1E1;
  padding: 10px 14px; border-radius: var(--r-md);
  font-size: .92rem;
  animation: shake .45s var(--ease-out);
}
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ============================================================ en-tête */
.masthead {
  background: radial-gradient(ellipse 60% 140% at 0% 0%, #2C3A8A 0%, transparent 70%), var(--nuit);
  color: var(--blanc);
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--safe-t);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
  overflow: hidden;
}
.mast-orbit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mast-orbit path { fill: none; stroke: var(--argent); stroke-opacity: .13; stroke-width: 1; }
.mast-orbit circle { fill: #E6E9FA; opacity: .55; }
.masthead-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.bar { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 42px; height: auto; display: block; transition: transform .5s var(--ease-spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; letter-spacing: .01em; }
.drive-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(201, 206, 234, .35); border-radius: 999px;
  text-decoration: none; font-size: .92rem; font-weight: 500;
  color: #E9EBF8;
  transition: background .2s, border-color .2s, transform .2s var(--ease-out);
}
.drive-link:hover { background: rgba(255, 255, 255, .08); border-color: var(--argent); transform: translateY(-1px); }
.who { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--argent); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600; font-size: .85rem;
  background: var(--argent); color: var(--marine);
  flex: none;
}
.who a { color: var(--argent); text-decoration: none; display: inline-flex; }
.who a:hover { color: var(--blanc); text-decoration: underline; }
.logout-icon { display: none; }

.tabs {
  position: relative; display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none; margin: 0 -8px;
  scroll-behavior: smooth;
}
.tabs.scrolls {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 12px 15px;
  background: none; border: 0;
  color: rgba(226, 229, 246, .7);
  font-weight: 500; font-size: .96rem;
  white-space: nowrap; cursor: pointer;
  transition: color .2s;
}
.tab:hover, .tab[aria-selected="true"] { color: var(--blanc); }
.tab-ink {
  position: absolute; left: 0; bottom: 0;
  height: 3px; width: 10px;
  border-radius: 3px 3px 0 0;
  background: var(--blanc);
  transition: transform .45s var(--ease-spring), width .45s var(--ease-spring);
  pointer-events: none;
}
.count {
  display: inline-block;
  font-size: .76rem; font-weight: 600; line-height: 1.5;
  padding: 0 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}
.tab-pins svg { color: var(--laiton-vif); }
.tab-settings { margin-left: auto; }
.dot-new {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8FA2FF;
  box-shadow: 0 0 0 0 rgba(143, 162, 255, .7);
  animation: ping 2.4s ease-out infinite;
}
.dot-warn { width: 7px; height: 7px; border-radius: 50%; background: #E89A7B; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(143, 162, 255, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(143, 162, 255, 0); } }
.bump { animation: bump .5s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* chips (mobile) et barre du bas : cachés sur ordinateur */
.chips, .bottom-nav, .ptr { display: none; }

/* ============================================================ contenu */
main { max-width: 1120px; margin: 0 auto; padding: 36px 24px 80px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 52px; align-items: start; }
.column { min-width: 0; }

.welcome {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(110deg, var(--marine), var(--cobalt));
  color: var(--blanc);
  position: relative; overflow: hidden;
  animation: rise .6s var(--ease-out) both;
}
.welcome svg.orb { width: 44px; height: 44px; flex: none; }
.welcome svg.orb ellipse { fill: none; stroke: var(--argent); stroke-width: 1.4; stroke-opacity: .7; }
.welcome svg.orb .planet { fill: #E6E9FA; }
.welcome svg.orb .moon { fill: var(--laiton-vif); }
.welcome p { margin: 0; font-size: .96rem; line-height: 1.4; }
.welcome strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; display: block; }
.welcome button { margin-left: auto; background: none; border: 0; color: var(--argent); cursor: pointer; padding: 6px; border-radius: 50%; }
.welcome button:hover { color: var(--blanc); background: rgba(255, 255, 255, .1); }

.view-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.view-head h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: 2.3rem; line-height: 1.1;
  margin: 0; letter-spacing: -.01em;
}
.view-head .meta { color: var(--gris); font-size: .9rem; margin: 6px 0 0; }
.view-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--blanc);
  border: 1px solid var(--trait); border-radius: 999px;
  padding: 7px 14px;
  color: var(--gris);
  transition: border-color .2s, box-shadow .2s;
}
.search input { border: 0; outline: 0; background: none; width: 170px; font-size: .93rem; color: var(--encre); }
.search:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(58, 74, 154, .1); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--trait);
  background: var(--blanc);
  font-size: .92rem; font-weight: 500;
  color: var(--marine);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s var(--ease-out);
}
.btn:hover { border-color: var(--cobalt); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--marine); border-color: var(--marine); color: var(--blanc); }
.btn-primary:hover { background: var(--cobalt); border-color: var(--cobalt); }
.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { padding: 12px 16px; border-radius: var(--r-md); background: #FBEDEA; color: #7A2E22; font-size: .93rem; margin-bottom: 16px; }

/* ---------- liste d'articles */
.sheet { background: var(--blanc); border-radius: var(--r-lg); border: 1px solid var(--trait); overflow: hidden; }
.article {
  position: relative;
  padding: 22px 26px 16px;
  border-top: 1px solid var(--trait);
  transition: background .35s;
}
.article:first-child { border-top: 0; }
.enter .article { animation: rise .5s calc(min(var(--i), 10) * 40ms) var(--ease-out) both; }
.enter.from-right .article { animation-name: from-right; }
.enter.from-left .article { animation-name: from-left; }
@keyframes from-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-28px); } }

.article.is-pinned { background: var(--laiton-clair); }
.article.is-pinned::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--laiton);
  transform-origin: top;
}
.article.just-pinned::before { animation: grow-y .5s var(--ease-out); }
.article.just-pinned::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(217, 178, 92, .28) 50%, transparent 80%);
  animation: sweep .9s var(--ease-out) forwards;
}
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.article.leaving { animation: leave .4s var(--ease-out) forwards; overflow: hidden; }
@keyframes leave { to { opacity: 0; transform: translateX(40px); } }

.article .kicker { display: flex; gap: 10px; align-items: center; font-size: .84rem; color: var(--gris); margin-bottom: 4px; }
.article .kicker b { font-weight: 600; color: var(--cobalt); }
.tag-new {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600; font-size: .78rem; color: var(--cobalt);
}
.tag-new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ciel); }
.article h2 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.3; margin: 0 0 6px; }
.article h2 a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease-out), color .2s; }
.article h2 a:hover { background-size: 100% 1px; }
.article.is-read h2 a { color: #6B7096; }
.article p.summary {
  font-family: var(--serif);
  font-size: 1.02rem; line-height: 1.55;
  color: #3D4266;
  margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.actions { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-left: -8px; }
.act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 999px;
  background: none; border: 0;
  font-size: .89rem; font-weight: 500;
  color: var(--gris);
  cursor: pointer;
  transition: color .2s, background .2s;
}
.act:hover { color: var(--marine); background: rgba(58, 74, 154, .07); }
.act.pinned { color: var(--laiton); }
.act.pinned:hover { background: rgba(168, 130, 47, .1); }
.act.pinned svg { fill: currentColor; }
.act.has-comments { color: var(--cobalt); }
.act .pop { animation: pin-drop .6s var(--ease-spring); }
@keyframes pin-drop { 0% { transform: translateY(-10px) rotate(-25deg) scale(1.3); } 60% { transform: translateY(1px) rotate(4deg); } }

.thread-wrap { display: grid; grid-template-rows: 1fr; }
.thread-wrap.opening { animation: open-rows .35s var(--ease-out); }
@keyframes open-rows { from { grid-template-rows: 0fr; opacity: 0; } }
.thread-wrap > div { overflow: hidden; }
.thread { margin-top: 12px; padding: 16px 18px; border-radius: var(--r-md); background: var(--papier); }
.article.is-pinned .thread { background: #F1EAD7; }
.comment { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin-bottom: 14px; }
.comment.new { animation: rise .45s var(--ease-spring); }
.comment .avatar { width: 30px; height: 30px; font-size: .78rem; background: var(--marine); color: var(--blanc); }
.comment header { display: flex; gap: 8px; align-items: baseline; font-size: .85rem; }
.comment header strong { font-weight: 600; }
.comment header time { color: var(--gris); }
.comment header button { margin-left: auto; background: none; border: 0; color: var(--gris); cursor: pointer; font-size: .82rem; padding: 0; }
.comment header button:hover { color: var(--danger); text-decoration: underline; }
.comment p { margin: 2px 0 0; font-size: .96rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { display: flex; gap: 8px; align-items: flex-end; }
.reply textarea {
  flex: 1;
  min-height: 42px; max-height: 180px;
  resize: none;
  padding: 10px 12px;
  border-radius: var(--r-md); border: 1px solid var(--trait);
  background: var(--blanc);
  font-size: .95rem; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.reply textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(58, 74, 154, .1); }

.empty { text-align: center; padding: 56px 24px; color: var(--gris); }
.empty h2 { font-family: var(--serif); font-weight: 500; color: var(--encre); font-size: 1.4rem; margin: 14px 0 6px; }
.empty p { margin: 0 auto; max-width: 42ch; }
.empty .orb { width: 64px; height: 64px; }
.orb ellipse { fill: none; stroke: var(--argent); stroke-width: 1.5; }
.orb .planet { fill: var(--argent); }
.orb .moon { fill: var(--cobalt); }
.orb .moon-g { transform-origin: 32px 32px; animation: orbit 6s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

.skeleton .line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eceef6, #f7f8fc, #eceef6); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- activité */
.activity { position: sticky; top: 150px; }
.activity h2 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 6px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--trait); }
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.activity-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: .88rem; animation: rise .45s calc(var(--i, 0) * 50ms) var(--ease-out) both; }
.activity-list .avatar { width: 26px; height: 26px; font-size: .72rem; background: var(--marine); color: var(--blanc); }
.activity-list .who-line { color: var(--gris); }
.activity-list .who-line strong { color: var(--encre); font-weight: 600; }
.activity-list q { display: block; font-family: var(--serif); font-style: italic; font-size: .98rem; line-height: 1.4; color: #2E3358; margin: 3px 0 4px; quotes: "« " " »"; }
.activity-list a { display: block; color: var(--cobalt); text-decoration: none; line-height: 1.35; }
.activity-list a:hover { text-decoration: underline; }
.activity-list .none { grid-column: 1 / -1; color: var(--gris); font-size: .9rem; }

/* ---------- réglages */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.panel, .column { min-width: 0; }
.panel { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-lg); padding: 24px 26px; animation: rise .5s calc(var(--i, 0) * 70ms) var(--ease-out) both; }
.panel h2 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin: 0 0 4px; }
.panel > p { margin: 0 0 18px; color: var(--gris); font-size: .94rem; }
.add-form { display: grid; grid-template-columns: 1fr 200px auto; gap: 10px; align-items: end; }
.field label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 5px; }
.field input { width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--trait); background: var(--blanc); transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(58, 74, 154, .1); }
.form-error { color: var(--danger); font-size: .9rem; margin: 10px 0 0; }

.catalog { display: grid; gap: 16px; }
.catalog h3 { font-size: .95rem; font-weight: 600; margin: 0 0 8px; }
.catalog .row { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px 7px 10px;
  border-radius: 999px; border: 1px dashed #B9BFDC;
  background: var(--blanc); color: var(--marine);
  font-size: .9rem; font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s var(--ease-out);
}
.suggest:hover { border-color: var(--cobalt); border-style: solid; }
.suggest:active { transform: scale(.96); }
.suggest.added { border-style: solid; border-color: transparent; background: #E8EBF7; color: var(--cobalt); cursor: default; }
.suggest.added svg { animation: bump .5s var(--ease-spring); }

.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--trait); }
.feed-row:first-child { border-top: 0; }
.feed-row .info { flex: 1; min-width: 0; }
.feed-row .name { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.feed-row .name button { background: none; border: 0; padding: 2px; color: var(--gris); cursor: pointer; display: inline-flex; }
.feed-row .name button:hover { color: var(--marine); }
.feed-row .url { font-size: .85rem; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .err { font-size: .84rem; color: var(--danger); }
.feed-row .via { font-size: .84rem; color: var(--laiton); }
.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--trait);
  background: var(--blanc); color: var(--gris);
  cursor: pointer;
  transition: color .2s, border-color .2s, transform .15s var(--ease-out);
}
.icon-btn:hover { color: var(--marine); border-color: var(--cobalt); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.del:hover { color: var(--danger); border-color: var(--danger); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b));
  transform: translate(-50%, 20px) scale(.96);
  background: var(--encre); color: var(--blanc);
  padding: 11px 18px; border-radius: 999px;
  font-size: .93rem;
  box-shadow: 0 10px 30px rgba(13, 20, 68, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .35s var(--ease-spring);
  z-index: 50; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ============================================================ tablette */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .activity { display: none; }
  .view-activite .activity-list { display: grid; }
}

/* ============================================================ mobile */
@media (max-width: 720px) {
  body.app { padding-bottom: calc(68px + var(--safe-b)); }
  .masthead-inner { padding: 0 16px; }
  .bar { height: 58px; gap: 8px; }
  .brand img { width: 36px; }
  .brand span { font-size: 1.22rem; }
  .drive-link { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .drive-link span, .who .name, .logout-text, .who .avatar { display: none; }
  .who a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
  .who a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
  .logout-icon { display: block; width: 21px; height: 21px; }
  .tabs { display: none; }
  .mast-orbit { opacity: .8; }

  /* chips des flux */
  .chips {
    display: flex; gap: 8px;
    position: sticky; top: calc(58px + var(--safe-t)); z-index: 15;
    padding: 10px 16px;
    overflow-x: auto; scrollbar-width: none;
    background: rgba(243, 244, 249, .88);
    -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
    border-bottom: 1px solid rgba(222, 225, 238, .8);
    scroll-snap-type: x proximity;
  }
  .chips::-webkit-scrollbar { display: none; }
  body.no-chips .chips { display: none; }
  .chip {
    flex: none; scroll-snap-align: center;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border-radius: 999px; border: 1px solid var(--trait);
    background: var(--blanc); color: var(--marine);
    font-size: .92rem; font-weight: 500;
    transition: background .25s, color .25s, border-color .25s, transform .15s var(--ease-out);
  }
  .chip:active { transform: scale(.95); }
  .chip[aria-selected="true"] { background: var(--marine); border-color: var(--marine); color: var(--blanc); }
  .chip .dot-new { width: 6px; height: 6px; }

  /* barre du bas */
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 8px calc(6px + var(--safe-b));
    background: rgba(13, 20, 68, .94);
    -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 -8px 30px rgba(13, 20, 68, .18);
  }
  .nav-btn {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 0 5px;
    background: none; border: 0;
    color: rgba(201, 206, 234, .7);
    font-size: .72rem; font-weight: 500;
    cursor: pointer;
    transition: color .2s;
  }
  .nav-btn svg.i { width: 23px; height: 23px; transition: transform .35s var(--ease-spring); }
  .nav-btn[aria-current="true"] { color: var(--blanc); }
  .nav-btn[aria-current="true"] svg.i { transform: translateY(-2px); }
  .nav-btn[aria-current="true"]::before {
    content: ""; position: absolute; top: 2px; left: 50%;
    width: 46px; height: 32px; margin-left: -23px;
    border-radius: 999px;
    background: rgba(201, 206, 234, .14);
    animation: pill-in .35s var(--ease-spring);
  }
  @keyframes pill-in { from { transform: scale(.5); opacity: 0; } }
  .nav-btn .badge {
    position: absolute; top: 3px; left: calc(50% + 7px);
    min-width: 17px; height: 17px; padding: 0 5px;
    border-radius: 999px;
    background: var(--laiton-vif); color: var(--nuit);
    font-size: .68rem; font-weight: 600; line-height: 17px; text-align: center;
  }
  .nav-btn .badge.blue { background: #8FA2FF; }

  /* tirer pour actualiser */
  .ptr {
    display: grid; place-items: center;
    position: fixed; left: 50%; top: calc(112px + var(--safe-t)); z-index: 14;
    width: 40px; height: 40px; margin-left: -20px;
    border-radius: 50%;
    background: var(--blanc);
    box-shadow: 0 6px 18px rgba(13, 20, 68, .18);
    transform: translateY(-70px) scale(.6);
    opacity: 0;
    pointer-events: none;
  }
  .ptr svg { width: 28px; height: 28px; }
  .ptr ellipse { fill: none; stroke: var(--cobalt); stroke-width: 2; }
  .ptr circle { fill: var(--marine); }
  .ptr.armed svg { transform: scale(1.12); transition: transform .2s var(--ease-spring); }
  .ptr.loading svg { animation: spin .9s linear infinite; }

  main { padding: 18px 12px 32px; }
  .welcome { margin-bottom: 18px; padding: 12px 14px; }
  .welcome svg.orb { width: 38px; height: 38px; }
  .view-head { gap: 12px; margin-bottom: 16px; }
  .view-head h1 { font-size: 1.85rem; }
  .view-head .tools { margin-left: 0; width: 100%; }
  .search { flex: 1; padding: 9px 14px; }
  .search input { width: 100%; font-size: 16px; }
  .btn-refresh span { display: none; }
  .btn-refresh { width: 42px; height: 42px; padding: 0; }

  .sheet { border-radius: 16px; }
  .article { padding: 18px 16px 12px; }
  .article h2 { font-size: 1.2rem; }
  .article p.summary { font-size: 1rem; }
  .actions { gap: 2px 6px; }
  .act { padding: 10px 10px; font-size: .9rem; }
  .thread { padding: 14px; }
  .reply textarea { font-size: 16px; }
  .reply .btn { height: 44px; }

  .add-form { grid-template-columns: 1fr; }
  .field input { font-size: 16px; padding: 12px; }
  .add-form .btn { height: 46px; }
  .panel { padding: 20px 16px; }
  .feed-row { gap: 8px; }
  .icon-btn { width: 40px; height: 40px; }

  .view-activite .activity-list { background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; padding: 18px 16px; gap: 20px; }

  .toast { bottom: calc(84px + var(--safe-b)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .orbits .o1 { stroke-dashoffset: 0; }
  .orbits .sat, .mast-orbit circle { display: none; }
}
