:root { --bg:#fff; --panel:#0f0f0f; --muted:#9aa0a6; --text:#0f0f0f; --primary:#b8b8b8; --border:#222; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.screen .container { margin: 0 auto; padding: 16px; }
.topbar { 
  display:flex; justify-content: center; align-items:baseline; gap:16px; margin-bottom:16px; box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 7%), 0 2px 1.5px 2px rgb(0 0 0 / 7%) !important;
        border-radius: 15px;
}
.topbar h1 { margin:0; font-size: 20px; }
.hint { text-align: center; color: var(--muted); font-size: 14px; }
.layout--dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr; /* plein écran par défaut */
  gap: 20px;
}
.h2-video {
  color: #fff;
}

/* Par défaut : 1 seule colonne */
.layout--dashboard {
  display: grid;
  grid-template-columns: 1fr; /* plein écran par défaut */
  gap: 20px;
}

/* Quand un panneau de commentaires est ouvert */
.layout--dashboard.expanded {
  /*  grid-template-columns: 1fr 1fr; deux colonnes */
}


.menu-toggle {
  width: 100%;
  text-decoration: none;
  font-size: 12px;
  border-radius: 5px;
  border: solid 1px #0f0f0f;
  color: #0f0f0f;
  background: transparent;
  padding: 9px 10px;/*padding: 6px 10px;*/
  cursor: pointer;
}
.menu-toggle:hover {
  color: #ffffff;
  background: #1A1A1A;
}

.player-wrap { position: relative; background: #000; border:1px solid var(--border); border-radius: 12px; overflow: hidden; }
video { width: 100%; display:block; background:#000; }
.floating { position:absolute; right:12px; top:12px; background:var(--panel); border:1px solid var(--border); color:var(--text); padding:8px 12px; border-radius:999px; cursor:pointer; opacity:.9; }

/* ✅ Liste des commentaires défilable */
.comments-col {
  display: flex;
  flex-direction: column;
  overflow-y: auto;        /* active le scroll vertical */
  scrollbar-width: thin;   /* (Firefox) barre fine */
  scrollbar-color: #666 #222; /* (Firefox) couleurs */
}

section h1 {
    margin-bottom: 0rem !important;
}

.btn-thoprod {
  cursor: pointer;
  border: none !important;
  box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 50%), 0 2px 1.5px 2px rgb(0 0 0 / 4%) !important;
  /*box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 7%), 0 2px 1.5px 2px rgb(0 0 0 / 7%) !important;*/
}
.btn-thoprod:hover {
  border: none !important;
  box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 7%), 0 2px 1.5px 2px rgb(0 0 0 / 7%) !important;
}

.commentaires {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
}

/* ✅ Style scrollbar (Chrome, Edge, etc.) */
.comments-col::-webkit-scrollbar {
  width: 8px;
}
.comments-col::-webkit-scrollbar-thumb {
  background-color: #666;
  border-radius: 4px;
}
.comments-col::-webkit-scrollbar-track {
  background: #222;
}

.comments-head { padding-left: 5px; display:flex; align-items:flex-start; justify-content:space-between; flex-direction: column;}
.comments { font-size: 12px; list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; margin-bottom: 10px;}
.comment { display:flex; align-items:flex-start; gap:12px; background:#ffffff00; box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 7%), 0 2px 1.5px 2px rgb(0 0 0 / 7%) !important; border-radius:10px; padding:10px; }
.comment.is-resolved { opacity:.6; }
.comment__time, .comment .comment__time { width: 100%; font-variant-numeric: tabular-nums; font-weight:700; background:#1a1a1a; border:1px solid var(--border); color:#fff; padding:6px 8px; border-radius:8px; cursor:pointer; }
.comment__body { flex:1; }
.comment__meta { color: #4d4d4d; font-size: 12px; margin-bottom: 4px; }
.comment__actions { display:flex; align-items:center; gap:8px; }

/* Style de la corbeille à côté de la date */
.reply__delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  transition: color 0.2s ease;
  vertical-align: middle;
  position: relative;
}

.reply__delete:hover {
  transform: scale(1.1);
}




/* Disposition plus propre des métadonnées */
.reply__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.reply__author {
  font-weight: 600;
  color: #4d4d4d;
}
.reply__meta {
  color: #4d4d4d;
}

.videos { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.video { display:flex; align-items:center; justify-content:space-between; gap:12px; box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 7%), 0 2px 1.5px 2px rgb(0 0 0 / 7%) !important; border-radius:10px; padding:12px; }
.video__title { font-weight:600; color: #444;}
.video__meta { color:var(--muted); font-size:12px; }
.video__actions { display:flex; gap:8px; }


.btn { padding:8px; border-radius:5px; cursor:pointer; }

.btn {
    color: #0f0f0f;
    text-decoration: none;
    font-size: 12px;
    border-radius: 5px;
    border: solid 1px #0f0f0f;
}
.btn:hover { border: solid 1px #000; color: #000;}


.btn--primary { background: var(--primary); color:#000; border-color:transparent; }
.btn--ghost { width: 100%; background: transparent; }

.btn--active {
  background: #444;
  color: #fff;
}

.modal[aria-hidden="true"] { display:none; }
.modal { position:fixed; inset:0; display:grid; place-items:center; background: rgba(0,0,0,.6); padding:16px; }
.modal__panel { background: #fff; border:1px solid var(--border); border-radius:12px; padding:16px; max-width:520px; width:100%; }
.field { margin-bottom:12px; }
.field label { display:block; margin-bottom:6px; color:var(--muted); font-size:13px; }
input[type=text], textarea { width:100%; background: #ffffff00; border:1px solid var(--border); color:var(--text); border-radius:8px; padding:8px; }
.actions { display:flex; gap:8px; justify-content: flex-start; align-items: center;}

.btn-100 {
  width: 100%;
  background: #ffffff00;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn--ghost:hover {
  color: #000;
  border-color: #000;
}
.btn-red:hover {
  color: #ff6666;
  border-color: #ff6666;
  background: #ffffff00;
}
.btn-red {
  background: #ffffff00;
  color: #444;
}
.btn-orange:hover {
  color: #ff8800;
  border-color: #ff8800;
  background: #ffffff00;
}
.btn-orange {
  background: #ffffff00;
  color: #444;
}
.btn-vert:hover {
  color: #18cf00;
  border-color: #18cf00;
  background: #ffffff00;
}
.btn-vert {
  background: #ffffff00;
  color: #444;
  margin-top: -5px !important;
  margin-bottom: 12px;
}
.btn-green:hover {
  color: #18cf00;
  border-color: #18cf00;
  background: #ffffff00;
}
.btn-green {
  background: #ffffff00;
  color: #444;
}
.btn-repondre {
  background: #ffffff00;
  color: #444;
  margin-top: -5px !important;
}
.btn-repondre:hover {
  color: #000000;
  border-color: #000000;
  background: #ffffff00;
}


.comment__actions {
  display: flex;
  gap: 6px;
}

.comment__actions .btn { width: 100% !important; margin-top: 7px;}
.status-done {
  display: inline-block;
  padding: 7px 8px;
  border-radius: 6px;
  background: #28a745;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  width: 100%;
  text-align: center;
}
.is-resolved .comment__time, .comment .comment__time {
    width: 100% !important;
    text-align: center;
}
.h2-video {
    text-align: center;
}

.timeline-markers {
  position: absolute;
  bottom: 18px; /* hauteur au-dessus de la barre native du player */
  left: 0;
  width: 100%;
  height: 10px;
  pointer-events: none; /* laisse passer les clics vers les contrôles */
}

.timeline-markers .marker {
  position: absolute;
  bottom: 0;
  width: 5px;
  height: 8px;
  border-radius: 0%;
  background: #ffffff;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto; /* réactive clic uniquement sur la pastille */
}
.timeline-markers .marker:hover {
  background: #ff8888;
}

/* Input color */
.color-picker-container {
    display: flex;
    align-items: center;
}
input[type="color" i] {
    appearance: auto;
    inline-size: 50px;
    block-size: 27px;
    cursor: default;
    box-sizing: border-box;
    background-color: buttonface;
    color: buttontext;
    border-width: 1px;
    border-style: solid;
    border-color: buttonborder;
    border-image: initial;
    padding: 1px 2px;
}

.video__actions {
    width: 16% !important;
    flex-direction: column !important;
}

.btn-dashbord {
  color: #444;
}
.btn-dashbord:hover {
  color: #000 !important;
}

/* MOBILE */
@media (min-width: 0px) and (max-width: 900px) {
.layout, .layout--dashboard { grid-template-columns: 1fr;}
.hint { font-size: 8px; padding-top: 10px; text-align: center; }
.comments-col { margin-top: 10px;}
.comments-head { font-size: 10px; padding-left: 0px; padding-right: 4px; padding-bottom: 1rem; padding-top: 2rem; place-items: center; flex-direction: inherit !important;}
.comment { flex-direction: column; }
.comment__actions { width: 100%; }
.settings-btn { display: none;}
.dec30 { margin-top: 0px; }
.emoji-menu.active {justify-self: anchor-center !important; }
.reply { margin-top: 10px !important; }
.btn { padding: 5px !important; }
.menu-buttons { margin-top: 5px; }
.btn-958 { padding-left: 0px !important; padding-right: 0px !important; gap: 10px !important; padding-top: 6px; padding-bottom: 6px;}
.comment, .topbar, .player-wrap { margin: 5px !important; }
.btn-958 { margin: -7px 3px -4px 8px !important; width: 98% !important; }
.mt-10 { margin-top: -10px; }
.mt-25 { margin-top: -25px; }
/*.logo h2 { margin-top: 2rem !important; }*/
.logo img { margin-top: 2rem !important; border-radius: 10px; }
header { margin-bottom: 2rem !important; }
.layout { box-shadow: 0 1px 1.5px 0px rgb(0 0 0 / 7%), 0 2px 1.5px 2px rgb(0 0 0 / 7%); padding: 5px; border-radius: 15px; width: 100%; }
.screen .container { padding: 20px !important; }
.footer { margin-top: -10px !important; }
.comments-col #commentsList li { text-align: center; padding-bottom: 10px; }
/* Supprimer le grand ecran option */
#customFullscreenBtn, #slideToggleComments, aside { display: none;}
.mobile-suppr { display: none;}
.modal__panel { margin: 20px !important; width: 91% !important; left: 45% !important; }
.comment__meta, .comment__text { text-align: left !important; }
.center_mobile { text-align: center !important; }
#toggleKey { right: 22% !important; }
.input-nom-projet { padding: 9px !important; }
#embedCode { height: 90px !important; }
#downloadBtn { width: 90% !important; }
.external-link-section { margin-top: 1.3rem;}
.button-deco {font-size: 10px!important;padding: 11px 20px !important; }
}

@media (min-width: 1000px) {
.pc-suppr { display: none;}
header { margin: 0px 0px 0px 2px; padding-right: 0.7rem; max-width: 99%;}
.footer { margin-bottom: -15px !important; }
#refreshBtn, .actions { margin-bottom: 30px; margin-top: -15px; padding: 7px;}
.nomargin { margin-bottom: 0px !important; margin-top: 0px !important; }
.comment__actions { flex-direction: column; width: 20%; }
.screen .container { max-width: 99%; }
.w100 { width: 100%; }
.ml5 { margin-top: -5px; }
.dec30 { margin-top: 0px; margin-bottom: 30px; }
.comments-col { padding-right: 20px; }
.menu-toggle { margin-top: -6px; }
header { justify-content: center !important; margin-top: 0px;}
.logo img { margin-top: 58px !important; height: 80px !important; border-radius: 10px;}
.comments-col { max-height: 61.5vh; }
.reply { margin-top: 10px !important; }
.comment, .topbar, .player-wrap { margin: 5px !important; }
header {margin-bottom: 50px;}
}

.reply__delete {
    z-index: 1;
}
.modal {
    z-index: 1600;
}

.modal {
    margin-top: 0rem !important;
    border-radius: 0px !important;
    margin-bottom: 0rem !important;
}

.reply__meta {
    margin-top: -13px;
}

#emojiMenu, #emojiMenuReply {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: none;
  z-index: 10000;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#emojiMenu.active, #emojiMenuReply.active {
  display: flex;
  gap: 6px;
  transform: translateY(-4px);
}
#emojiMenu .emoji, #emojiMenuReply .emoji {
  cursor: pointer;
  font-size: 22px;
  transition: transform 0.15s ease;
}
#emojiMenu .emoji:hover, #emojiMenuReply .emoji:hover {
  transform: scale(1.25);
}



/* CSS pour l'animation */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CSS pour l'animation */
@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✨ Animation d’apparition fluide */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade5 {
  animation: fadeIn 5s ease forwards;
}

.anim {
    animation: slideInUp 1s ease forwards;
}

.anim2 {
    animation: slideInUp 1.5s ease forwards;
}

.anim3 {
    animation: slideInUp 2s ease forwards;
}

.anim3Down {
    animation: slideInDown 2s ease forwards;
}

.anim4 {
    animation: slideInUp 2.5s ease forwards;
}

.anim5 {
    animation: slideInUp 3s ease forwards;
}


/* === MENU EMOJI FLOTANT === */
#emojiMenu {
  position: absolute;
  display: flex;
  gap: 8px;
  background: #1c1c1c;
  color: #fff;
  padding: 8px 10px;
  border-radius: 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 9999;
}

/* Quand actif → visible */
#emojiMenu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Petites bulles emoji */
#emojiMenu .emoji {
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
  user-select: none;
}

#emojiMenu .emoji:hover {
  transform: scale(1.3);
  filter: brightness(1.3);
}

/* Petite flèche triangulaire vers le bas */
#emojiMenu::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1c1c1c transparent transparent transparent;
}

/* 🌟 Menu emojis flottant */
.emoji-menu {
  display: none;
  position: absolute;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  padding: 8px 12px;
  gap: 8px;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.emoji-menu.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

.emoji-menu .emoji {
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.emoji-menu .emoji:hover {
  transform: scale(1.4);
}


.reactions {
  margin-top: 5px;
  display: flex;
  gap: 6px;
  font-size: 12px;
}

.reaction small {
  font-size: 12px;
  opacity: 0.7;
}



.comment, .reply {
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation; /* autorise tap/press, évite double-tap zoom */
}













/*ADD*/
/* Panel commentaires en mode grand écran personnalisé */
.comments-col.fs {
  position: fixed;
  top: 0;
  right: 0;
  width: 550px;
  height: 100vh;
  background: rgba(255,255,255,0.9);
  color: #000;
  overflow-y: auto;
  z-index: 1001;
  padding: 0 20px;
  box-shadow: -4px 0 10px rgba(0,0,0,0.5);
  /* 💫 Animation */
  transform: translateX(100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
  will-change: transform, opacity;
}

/* Ouvert */
.comments-col.fs.open {
  transform: translateX(0);
  opacity: 1;
}

/* Fermé */
.comments-col.fs.closed {
  transform: translateX(100%);
  opacity: 0;
}

/* Bouton flèche */
#toggleCommentsBtn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  color: #000;
  border: none;
  border-radius: 6px 0 0 6px;
  font-size: 20px;
  padding: 8px 10px;
  cursor: pointer;
  z-index: 1500;
  box-shadow: -4px 0 10px rgba(0,0,0,0.3);
  display: none; /* visible seulement en FS */
}
#toggleCommentsBtn.open { right: 550px; }   /* panel ouvert -> bouton collé au bord du panel */
#toggleCommentsBtn.closed { right: 0; }      /* panel fermé -> collé au bord écran */
