/* ============================================================
   Adnimi — Home style.css (v11)
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

:root {
  --brand: #f97316;
  --brand-rgb: 249,115,22;
  --brand-dark: #c2410c;
  --brand-light: #fff7ed;
  --brand-soft: #ffedd5;
  --brand-deep: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-glow: rgba(var(--brand-rgb), 0.18);
  --text: #0f1419;
  --text-2: #536471;
  --text-3: #8b98a5;
  --border: #eff3f4;
  --border-soft: #f7f9f9;
  --hover: rgba(0,0,0,0.03);
  --bg: #ffffff;
  --bg-soft: #f7f9f9;
  --shadow: rgba(0,0,0,0.08);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.10);
  --shadow-lg: 0 16px 44px rgba(0,0,0,0.14);
  --shadow-brand: 0 8px 28px rgba(var(--brand-rgb), 0.28);
  --fs: 1;
}

/* ---------- Couleurs d'accent ---------- */
html[data-accent="blue"]   { --brand:#2563eb; --brand-rgb:37,99,235;  --brand-dark:#1d4ed8; --brand-light:#eff6ff; --brand-soft:#dbeafe; }
html[data-accent="green"]  { --brand:#16a34a; --brand-rgb:22,163,74;  --brand-dark:#15803d; --brand-light:#f0fdf4; --brand-soft:#dcfce7; }
html[data-accent="violet"] { --brand:#7c3aed; --brand-rgb:124,58,237; --brand-dark:#6d28d9; --brand-light:#f5f3ff; --brand-soft:#ede9fe; }
html[data-accent="pink"]   { --brand:#db2777; --brand-rgb:219,39,119; --brand-dark:#be185d; --brand-light:#fdf2f8; --brand-soft:#fce7f3; }

/* ---------- Thème sombre ---------- */
html[data-theme="dark"] {
  --text: #e7e9ea;
  --text-2: #8b949e;
  --text-3: #71767b;
  --border: #2f3336;
  --border-soft: #1f2225;
  --hover: rgba(255,255,255,0.04);
  --bg: #000000;
  --bg-soft: #16181c;
  --brand-light: color-mix(in srgb, var(--brand) 14%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 24%, #000);
  --brand-dark: color-mix(in srgb, var(--brand) 72%, #fff);
  --shadow: rgba(0,0,0,0.5);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.55);
  --shadow-lg: 0 16px 44px rgba(0,0,0,0.65);
}

/* ---------- Accessibilité ---------- */
html[data-contrast="high"] { --text:#000; --text-2:#1f2933; --text-3:#3e4c59; --border:#9aa5b1; }
html[data-theme="dark"][data-contrast="high"] { --text:#fff; --text-2:#e5e7eb; --text-3:#cbd5e1; --border:#8b98a5; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}
button { font-family: inherit; }

/* ============ BANDEAU HORS LIGNE ============ */
.offline-banner {
  position: sticky; top: 0; z-index: 250;
  background: #b45309; color: #fff; text-align: center;
  font-size: 12.5px; font-weight: 700; padding: 8px 12px;
}

/* ============ TOPBAR ============ */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 6px; max-width: 640px; margin: 0 auto; width: 100%;
}
.topbar-greeting { font-size: calc(14px * var(--fs)); font-weight: 700; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.account-btn, .icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--bg-soft); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, transform .15s, color .15s;
}
.account-btn:hover, .icon-btn:hover { background: var(--brand-light); color: var(--brand); }
.account-btn:active, .icon-btn:active { transform: scale(.92); }

/* ============ BARRE RAPIDE (paramètres) ============ */
.quick-bar {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  max-width: 640px; margin: 0 auto; padding: 6px 16px 4px;
}
.quick-bar::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 100px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text-2); cursor: pointer;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.quick-chip:hover { border-color: var(--brand); color: var(--brand); }
.quick-chip.on { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.quick-chip.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.quick-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); display: inline-block; }

/* ============ HERO ============ */
.hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 20px 28px; max-width: 640px; margin: 0 auto; width: 100%; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 420px; height: 420px; max-width: 95vw;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 65%);
  pointer-events: none; z-index: 0; filter: blur(20px);
}
.hero-badge {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: var(--bg); color: var(--brand-dark);
  border: 1px solid var(--brand-soft); border-radius: 100px;
  font-size: 12.5px; font-weight: 700; text-decoration: none; letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.10); margin-bottom: 26px;
  transition: all .22s cubic-bezier(.22,1,.36,1);
}
html[data-theme="dark"] .hero-badge { background: var(--bg-soft); }
.hero-badge:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 22px rgba(var(--brand-rgb), 0.22); }
.hero-badge svg { transition: transform .25s ease; }
.hero-badge:hover svg { transform: translateX(3px); }
.hero-badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: heroDot 2s infinite;
}
@keyframes heroDot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.hero-logo-link { position: relative; z-index: 2; display: block; border-radius: 20px; transition: transform .35s cubic-bezier(.22,1,.36,1); }
.hero-logo-link:hover { transform: scale(1.03); }
.hero-logo {
  width: 240px; max-width: 70vw; height: auto; margin-bottom: 30px;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
  animation: logoIn .6s cubic-bezier(.22,1,.36,1);
  filter: drop-shadow(0 12px 30px rgba(var(--brand-rgb), 0.20));
}
@keyframes logoIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }

/* ============ RECHERCHE ============ */
.search-wrap { position: relative; width: 100%; max-width: 560px; z-index: 3; }
.search-bar {
  display: flex; align-items: center; gap: 12px; background: var(--bg-soft);
  border: 1.5px solid transparent; border-radius: 100px; padding: 13px 18px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-bar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12); background: var(--bg); }
.search-bar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: calc(15.5px * var(--fs)); color: var(--text); font-family: inherit; min-width: 0;
}
.search-bar input::placeholder { color: var(--text-3); }
.icon-search { color: var(--text-3); flex-shrink: 0; }
.icon-mic {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  display: flex; align-items: center; flex-shrink: 0; padding: 6px; border-radius: 50%;
  transition: color .15s, background .15s, transform .15s;
}
.icon-mic:hover { color: var(--brand); background: var(--brand-light); }
.icon-mic.listening { color: var(--brand); background: var(--brand-light); animation: pulseMic 1.1s infinite; }
@keyframes pulseMic { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ============ SUGGESTIONS ============ */
.suggestions-desktop {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14); list-style: none; overflow: hidden; z-index: 40;
  animation: dropdownIn .18s ease;
}
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.suggestions-desktop.visible { display: block; }
.suggestions-desktop li, .suggestions-mobile li[data-s] { cursor: pointer; display: flex; align-items: center; gap: 12px; transition: background .12s; }
.suggestions-desktop li { padding: 12px 18px; font-size: 14.5px; color: var(--text); }
.suggestions-desktop li:hover, .suggestions-desktop li.active { background: var(--hover); }
.suggestions-desktop li svg { color: var(--text-3); flex-shrink: 0; }
li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
li > span:first-of-type { flex: 1; }
.sugg-head { cursor: default !important; justify-content: space-between; font-size: 11.5px !important; font-weight: 800; color: var(--text-3) !important; padding-bottom: 6px !important; }
.sugg-clear, .sugg-x { border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.sugg-clear:hover, .sugg-x:hover { color: var(--brand); background: var(--brand-light); }

/* ============ BOUTON APPRENDRE ============ */
.learn-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; max-width: 560px; margin-top: 18px;
  padding: 14px 18px; background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-soft) 100%);
  border: 1.5px solid var(--brand-soft); border-radius: 18px; text-decoration: none; color: var(--text);
  z-index: 3; transition: all .3s cubic-bezier(.22,1,.36,1); position: relative; overflow: hidden;
}
.learn-btn::before {
  content: ''; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: rotate(20deg); transition: left .7s ease; pointer-events: none;
}
html[data-theme="dark"] .learn-btn::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); }
.learn-btn:hover::before { left: 120%; }
.learn-btn:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-brand); }
.learn-btn-icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 12px; font-size: 20px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.15);
}
.learn-btn-text { flex: 1; display: flex; flex-direction: column; text-align: left; min-width: 0; }
.learn-btn-text b { font-size: 14.5px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; line-height: 1.2; }
.learn-btn-text small { font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.learn-btn-arrow { color: var(--brand); flex-shrink: 0; transition: transform .3s ease; }
.learn-btn:hover .learn-btn-arrow { transform: translateX(4px); }

/* ============ OVERLAY RECHERCHE MOBILE ============ */
.search-overlay { display: none; position: fixed; inset: 0; background: var(--bg); z-index: 100; flex-direction: column; }
.search-overlay.open { display: flex; animation: overlayIn .22s ease; }
@keyframes overlayIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.overlay-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.overlay-back { border: 0; background: transparent; color: var(--text); display: flex; align-items: center; cursor: pointer; flex-shrink: 0; padding: 6px; border-radius: 50%; transition: background .12s; }
.overlay-back:hover { background: var(--hover); }
.overlay-search-bar { flex: 1; }
.suggestions-mobile { list-style: none; overflow-y: auto; flex: 1; }
.suggestions-mobile li { padding: 16px 20px; font-size: 15.5px; color: var(--text); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
.suggestions-mobile li[data-s]:hover { background: var(--hover); }
.suggestions-mobile li svg { color: var(--text-3); flex-shrink: 0; }

/* ============================================================
   ACTUALITÉS (défilement vertical)
   ============================================================ */
.news-section { padding: 10px 0 30px; max-width: 640px; margin: 0 auto; width: 100%; }
.news-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 12px; gap: 10px; }
.news-header-left { display: flex; align-items: center; gap: 10px; }
.news-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.6); animation: livePulse 1.8s infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(var(--brand-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0); }
}
.news-title { font-size: 20px; font-weight: 900; color: var(--text); letter-spacing: -0.4px; }
.news-header-right { display: flex; align-items: center; gap: 8px; }
.news-refresh { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-soft); color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.news-refresh:hover { background: var(--brand-light); color: var(--brand); }
.news-refresh.spin svg { animation: composeSpin .8s linear infinite; }
.news-see-all-top {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--brand);
  text-decoration: none; padding: 7px 12px; border-radius: 100px; background: var(--brand-light); transition: all .2s ease;
}
.news-see-all-top:hover { background: var(--brand); color: #fff; }
.news-see-all-top svg { transition: transform .25s ease; }
.news-see-all-top:hover svg { transform: translateX(3px); }

/* Filtres */
.news-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 20px 12px; }
.news-chips::-webkit-scrollbar { display: none; }
.news-chip {
  flex: 0 0 auto; padding: 8px 15px; border-radius: 100px; border: 1.5px solid transparent;
  background: var(--bg-soft); color: var(--text-2); font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.news-chip:hover { color: var(--brand); }
.news-chip.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3); }

/* Liste verticale */
.news-list { display: flex; flex-direction: column; gap: 16px; padding: 4px 20px 14px; min-height: 300px; }
.news-card {
  border-radius: 20px; overflow: hidden; background: var(--bg); border: 1px solid var(--border);
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, border-color .25s ease, opacity .3s;
  animation: cardIn .4s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-soft); }
.news-card.removing { opacity: 0; transform: scale(.96); }
.news-card.is-read .news-card-title, .news-card.is-read .news-cover-title { opacity: .6; }
.news-main { display: flex; flex-direction: column; color: inherit; text-decoration: none; }

.news-thumb-wrap { position: relative; width: 100%; height: 190px; overflow: hidden; background: var(--bg-soft); display: block; }
.news-thumb-wrap::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55)); pointer-events: none; }
.news-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.22,1,.36,1); background: var(--bg-soft); }
.news-card:hover .news-thumb { transform: scale(1.05); }
.news-thumb.no-img {
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 46px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); text-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.news-thumb-wrap.no-img-wrap::after { display: none; }
.news-cat-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 11px; background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #9a3412; border-radius: 100px;
  font-size: 10.5px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.news-fresh-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  background: var(--brand); color: #fff; border-radius: 100px; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.4);
}
.news-fresh-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: dotBlink 1.2s infinite; }
@keyframes dotBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.news-cover-title {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; color: #fff;
  font-size: calc(15px * var(--fs)); font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html:not([data-layout="list"]) .news-card.has-img .news-card-title { display: none; }
html[data-layout="list"] .news-cover-title { display: none; }

.news-card-body { padding: 14px 16px 6px; min-width: 0; }
.news-source { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: calc(11.5px * var(--fs)); color: var(--text-2); font-weight: 700; }
.news-source-avatar {
  width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; flex-shrink: 0;
}
.news-source-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; color: var(--text); font-weight: 800; }
.news-source-time { font-weight: 600; color: var(--text-3); }
.news-source-time::before { content: '·'; opacity: .5; margin-right: 6px; }
.news-card-title {
  font-size: calc(14.5px * var(--fs)); font-weight: 800; line-height: 1.35; color: var(--text); letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px;
}
.news-card-desc {
  font-size: calc(12.8px * var(--fs)); font-weight: 500; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px;
}
.news-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 16px 0; padding: 8px 0 10px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); font-weight: 700; }
.news-card-foot-left { display: inline-flex; align-items: center; gap: 12px; }
.news-foot-stat { display: inline-flex; align-items: center; gap: 4px; }
.news-foot-stat svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.news-actions { display: inline-flex; align-items: center; gap: 2px; }
.news-act {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s, transform .15s;
}
.news-act:hover { background: var(--brand-light); color: var(--brand); }
.news-act:active { transform: scale(.88); }
.news-act.on { color: var(--brand); }
.news-act.on svg { fill: currentColor; }
.news-act svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.news-read-more { color: var(--brand); font-weight: 800; text-decoration: none; padding: 6px 4px; }

/* Disposition « liste » */
html[data-layout="list"] .news-main { flex-direction: row; align-items: stretch; }
html[data-layout="list"] .news-thumb-wrap { flex: 0 0 112px; width: 112px; height: auto; min-height: 112px; }
html[data-layout="list"] .news-thumb-wrap::after { display: none; }
html[data-layout="list"] .news-card-body { flex: 1; padding: 12px 14px 4px; }
html[data-layout="list"] .news-cat-badge, html[data-layout="list"] .news-fresh-badge { display: none; }
html[data-layout="list"] .news-thumb.no-img { font-size: 30px; }

/* Densité compacte */
html[data-density="compact"] .news-list { gap: 10px; }
html[data-density="compact"] .news-thumb-wrap { height: 140px; }
html[data-density="compact"] .news-card-desc { display: none; }
html[data-density="compact"] .news-card-body { padding-top: 10px; }
html[data-density="compact"][data-layout="list"] .news-thumb-wrap { flex-basis: 88px; width: 88px; min-height: 88px; }

/* Squelette, vide, sentinelle */
.news-skeleton { height: 280px; border-radius: 20px; background: linear-gradient(90deg, var(--bg-soft) 25%, var(--hover) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: skeleton 1.4s ease-in-out infinite; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.news-empty { text-align: center; padding: 56px 20px; color: var(--text-3); font-size: 14px; font-weight: 600; }
.news-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .6; }
.news-empty button { margin-top: 14px; }
.news-sentinel { height: 1px; }
.see-more-wrap { padding: 6px 20px 0; display: flex; justify-content: center; margin-top: 6px; }
.see-more-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 30px; background: transparent; border: 1.5px solid var(--brand);
  color: var(--brand); border-radius: 100px; font-size: 14px; font-weight: 800; text-decoration: none; transition: all .22s cubic-bezier(.22,1,.36,1);
}
.see-more-btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-brand); }
.see-more-btn svg { transition: transform .2s; }
.see-more-btn:hover svg { transform: translateX(3px); }

/* ============ NAVIGATION BASSE ============ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; align-items: stretch;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border); padding: 6px 0 max(6px, env(safe-area-inset-bottom)); z-index: 60;
}
.nav-item, .nav-create-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  text-decoration: none; color: var(--text-2); font-size: 10px; font-weight: 600; line-height: 1.2; padding: 4px 0;
  transition: color .12s;
}
.nav-item svg { stroke: currentColor; transition: transform .15s; }
.nav-item:active svg { transform: scale(.88); }
.nav-item.active { color: var(--brand); }
.nav-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 24px; }
.nav-create-wrap { flex: 1; display: flex; }
.nav-create-btn { background: transparent; border: 0; cursor: pointer; width: 100%; }
.nav-create-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 24px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); color: #fff;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.35); transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
.nav-create-btn:hover .nav-create-icon { transform: scale(1.06); }
.nav-create-btn:active .nav-create-icon { transform: scale(.9); }
.nav-create-btn:hover { color: var(--brand); }
.nav-badge {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; border-radius: 100px; font-size: 10px; font-weight: 900;
  line-height: 14px; text-align: center; border: 2px solid var(--bg); box-shadow: 0 2px 8px rgba(220,38,38,0.45);
  animation: badgePop .35s cubic-bezier(.34,1.56,.64,1); pointer-events: none; align-items: center; justify-content: center;
}
@keyframes badgePop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.nav-item-chat.active .nav-badge { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); }

/* ============ RETOUR EN HAUT ============ */
.to-top {
  position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 55;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--brand);
  box-shadow: var(--shadow-md); cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ============ FEUILLES (création + paramètres) ============ */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 200; display: none; align-items: flex-end; justify-content: center;
}
.sheet-overlay.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 560px; height: 94vh; max-height: 94vh; background: var(--bg); border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  animation: sheetUp .35s cubic-bezier(.22,1,.36,1); box-shadow: 0 -20px 60px rgba(0,0,0,0.3);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 640px) {
  .sheet-overlay { align-items: center; padding: 20px; }
  .sheet { border-radius: 24px; height: auto; max-height: 90vh; }
}
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--border); margin: 8px auto 0; flex-shrink: 0; }
.sheet-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sheet-close { width: 38px; height: 38px; border-radius: 50%; background: transparent; border: 0; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
.sheet-close:hover { background: var(--hover); }
.sheet-title { flex: 1; font-size: 15.5px; font-weight: 800; text-align: center; letter-spacing: -0.01em; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-body::-webkit-scrollbar { width: 6px; }
.sheet-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* ---------- Paramètres ---------- */
.set-section { margin-bottom: 22px; }
.set-section h3 { font-size: 13px; font-weight: 800; color: var(--brand-dark); margin-bottom: 8px; letter-spacing: .01em; }
.set-card { background: var(--bg-soft); border-radius: 18px; padding: 4px 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-label { flex: 1; min-width: 0; }
.set-label b { display: block; font-size: 13.5px; font-weight: 700; }
.set-label small { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; line-height: 1.4; font-weight: 500; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 100px; padding: 3px; flex-shrink: 0; }
.seg button { border: 0; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 100px; cursor: pointer; }
.seg button.on { background: var(--brand); color: #fff; }
.swatches { display: inline-flex; gap: 8px; flex-shrink: 0; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 1.5px var(--border); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2.5px var(--text); }
.set-select { flex-shrink: 0; max-width: 160px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font-size: 12.5px; font-weight: 600; font-family: inherit; }
.dash-toggle { position: relative; width: 44px; height: 24px; background: var(--border); border-radius: 100px; flex-shrink: 0; transition: background .2s; cursor: pointer; border: 0; padding: 0; }
.dash-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.dash-toggle.on { background: var(--brand); }
.dash-toggle.on::after { transform: translateX(20px); }
.set-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 100px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.set-btn:hover { border-color: var(--brand); color: var(--brand); }
.set-btn.danger:hover { border-color: #dc2626; color: #dc2626; }
.set-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; padding: 12px 0; font-size: 12.5px; align-items: center; color: var(--text-2); }
kbd { font-family: inherit; font-size: 11.5px; font-weight: 800; background: var(--bg); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 7px; padding: 2px 8px; color: var(--text); text-align: center; }

/* ---------- Création de post ---------- */
.compose-publish { background: var(--brand); color: #fff; border: 0; padding: 9px 18px; border-radius: 100px; font-size: 13.5px; font-weight: 800; cursor: pointer; transition: all .18s; box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.3); }
.compose-publish:disabled { background: var(--bg-soft); color: var(--text-3); box-shadow: none; cursor: not-allowed; }
.compose-publish:not(:disabled):hover { background: var(--brand-dark); transform: translateY(-1px); }
.compose-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 10; overflow: hidden; opacity: 0; transition: opacity .2s; }
.compose-progress.active { opacity: 1; }
.compose-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); transition: width .3s ease; }
.compose-author { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.compose-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; flex-shrink: 0; }
.compose-author b { display: block; font-size: 14px; font-weight: 800; }
.compose-author small { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.compose-draft { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.compose-draft button { border: 0; background: transparent; color: var(--brand); font-size: 11.5px; font-weight: 800; cursor: pointer; }

.compose-field { margin-bottom: 16px; }
.compose-label { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 800; color: var(--text-2); margin-bottom: 8px; }
.compose-optional { font-weight: 600; color: var(--text-3); margin-left: 4px; }
.compose-count { font-weight: 700; font-size: 11.5px; color: var(--text-3); }
.compose-count.warn { color: #f59e0b; }
.compose-count.danger { color: #dc2626; }
.compose-field input, .compose-field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: 14px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--bg); outline: none; resize: none; transition: border-color .15s, box-shadow .15s; line-height: 1.5;
}
.compose-field input:focus, .compose-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12); }
.compose-field input.invalid { border-color: #dc2626; }
.compose-field input::placeholder, .compose-field textarea::placeholder { color: var(--text-3); }
.compose-emojis { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.compose-emoji { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-soft); font-size: 16px; cursor: pointer; transition: transform .15s, background .15s; }
.compose-emoji:hover { background: var(--brand-light); transform: scale(1.1); }

.compose-media { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 18px; background: var(--bg-soft); min-height: 200px; display: flex; align-items: center; justify-content: center; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.compose-media.drag { border-color: var(--brand); background: var(--brand-light); }
.compose-media-empty { padding: 28px 20px; text-align: center; width: 100%; }
.compose-media-icon { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-light), var(--brand-soft)); display: flex; align-items: center; justify-content: center; color: var(--brand); box-shadow: 0 8px 22px rgba(var(--brand-rgb), 0.15); }
.compose-media-title { font-size: 15.5px; font-weight: 800; margin-bottom: 5px; }
.compose-media-sub { font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; line-height: 1.5; }
.compose-media-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.compose-media-action { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 100px; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; transition: all .18s; }
.compose-media-action:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.compose-media-action svg { color: var(--brand); }
.compose-media-preview { position: relative; width: 100%; max-height: 420px; display: flex; align-items: center; justify-content: center; background: #000; }
.compose-media-preview img { max-width: 100%; max-height: 420px; display: block; object-fit: contain; }
.compose-media-remove { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .15s, background .15s; z-index: 2; }
.compose-media-remove:hover { background: rgba(220,38,38,0.9); transform: scale(1.08); }
.compose-media-badge { position: absolute; bottom: 10px; left: 10px; padding: 6px 12px; background: rgba(0,0,0,0.7); color: #fff; border-radius: 100px; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2; }
.compose-media-uploading { position: absolute; inset: 0; background: rgba(0,0,0,0.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; font-size: 13px; font-weight: 700; z-index: 3; }
.compose-spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: composeSpin .8s linear infinite; }
@keyframes composeSpin { to { transform: rotate(360deg); } }

.compose-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.compose-cat { padding: 8px 15px; background: var(--bg-soft); border: 1.5px solid transparent; border-radius: 100px; font-size: 12.5px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: all .15s; }
.compose-cat:hover { color: var(--brand); }
.compose-cat.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3); }
.compose-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.composer-type-btn { display: flex; align-items: center; gap: 12px; padding: 13px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; color: var(--text); text-align: left; transition: all .18s; }
.composer-type-btn:hover { border-color: var(--brand); }
.composer-type-btn.active { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.07); }
.composer-type-btn > i { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.composer-type-btn b { display: block; font-size: 13.5px; font-weight: 800; margin-bottom: 2px; }
.composer-type-btn small { font-size: 11px; color: var(--text-2); font-weight: 500; }
.compose-source-fields { padding: 14px; background: var(--bg-soft); border-radius: 14px; margin-bottom: 16px; }
.compose-source-fields .compose-field:last-child { margin-bottom: 0; }
.compose-hint { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; background: var(--bg-soft); border-radius: 12px; font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; }
.compose-hint i { color: var(--brand); margin-top: 2px; flex-shrink: 0; }
.compose-error { display: none; padding: 12px 14px; background: rgba(220,38,38,0.1); color: #dc2626; border-radius: 12px; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.compose-error.show { display: block; }
.compose-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); font-weight: 600; text-align: center; flex-shrink: 0; }

/* ============ TOASTS ============ */
.toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 380px; pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.18); pointer-events: auto; animation: toastIn .25s cubic-bezier(.22,1,.36,1); }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast.success { background: #15803d; }
.toast.error { background: #dc2626; }
.toast.info { background: var(--text); color: var(--bg); }

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .suggestions-desktop { display: none !important; }
  .hero-logo { width: 200px; max-width: 62vw; margin-bottom: 24px; }
  .hero-badge { font-size: 11.5px; padding: 7px 13px; margin-bottom: 20px; }
  .learn-btn { padding: 12px 14px; gap: 12px; border-radius: 16px; }
  .learn-btn-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
  .learn-btn-text b { font-size: 13.5px; }
  .learn-btn-text small { font-size: 11.5px; }
  .news-title { font-size: 18px; }
  .news-thumb-wrap { height: 170px; }
  .see-more-btn { padding: 11px 24px; font-size: 13.5px; }
  .nav-badge { min-width: 16px; height: 16px; font-size: 9.5px; line-height: 12px; }
}
@media (max-width: 480px) {
  .sheet { border-radius: 22px 22px 0 0; }
  .sheet-body { padding: 14px; }
  .compose-types { grid-template-columns: 1fr; }
  .set-row { flex-wrap: wrap; }
  .set-select { max-width: 100%; }
}

