@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');

:root {
  /* ── Fonds : near-black profond (design Claude Design) ── */
  --bg: #08070c;
  --bg-soft: #0d0b14;
  --surface: #141220;
  --surface-2: #1c1829;
  --surface-card: #141018;      /* cartes épisodes */
  --surface-glass: rgba(20, 17, 32, 0.72);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: #241e30;
  --text: #edebf5;
  --text-dim: #b4afc6;
  --text-faint: #6b6784;

  /* ── Accent violet + cyan (l'ADN de la nouvelle identité) ── */
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --accent-3: #6d28d9;
  --accent-deep: #4c1d95;
  --lien: #a78bfa;
  --lien-hover: #c4b5fd;

  /* Compat : les composants qui utilisaient « rose » deviennent violets */
  --rose: #7c3aed;
  --rose-2: #a78bfa;
  --violet: #7c3aed;
  --violet-2: #a78bfa;
  --bleu: #60a5fa;
  --cyan: #22d3ee;
  --vert: #4ade80;
  --orange: #ff7a1a;
  --rouge: #f87171;

  --gradient-principal: linear-gradient(125deg, #7c3aed 0%, #6d28d9 100%);
  --gradient-mesh:
    radial-gradient(ellipse 1200px 820px at 6% 2%, rgba(124, 58, 237, 0.48), transparent 60%),
    radial-gradient(ellipse 1000px 700px at 100% 4%, rgba(34, 211, 238, 0.22), transparent 58%),
    radial-gradient(ellipse 1100px 900px at 92% 96%, rgba(124, 58, 237, 0.24), transparent 62%);
  --gradient-doux: rgba(124, 58, 237, 0.16);
  --gradient-texte: linear-gradient(120deg, #a78bfa 0%, #6d28d9 100%);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* ── Vraies ombres = profondeur premium ── */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 12px 38px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow-rose: 0 0 26px rgba(124, 58, 237, 0.5);
  --shadow-glow-violet: 0 0 26px rgba(124, 58, 237, 0.5);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: "Archivo Black", "Inter", system-ui, sans-serif;
  --font-titre: "Archivo Black", "Zen Kaku Gothic New", "Inter", system-ui, sans-serif;
  --font-corps: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

::selection {
  background: var(--rose);
  color: #fff;
}

html { background: var(--bg); }

body {
  margin: 0;
  font-family: var(--font-corps);
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Halo violet ambiant : DERRIÈRE le contenu (z-index négatif), entre le fond
   de la page (html) et les éléments. N'affecte plus l'empilement des menus. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: -1;
}
body::after { content: none; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-titre);
  letter-spacing: -0.01em;
  font-weight: 700;
}

/* ===== Header ===== */

header {
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--surface-glass);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header-gauche {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-titre {
  text-align: left;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

header h1 a.retour,
header h1 a.retour-lien {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 8px;
  margin: -6px -16px -6px -8px;
  transition: background 0.15s var(--ease);
}

header h1 a.retour:hover,
header h1 a.retour-lien:hover {
  background: var(--surface-2);
}

.fleche-retour {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

header h1 a.retour:hover .fleche-retour,
header h1 a.retour-lien:hover .fleche-retour {
  background: var(--rose);
  border-color: transparent;
  color: #fff;
}

.logo-icone {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  border-radius: 6px;
}

.h1-texte {
  color: #fff;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0;
}

.logo-accent {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(124, 58, 237, 0.55);
}

.version {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  border-left: 1px solid var(--border);
  margin-left: 20px;
  padding-left: 20px;
}

.header-droite {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.header-nav a.actif { color: var(--text); }

.header-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.recherche-wrap {
  position: relative;
  width: 340px;
}

#recherche {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-corps);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

#recherche::placeholder { color: var(--text-faint); }

#recherche:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.recherche-resultats {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  z-index: 50;
  animation: pop-in 0.12s var(--ease);
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.recherche-resultats.visible { display: block; }

.resultat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.12s var(--ease);
}

.resultat-item:last-child { border-bottom: none; }
.resultat-item:hover { background: var(--surface-2); }

.resultat-item img {
  width: 34px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.resultat-item .resultat-titre {
  font-size: 13.5px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resultat-vide {
  padding: 16px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

@media (max-width: 600px) {
  .recherche-wrap { width: 100%; }
}

/* ===== Boutons & menu utilisateur ===== */

.profil-lien {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s var(--ease);
}

.profil-lien:hover {
  background: var(--rose);
  border-color: transparent;
}

.menu-utilisateur-wrap { position: relative; }

.menu-toggle {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  padding: 4px 6px 4px 4px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s var(--ease);
}

.avatar-mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-fallback {
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
}

.menu-toggle:hover {
  background: rgba(124, 58, 237, 0.16);
}

.menu-liste {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 216px;
  display: none;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: pop-in 0.12s var(--ease);
}

.menu-liste.visible { display: flex; }

.menu-liste a, .menu-liste button {
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.menu-liste a:hover, .menu-liste button:hover {
  background: var(--surface-2);
  color: var(--accent-2);
}

.menu-liste .menu-deconnexion {
  color: var(--rouge);
  margin-top: 2px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.menu-liste .menu-deconnexion:hover { background: rgba(248, 113, 113, 0.12); color: var(--rouge); }

.header-droite-groupe {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cloche-notifs-wrap {
  position: relative;
}

/* Icônes du header (amis, cloche, manhwa) : style épuré du design exporté */
.header-icone {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.header-icone:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.16);
}

.cloche-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 7px;
  height: 7px;
  padding: 0;
  background: var(--accent);
  color: transparent;
  font-size: 0;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.8);
}

.cloche-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--surface);
  border-top: 2px solid var(--rose);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  display: none;
  flex-direction: column;
  z-index: 60;
  animation: pop-in 0.12s var(--ease);
}

.cloche-panel.visible { display: flex; }

.cloche-titre {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 14px 16px 8px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cloche-liste {
  display: flex;
  flex-direction: column;
}

.cloche-vide {
  padding: 16px;
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

.cloche-notif {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}

.cloche-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cloche-avatar-vide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rose);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.cloche-notif-texte {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cloche-notif-texte a {
  color: var(--text);
  text-decoration: none;
}

.cloche-notif-texte a:hover {
  text-decoration: underline;
}

.cloche-annonce {
  background: color-mix(in srgb, var(--rose) 8%, transparent);
  border-left: 2px solid var(--rose);
}

.cloche-annonce-icone {
  background: var(--surface-2);
  border: 1.5px solid var(--rose);
  font-size: 17px;
  line-height: 1;
}

.cloche-annonce-titre {
  display: block;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 2px;
}

.cloche-annonce-auteur {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
}

.cloche-annonce-fermer {
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text-dim);
  transition: opacity 0.15s var(--ease);
}

.cloche-annonce-fermer:hover { opacity: 0.7; }

.cloche-notif-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.cloche-accepter, .cloche-refuser, .cloche-fermer {
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s var(--ease);
}

.cloche-accepter {
  background: rgba(52, 211, 153, 0.14);
  color: var(--vert);
}

.cloche-refuser, .cloche-fermer {
  background: rgba(248, 113, 113, 0.14);
  color: var(--rouge);
}

.cloche-fermer {
  background: var(--surface-2);
  color: var(--text-dim);
}

.cloche-accepter:hover, .cloche-refuser:hover, .cloche-fermer:hover {
  opacity: 0.75;
}

/* ===== Toolbar ===== */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 28px 6px;
}

.planning-titre {
  font-family: var(--font-display);
  font-size: 28px;
  color: #fff;
  margin: 0;
  letter-spacing: 0;
}

.toolbar-droite {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Navigation de semaine : pas de contenant, la typographie porte tout.
   Les chevrons sont estompés au repos et se remplissent au survol. */
.semaine-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

.semaine-nav-btn {
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  align-items: center;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.25s var(--ease), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.semaine-nav-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.semaine-nav-btn:hover { opacity: 1; }
#semaine-precedente:hover { transform: translateX(-5px); }
#semaine-suivante:hover { transform: translateX(5px); }
.semaine-nav-btn:active { transform: scale(0.85); }
.semaine-nav-btn:disabled { opacity: 0.2; cursor: default; transform: none; }

.semaine-label {
  position: relative;
  background: none;
  border: none;
  padding: 0 0 7px;
  min-width: 150px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-titre);
}

.semaine-label-titre {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  /* Dégradé appliqué au texte lui-même : repli sur une couleur pleine si le
     navigateur ne sait pas découper le fond sur les glyphes. */
  color: var(--accent-2);
  background: linear-gradient(92deg, #fff 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.semaine-label-dates {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint);
  margin-top: 3px;
  font-family: var(--font-principale, inherit);
}

/* Trait qui se déploie de gauche à droite au survol. */
.semaine-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, #e07ac0 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.semaine-label:hover::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .semaine-nav-btn, .semaine-label::after { transition: none; }
}

.fuseau-note {
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 0;
}

.filtre-wrap { position: relative; }

.filtre-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s var(--ease);
}

.filtre-toggle:hover {
  background: var(--surface-2);
}

.filtre-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: none;
  flex-direction: column;
  gap: 10px;
  white-space: nowrap;
  min-width: 210px;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: pop-in 0.12s var(--ease);
}

.filtre-panel.visible { display: flex; }

.filtre-titre {
  margin: 10px 0 4px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.filtre-panel .statut-icone { width: auto; }

/* Filtre « épisode max » */
.filtre-ep-max {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filtre-ep-max input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-corps);
  padding: 8px 10px;
  -moz-appearance: textfield;
}
.filtre-ep-max input::-webkit-inner-spin-button,
.filtre-ep-max input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.filtre-ep-max input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.filtre-ep-max input::placeholder { color: var(--text-faint); }
.filtre-ep-max-reset {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.filtre-ep-max-reset:hover {
  color: #fff;
  background: rgba(248, 113, 113, 0.22);
}
.filtre-ep-max-note {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-faint);
  white-space: normal;
}

.filtre-ligne {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.filtre-ligne input[type="checkbox"] {
  accent-color: var(--rose);
  width: 16px;
  height: 16px;
}

/* ===== Planning ===== */

main#semaine {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 28px 60px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  overflow-x: auto;
}

.jour-col {
  flex: 0 0 clamp(140px, 11vw, 185px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jour-header {
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* Jour en cours : colonne mise en évidence en rose.
   Le fond est un calque en arrière-plan (::before) et non un padding :
   la colonne garde exactement la même largeur que ses voisines. */
.jour-col.today { position: relative; }

.jour-col.today::before {
  content: "";
  position: absolute;
  inset: -10px -9px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 93, 143, 0.16), rgba(255, 93, 143, 0.03));
  border: 1px solid rgba(255, 93, 143, 0.42);
  box-shadow: 0 0 18px rgba(255, 93, 143, 0.28);
  pointer-events: none;
  z-index: 0;
}

.jour-col.today > * { position: relative; z-index: 1; }

.jour-col.today .jour-header {
  background: linear-gradient(125deg, var(--rose, #ff5d8f), #d4537e);
}


.jour-col.today .anime-card {
  border: 1px solid rgba(255, 93, 143, 0.16);
}

.jour-date {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.jour-col.today .jour-date { color: rgba(255, 255, 255, 0.85); }

.jour-nom {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text);
  margin-top: 2px;
}

.jour-col.today .jour-nom { color: #fff; }

.jour-cartes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vide {
  aspect-ratio: 2 / 3;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
  line-height: 1.3;
}

.vide-rond {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a3550, #1a1826);
}

.anime-card {
  position: relative;
  background: var(--surface-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.anime-card:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-glow-violet);
  z-index: 5;
}

.poster-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  text-decoration: none;
}

.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bandeau bas du poster : sphère + SUB à gauche, play à droite (design exporté) */
.carte-poster-bas {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  background: rgba(8, 7, 12, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Contrôle d'épisode rapide (statut « En cours ») : − 6/12 +, nombre cliquable */
.cpb-ep {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}
.cpb-ep-btn {
  width: 14px;
  height: 16px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #cdbff5;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.12s var(--ease);
}
.cpb-ep-btn:hover { color: #fff; }
.cpb-ep-val {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  min-width: 26px;
  text-align: center;
}
.cpb-ep-max { color: #9a94b0; font-weight: 600; }
.cpb-ep-input {
  width: 46px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-corps);
  text-align: center;
  background: var(--surface);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0;
  -moz-appearance: textfield;
}
.cpb-ep-input::-webkit-inner-spin-button,
.cpb-ep-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cpb-gauche {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cpb-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e50914;
  flex-shrink: 0;
  animation: cpb-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes cpb-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.6); }
  50% { box-shadow: 0 0 0 5px rgba(229, 9, 20, 0); }
}

/* Bouton statut dans la bande basse : ▶ par défaut, icône colorée si un statut est posé */
.cpb-statut {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  transition: transform 0.15s var(--ease);
}

.cpb-statut:hover { transform: scale(1.2); }

/* Corps sous le poster : titre + épisode/heure */
.carte-corps { padding: 9px; }

.carte-titre {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-corps);
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Réserve toujours 2 lignes → toutes les cartes ont la même hauteur (alignées) */
  min-height: calc(1.25em * 2);
}

/* Drapeau du pays d'origine : coin haut-droit de la vignette (vraie image) */
.carte-drapeau {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.carte-meta {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.badge-adulte {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10, 10, 12, 0.85);
  border-radius: 8px;
  font-size: 16px;
  padding: 4px 7px;
  z-index: 2;
}

.statut-icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.85);
  border: 1.5px solid;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.15s var(--ease);
}

.statut-icon-btn:hover { transform: scale(1.1); }

.streaming-mini-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.badge-adulte ~ .streaming-mini-wrap { top: 42px; }

.streaming-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  /* Cercle-lettre : initiale de la plateforme (design exporté) */
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  font-family: var(--font-corps, Inter, sans-serif);
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
/* Le triangle ▶ (repli générique) a besoin d'un calage différent */
.streaming-mini.glyphe-play {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  padding-left: 2px;
}

/* Logos de marque (SVG monochromes) : teintés selon la couleur de texte */
.streaming-logo {
  width: 58%;
  height: 58%;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1); /* -> blanc */
}
.streaming-mini.logo-sombre .streaming-logo {
  filter: brightness(0); /* -> noir, pour les fonds clairs (Hulu) */
}
.streaming-mini:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 13px rgba(0, 0, 0, 0.6);
}

.statut-menu {
  position: absolute;
  top: 40px;
  right: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 10;
  width: 160px;
  animation: pop-in 0.1s var(--ease);
}

.statut-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s var(--ease);
}

.statut-option:hover { background: var(--surface-2); }

.statut-option.selectionne {
  background: var(--gradient-doux);
  color: var(--text);
}

.statut-icone {
  font-weight: bold;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  max-width: 100%;
}

.info-bar .episode {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-bar .heure {
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Épisode : pastille orange (design Claude Design) */
.carte-meta .episode {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--orange);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.carte-meta .heure {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

.sub-badge {
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 600px) {
  main#semaine {
    padding: 16px 14px 40px;
  }

  .jour-col {
    flex: 0 0 calc(100vw - 28px);
  }

  .toolbar {
    padding: 16px 14px 4px;
  }
}

/* ===== Boutons génériques réutilisables ===== */

.btn-primaire {
  background: var(--rose);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
  font-family: var(--font-titre);
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s var(--ease);
}

.btn-primaire:hover {
  opacity: 0.88;
}

/* ===== Transition de page ===== */

body {
  animation: fade-in 0.18s var(--ease);
}

/* ===== Pastilles de filtre par statut (partagé profil / seiyuu) ===== */
.statut-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.statut-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface-glass);
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-corps);
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease),
              border-color .15s var(--ease), transform .12s var(--ease);
}
.statut-chip:hover { color: var(--text); border-color: var(--sc, var(--accent)); transform: translateY(-1px); }
.statut-chip-icone { font-size: 13px; line-height: 1; }
.statut-chip-n { font-size: 11px; opacity: .65; font-weight: 800; }
.statut-chip.actif {
  background: color-mix(in srgb, var(--sc, var(--accent)) 22%, transparent);
  border-color: var(--sc, var(--accent));
  color: var(--text);
  font-weight: 700;
}
.statut-chip.actif .statut-chip-icone { color: var(--sc, var(--accent)); }
.statut-chip.actif .statut-chip-n { opacity: 1; }

/* ===== Boutons unifiés (à réutiliser partout) ===== */
.bouton-primaire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--gradient-principal);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-titre);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.32);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.bouton-primaire:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(124, 92, 255, 0.48); }
.bouton-primaire:active { transform: translateY(0); }

.bouton-secondaire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-titre);
  cursor: pointer;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.bouton-secondaire:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ===== Footer commun ===== */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: rgba(8, 7, 12, 0.5);
  color: var(--text-dim);
  font-size: 13px;
}
.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 28px 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr;
  gap: 32px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
}
.footer-desc { margin: 0; line-height: 1.6; max-width: 320px; }
.footer-titre {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.footer-liens-vide, .footer-svc-vide { color: var(--text-faint); font-style: italic; }
.footer-services { display: flex; flex-direction: column; gap: 9px; }
.footer-svc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}
.svc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
.footer-svc.etat-ok .svc-dot {
  background: #4ade80;
  box-shadow: 0 0 7px rgba(74, 222, 128, 0.8);
}
.footer-svc.etat-lent .svc-dot,
.footer-svc.etat-degrade .svc-dot {
  background: #ffa35e;
  box-shadow: 0 0 7px rgba(255, 163, 94, 0.8);
}
.footer-svc.etat-hs .svc-dot {
  background: #f87171;
  box-shadow: 0 0 7px rgba(248, 113, 113, 0.8);
}
.footer-bas {
  border-top: 1px solid var(--border);
  padding: 14px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* Anime sans fiche MyAnimeList : bouton de statut inerte. */
.cpb-statut-inactif { opacity: .35; cursor: not-allowed; }

/* ===== Modale de signalement (report) ===== */
.signalement-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 5, 12, .78); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.signalement-modale {
  position: relative; width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 24px 26px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.signalement-modale h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--text); }
.sig-cible {
  font-size: 12.5px; color: var(--text-dim); margin: 0 0 16px;
  padding: 7px 11px; background: var(--surface-2); border-radius: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sig-fermer {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px;
  border: none; background: transparent; color: var(--text-faint);
  font-size: 15px; cursor: pointer; border-radius: 50%;
}
.sig-fermer:hover { background: var(--surface-2); color: var(--text); }
.sig-label {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
}
.sig-facultatif { font-weight: 400; color: var(--text-faint); }
.sig-facultatif.sig-requis { color: var(--orange, #f59e0b); font-weight: 700; }
.sig-compteur { font-size: 11px; color: var(--orange, #f59e0b); margin-top: 2px; }
.sig-compteur[hidden] { display: none; }
.sig-label select, .sig-label textarea {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 10px 12px;
  font-size: 13.5px; font-family: inherit; resize: vertical;
}
.sig-label select:focus, .sig-label textarea:focus { outline: none; border-color: var(--accent, #7c3aed); }
.sig-erreur { color: var(--rouge, #e74c3c); font-size: 12.5px; margin: 0 0 10px; }
.sig-erreur[hidden] { display: none; }
.sig-actions { display: flex; gap: 10px; margin-top: 4px; }
.sig-annuler, .sig-envoyer {
  flex: 1; border-radius: 999px; padding: 11px; font-size: 13.5px;
  font-weight: 700; cursor: pointer; font-family: inherit; border: none;
}
.sig-annuler { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.sig-annuler:hover { background: var(--border-strong); }
.sig-envoyer { background: var(--rouge, #e74c3c); color: #fff; }
.sig-envoyer:hover:not(:disabled) { filter: brightness(1.1); }
.sig-envoyer:disabled { opacity: .6; cursor: default; }
.sig-note { font-size: 10.5px; color: var(--text-faint); text-align: center; margin: 12px 0 0; }
.sig-merci { text-align: center; padding: 10px 0; }
.sig-merci-ico { font-size: 34px; display: block; margin-bottom: 8px; }
.sig-merci p { font-size: 13px; color: var(--text-dim); margin: 0 0 18px; }

/* Bouton « signaler » discret réutilisable */
.btn-signaler {
  background: transparent; border: 1px solid var(--border); color: var(--text-faint);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: color .15s, border-color .15s;
}
.btn-signaler:hover { color: var(--rouge, #e74c3c); border-color: rgba(231,76,60,.5); }

/* Avertissement « semaine estimée » (planning multi-semaines sans AniList). */
#avis-zone {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
}

.avis-estimation {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 176, 32, .35);
  background: rgba(255, 176, 32, .08);
  color: #ffce7a;
  font-size: .82rem;
}

/* Semaine en cours : le libellé n'est plus un raccourci, on le montre. */
.semaine-label-inerte { cursor: default; }
.semaine-label-inerte:hover::after { transform: scaleX(0); }

/* Note moyenne dans le bandeau d'une carte manhwa — l'équivalent du
   compteur d'épisodes côté anime, à la même place. */
.cpb-note {
  font-size: 10px;
  font-weight: 700;
  color: #ffd166;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Liens du pied de page (mentions légales, confidentialité, contact). */
.footer-liens a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 3px 0;
  transition: color .16s var(--ease);
}

.footer-liens a:hover { color: var(--accent-2); }

/* ===== Retours des testeurs ============================================ */
.retour-bulle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--gradient-principal);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(124, 58, 237, .9);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.retour-bulle:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(124, 58, 237, 1); }
.retour-bulle:active { transform: translateY(0) scale(.97); }
.retour-bulle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Sur mobile, seule la bulle reste : le libellé mangerait l'écran. */
@media (max-width: 560px) {
  .retour-bulle { right: 14px; bottom: 14px; padding: 12px; }
  .retour-bulle-txt { display: none; }
}

.retour-voile {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 5, 12, .72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: retour-apparait .14s ease-out;
}

@keyframes retour-apparait { from { opacity: 0; } to { opacity: 1; } }

.retour-boite {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
}

.retour-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.retour-tete h3 { font-family: var(--font-titre); font-size: 17px; font-weight: 700; margin: 0; }

.retour-fermer {
  border: none; background: transparent; color: var(--text-dim);
  font-size: 15px; cursor: pointer; padding: 4px 6px; line-height: 1;
}
.retour-fermer:hover { color: var(--text); }

.retour-aide { font-size: 12.5px; color: var(--text-faint); margin: 6px 0 16px; }
.retour-aide b { color: var(--text-dim); }

.retour-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.retour-type {
  font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 7px 13px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.retour-type:hover { color: var(--text); }
.retour-type.actif { background: rgba(124, 58, 237, .25); border-color: var(--accent-2); color: var(--accent-2); }

.retour-boite textarea {
  width: 100%; resize: vertical;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font: inherit; font-size: 13.5px; line-height: 1.6; padding: 11px 13px;
}
.retour-boite textarea:focus { outline: none; border-color: var(--accent-2); }

.retour-compteur { text-align: right; font-size: 11px; color: var(--text-faint); margin-top: 4px; }

.retour-capture { margin-top: 10px; }

.retour-apercu { position: relative; margin-top: 10px; display: inline-block; }
.retour-apercu img {
  max-width: 100%; max-height: 180px; border-radius: var(--radius);
  border: 1px solid var(--border); display: block;
}
.retour-retirer {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: rgba(8, 7, 12, .8); color: #fff;
  font-size: 11px; cursor: pointer; line-height: 1;
}
.retour-retirer:hover { background: #e24b4a; }

.retour-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.retour-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.retour-btn.primaire { background: var(--accent); border-color: var(--accent); color: #fff; }
.retour-btn.primaire:hover { background: var(--accent-3); color: #fff; }
.retour-btn[disabled] { opacity: .5; cursor: not-allowed; }

.retour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.retour-msg { font-size: 13px; margin: 12px 0 0; }
.retour-msg.ko { color: #f87171; }

.retour-merci { text-align: center; padding: 22px 10px 10px; }
.retour-merci-ic { font-size: 34px; margin: 0 0 8px; }
.retour-merci h3 { font-family: var(--font-titre); font-size: 17px; margin: 0 0 6px; }
.retour-merci p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 18px; }
