:root{
  /* Identité "presse de qualité" : navy + papier ivoire (remplace le bordeaux/noir) */
  --ink:#0d1b30;
  --text:#232326;
  --muted:#6b6b70;
  --muted-2:#98979b;
  --bg:#faf7ef;
  --bg-sub:#f4efe2;
  --line:#d8d5cc;
  --line-soft:#e3e8ef;
  --accent:#1a3860;
  --accent-tint:#eef1f5;
  --ok:#1f6b3d;
  --unavailable:#8a5a2b;
}
*{box-sizing:border-box;}
html,body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:15px;
  line-height:1.45;
  min-height:100%;
  -webkit-font-smoothing:antialiased;
}
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  padding-bottom:72px;
}
a{color:inherit;}
button{font-family:inherit;}

/* HEADER */
.topbar{
  position:sticky; top:0; z-index:10;
  background:rgba(250,247,239,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  padding:14px 18px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{
  font-weight:800; font-size:18px; letter-spacing:-.01em; cursor:pointer;
}
.brand span{color:var(--accent);}
.pro-badge{
  font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  background:var(--bg-sub); color:var(--muted);
  padding:4px 10px; border-radius:4px; cursor:pointer;
}
.pro-badge.active{background:var(--ink); color:#fff;}

/* SCREENS */
.screen{display:none; padding:0 18px 28px; flex:1; min-height:0; max-width:760px; width:100%; margin:0 auto;}
.screen.active{display:block;}

.hero{
  padding:22px 0 4px;
}
.hero-eyebrow{
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  color:var(--accent); margin-bottom:10px; padding-bottom:10px;
  border-bottom:1px solid var(--line-soft);
}
.hero h1{
  font-weight:800; font-size:23px; line-height:1.25;
  margin:0 0 4px; letter-spacing:-.015em;
}
.hero p{
  font-size:13.5px; color:var(--muted);
  margin:0;
}
.hero-note{
  font-size:11.5px !important; color:var(--muted-2) !important;
  margin-top:8px !important; line-height:1.5; font-style:italic;
}

.section-title{
  font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--muted); margin:24px 0 10px;
}
#screen-discover .section-title:first-of-type{margin-top:18px;}

.section-title-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.section-title-row .section-title{ margin:24px 0 10px; }
.sort-select{
  font-family:inherit; font-size:12.5px; font-weight:600; color:var(--text);
  background:var(--bg-sub); border:1px solid var(--line); border-radius:6px;
  padding:6px 10px; cursor:pointer; max-width:190px;
}

/* FILTER CHIPS */
.chip-row-wrap{position:relative;}
.chip-row{display:flex; flex-wrap:wrap; gap:8px; padding:2px 0 6px;}
.chip{
  font-size:13px; font-weight:600;
  padding:7px 14px; border:1px solid var(--line); background:var(--bg);
  color:var(--text); border-radius:6px; white-space:nowrap; cursor:pointer;
  transition:background .12s, color .12s;
}
.chip.active{background:var(--ink); color:#fff; border-color:var(--ink);}

/* FILTRE DE SUIVI + ACTIONS GROUPÉES (Découvrir) */
.follow-filter-row{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:8px; margin-bottom:4px;
}
.follow-filter-row .chip-row-wrap{ flex:1; min-width:0; }
.follow-bulk-actions{ display:flex; gap:6px; flex-shrink:0; }
.follow-bulk-btn{
  font-size:12px; font-weight:600; padding:6px 12px;
  border:1px solid var(--line-soft); background:var(--accent-tint); color:var(--accent);
  border-radius:999px; cursor:pointer; white-space:nowrap;
  transition:background .12s, transform .1s;
}
.follow-bulk-btn:hover{ background:#e2e8f2; }
.follow-bulk-btn:active{ transform:scale(0.96); }

.search-input{
  width:100%; margin:14px 0 2px; padding:11px 14px;
  border:1px solid var(--line); border-radius:8px; background:var(--bg-sub);
  font-family:'Inter',sans-serif; font-size:14.5px;
}
.search-input::placeholder{color:var(--muted-2);}
.search-input:focus{outline:none; border-color:var(--ink); background:var(--bg);}

/* CREATOR LIST */
.creator-grid{display:flex; flex-direction:column;}
.creator-card{
  background:var(--bg); border-bottom:1px solid var(--line);
  padding:16px 2px; display:flex; flex-direction:column; gap:7px;
}
.creator-card:first-child{border-top:1px solid var(--line);}
.creator-top{display:flex; justify-content:space-between; align-items:flex-start; gap:10px;}
.creator-id{display:flex; align-items:center; gap:12px; min-width:0;}
.creator-avatar{
  width:36px; height:36px; border-radius:50%; flex-shrink:0;
  background:var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:14px;
}
.creator-avatar.banni, .creator-avatar.inactif{background:var(--line); color:var(--muted-2);}
.creator-avatar.has-image{background:none;}
.creator-avatar img{width:100%; height:100%; border-radius:50%; object-fit:cover;}
.creator-name{font-weight:700; font-size:15.5px; line-height:1.3;}
.creator-tags{display:flex; flex-wrap:wrap; gap:10px; padding-left:48px;}
.tag{
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  color:var(--muted); padding:0;
}
.tag.theme{color:var(--accent);}
.tag.banni, .tag.inactif{color:var(--unavailable);}
.creator-id{ text-decoration:none; color:inherit; }
a.creator-id:hover .creator-name{ text-decoration:underline; }
.creator-note{font-size:13.5px; color:var(--muted); line-height:1.5; padding-left:48px;}
.creator-actions{display:flex; justify-content:space-between; align-items:center; margin-top:1px; padding-left:48px;}
.channel-links{display:flex; gap:14px; flex-wrap:wrap;}
.channel-links a{
  font-size:12px; font-weight:600; color:var(--text);
  text-decoration:none; border-bottom:1px solid var(--muted-2);
}
.channel-links a:hover{border-color:var(--text);}

.follow-btn{
  font-size:12px; font-weight:700;
  padding:7px 15px; border-radius:6px; border:1px solid var(--ink); background:transparent;
  cursor:pointer; flex-shrink:0; transition:background .12s, color .12s;
}
.follow-btn.following{background:var(--ink); color:#fff;}

/* FEED */
.feed-group:first-child .feed-group-title{margin-top:2px;}
.feed-group-title{
  width:100%; display:flex; justify-content:space-between; align-items:center;
  background:none; border:none; padding:0; margin:22px 0 8px; cursor:pointer;
  font-family:inherit; font-weight:700; font-size:11.5px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--muted);
}
.feed-group-count{
  font-weight:600; letter-spacing:0; text-transform:none; color:var(--muted-2); font-size:11px;
}
.feed-group.collapsed .feed-group-items{display:none;}
.watched-badge{
  margin-left:6px; font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  color:var(--muted-2); border:1px solid var(--line); border-radius:4px; padding:1px 5px;
}
.feed-load-more{
  width:100%; margin:18px 0 4px; padding:12px; border:1px solid var(--line); border-radius:8px;
  background:var(--bg-sub); color:var(--text); font-weight:700; font-size:13px; cursor:pointer;
}
.feed-load-more:active{background:var(--line);}
.feed-item{border-bottom:1px solid var(--line);}
.feed-item:first-child{border-top:1px solid var(--line);}
.feed-link{
  background:var(--bg); border:none;
  padding:14px 2px; display:flex; gap:12px; width:100%; text-align:left;
  cursor:pointer;
  font-family:inherit; color:inherit;
}
.feed-link:active{background:var(--bg-sub);}
.feed-thumb-wrap{position:relative; width:116px; height:66px; flex-shrink:0;}
.feed-thumb{width:100%; height:100%; object-fit:cover; border-radius:8px; background:var(--bg-sub); box-shadow:0 1px 2px rgba(13,27,48,.06);}
.video-duration{
  position:absolute; right:4px; bottom:4px; background:rgba(13,27,48,.85); color:#fff;
  font-size:10px; font-weight:700; padding:1.5px 5px; border-radius:4px; line-height:1.4;
}
.video-duration:empty{display:none;}
.feed-meta{flex:1; min-width:0;}
.feed-creator{font-size:10.5px; font-weight:700; color:var(--accent); text-transform:uppercase; letter-spacing:.04em; display:flex; align-items:center; gap:5px;}
.feed-creator-avatar{
  width:16px; height:16px; border-radius:50%; flex-shrink:0; background:var(--accent);
  color:#fff; font-size:9px; font-weight:800; display:flex; align-items:center; justify-content:center;
  text-transform:uppercase; overflow:hidden;
}
.feed-creator-avatar.has-image{ background:none; }
.feed-creator-avatar img{ width:100%; height:100%; object-fit:cover; }
a.feed-creator-link{
  display:inline-flex; align-items:center; gap:5px; text-decoration:none; color:inherit;
}
a.feed-creator-link:hover{ text-decoration:underline; }
.feed-title{font-size:14px; font-weight:700; margin:4px 0 5px; line-height:1.35;}
.feed-date{font-size:11px; color:var(--muted-2);}

/* Vidéo déjà vue : signal discret, pas un vrai changement de mise en page */
.feed-item.watched .feed-thumb{opacity:.55;}
.feed-item.watched .feed-title{color:var(--muted); font-weight:600;}
.feed-item.watched .feed-creator{opacity:.7;}

.ad-slot{
  background:var(--bg-sub); border:1px solid var(--line); border-radius:6px;
  padding:14px; margin:10px 0; text-align:center;
  font-size:11.5px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.03em;
}

.feed-type-toggle{ display:flex; gap:6px; margin:10px 0 16px; }
.feed-type-btn{
  font-size:12px; font-weight:600; padding:6px 14px;
  border:1px solid var(--line); background:var(--bg-sub); color:var(--muted-2);
  border-radius:999px; cursor:pointer; transition:background .12s, color .12s, border-color .12s;
}
.feed-type-btn.active{ background:var(--accent-tint); color:var(--accent); border-color:var(--accent); font-weight:700; }

.discovery-banner{
  background:var(--accent-tint); border:1px solid var(--line-soft); border-radius:8px;
  padding:12px 14px; font-size:12.5px; color:#1e3355; margin-bottom:14px; line-height:1.5;
}

.empty-msg{
  font-size:13px; color:var(--muted);
  padding:32px 12px; text-align:center; line-height:1.6;
}
.feed-debug{
  margin-top:14px; padding:10px 12px; background:var(--bg-sub); border-radius:8px;
  font-size:11px; color:#a13a3a; text-align:left; word-break:break-word;
}

/* FEED LOADING — état d'attente explicite plutôt qu'un simple "Chargement..." : l'idée est que
   la personne comprenne POURQUOI ça prend quelques secondes (interrogation en direct de chaque
   chaîne, pas de raccourci algorithmique) plutôt que de croire que le site est cassé et de partir. */
.feed-loading{ padding:18px 2px 8px; }
.feed-loading-head{ display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; }
.feed-loading-spinner{
  flex:none; width:26px; height:26px; margin-top:2px; border-radius:50%;
  border:3px solid var(--line); border-top-color:var(--accent);
  animation:feed-spin 0.8s linear infinite;
}
@keyframes feed-spin{ to{ transform:rotate(360deg); } }
.feed-loading-title{ font-weight:700; font-size:14.5px; color:var(--text); margin-bottom:4px; }
.feed-loading-sub{ font-size:12.5px; color:var(--muted); line-height:1.55; }
.feed-loading-sub span{ font-weight:700; color:var(--accent); }
.feed-loading-bar{
  height:5px; border-radius:3px; background:var(--line-soft); overflow:hidden; margin-bottom:22px;
}
.feed-loading-bar-fill{
  height:100%; width:4%; background:var(--accent); border-radius:3px;
  transition:width .35s ease;
}
.feed-skeleton-list{ display:flex; flex-direction:column; gap:14px; }
.feed-skeleton-item{ display:flex; gap:12px; align-items:center; }
.feed-skeleton-thumb, .feed-skeleton-line{
  border-radius:8px;
  background:linear-gradient(90deg, var(--bg-sub) 25%, var(--line-soft) 50%, var(--bg-sub) 75%);
  background-size:200% 100%; animation:feed-shimmer 1.4s ease-in-out infinite;
}
.feed-skeleton-thumb{ width:116px; height:66px; flex:none; }
.feed-skeleton-lines{ flex:1; display:flex; flex-direction:column; gap:8px; }
.feed-skeleton-line{ height:10px; border-radius:4px; }
.feed-skeleton-line.short{ width:40%; }
.feed-skeleton-line.long{ width:85%; }
@keyframes feed-shimmer{
  0%{ background-position:200% 0; }
  100%{ background-position:-200% 0; }
}

/* VIDEO MODAL */
.video-modal{
  display:none; position:fixed; inset:0; z-index:50;
  background:rgba(0,0,0,.88);
  align-items:flex-end; justify-content:center;
}
.video-modal.open{display:flex;}
.video-modal-inner{
  background:#000; width:100%; max-width:760px;
  border-radius:12px 12px 0 0; overflow:hidden;
  display:flex; flex-direction:column;
}
@media (min-width:640px){
  .video-modal{align-items:center;}
  .video-modal-inner{border-radius:12px; margin:20px;}
}
.video-modal-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:13px 15px; gap:12px; background:#151517;
}
.video-modal-title{
  color:#fff; font-size:13px; font-weight:600; line-height:1.35;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.video-modal-close{
  background:rgba(255,255,255,.14); border:none; color:#fff; border-radius:50%;
  width:30px; height:30px; flex-shrink:0; cursor:pointer; font-size:14px;
}
.video-frame-wrap{position:relative; width:100%; padding-top:56.25%; background:#000;}
.video-frame-wrap iframe{position:absolute; inset:0; width:100%; height:100%;}
.video-external-link{
  display:block; text-align:center; padding:13px; color:#c9c9cd;
  font-size:12px; font-weight:600; text-decoration:none;
  background:#151517; border-top:1px solid rgba(255,255,255,.08);
}

/* SETTINGS / PRO */
.pro-card{
  background:var(--ink); color:#fff; border-radius:12px; padding:22px; margin-bottom:20px;
  box-shadow:0 4px 14px rgba(13,27,48,.18);
}
.pro-card::before{
  content:""; display:block; width:32px; height:3px; border-radius:999px;
  background:var(--line-soft); opacity:.6; margin-bottom:14px;
}
.pro-card h3{margin:0 0 6px; font-size:18px; font-weight:800;}
.pro-card p{font-size:13px; color:rgba(244,239,226,.7); margin:0 0 16px;}
.pro-card ul{margin:0 0 18px; padding-left:18px; font-size:13.5px; color:rgba(244,239,226,.9);}
.pro-card li{margin-bottom:7px;}
.pro-btn{
  background:#fff; color:var(--ink); border:none; border-radius:8px;
  padding:12px 20px; font-size:12.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.03em; cursor:pointer; width:100%;
}
.pro-btn.active{background:var(--ok); color:#fff;}
.settings-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:13px 0; border-bottom:1px solid var(--line); font-size:14px;
}
.disclaimer{
  font-size:12px; color:var(--muted); margin-top:22px; line-height:1.6;
}

/* SUGGÉRER UN CRÉATEUR */
.suggest-card{
  background:var(--bg-sub); border:1px solid var(--line); border-radius:12px; padding:20px;
}
.suggest-card > p{ font-size:13px; color:var(--muted); margin:0 0 14px; line-height:1.5; }
#suggest-form{ display:flex; flex-direction:column; gap:10px; }
#suggest-form input, #suggest-form textarea{
  width:100%; font-family:inherit; font-size:13.5px; color:var(--text);
  background:var(--bg); border:1px solid var(--line); border-radius:8px;
  padding:11px 13px; box-sizing:border-box; resize:vertical;
}
#suggest-form input::placeholder, #suggest-form textarea::placeholder{ color:var(--muted-2); }
#suggest-form input:focus, #suggest-form textarea:focus{ outline:none; border-color:var(--ink); background:var(--bg); }
.suggest-btn{
  background:var(--ink); color:#fff; border:none; border-radius:8px;
  padding:12px 20px; font-size:12.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.03em; cursor:pointer; margin-top:2px;
}
.suggest-result{
  font-size:13px; color:var(--text); line-height:1.55; padding:4px 2px;
}

/* TOAST */
.toast{
  position:fixed; left:16px; right:16px; bottom:80px; z-index:30;
  background:var(--ink); color:#fff;
  border-radius:10px; padding:13px 15px; font-size:13px; font-weight:500;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  max-width:720px; margin:0 auto;
}

/* BOTTOM NAV */
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0; z-index:20;
  background:rgba(250,247,239,.94); backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  display:flex; padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  max-width:760px; margin:0 auto;
}
.nav-btn{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  background:none; border:none; padding:7px 0; cursor:pointer;
  font-size:10.5px; font-weight:600; color:var(--muted-2);
}
.nav-btn.active{color:var(--accent); font-weight:700;}
.nav-btn svg{width:21px; height:21px;}
.nav-btn::after{
  content:""; display:block; width:0; height:2px; border-radius:999px;
  background:var(--accent); margin-top:1px; transition:width .15s;
}
.nav-btn.active::after{width:16px;}
.nav-icon-wrap{ position:relative; display:inline-flex; }
.nav-badge{
  display:none; position:absolute; top:-2px; right:-4px; width:8px; height:8px;
  border-radius:50%; background:#c0392b; box-shadow:0 0 0 2px var(--bg);
}
.nav-badge.show{ display:block; animation:nav-badge-pulse 1.8s ease-in-out infinite; }
@keyframes nav-badge-pulse{
  0%, 100%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.35); opacity:.7; }
}

/* COMMENT ÇA MARCHE (hero) */
.how-it-works{
  background:var(--accent-tint); border:1px solid var(--line-soft); border-radius:12px;
  padding:14px 16px; margin:2px 0 20px;
}
.how-it-works-steps{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px;
  font-size:12.5px; font-weight:600; color:var(--accent); margin-bottom:12px;
}
.how-step{ display:flex; align-items:center; gap:6px; }
.how-step-num{
  display:inline-flex; align-items:center; justify-content:center;
  width:18px; height:18px; border-radius:50%; background:var(--accent); color:#fff;
  font-size:11px; font-weight:700; flex-shrink:0;
}
.how-step-arrow{ color:var(--muted-2); font-weight:400; }
.how-it-works-cta{
  width:100%; font-size:14px; font-weight:700; padding:12px 16px;
  border:none; border-radius:8px; background:var(--accent); color:#fff;
  cursor:pointer; transition:background .12s, transform .1s;
}
.how-it-works-cta:hover{ background:#132a4a; }
.how-it-works-cta:active{ transform:scale(0.98); }

/* DESKTOP */
@media (min-width:680px){
  .creator-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 24px;}
  .creator-card{border-top:none !important;}
  .creator-card:nth-child(-n+2){border-top:1px solid var(--line) !important;}
  .hero h1{font-size:27px;}
}
