@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Orbitron:wght@500;700&display=swap');

/* ========================= ROOT (DARK DEFAULT) ========================= */
:root{
  --bg:#0b0b0f;
  --card:rgba(255,255,255,0.05);
  --border:rgba(255,255,255,0.08);
  --text:#ffffff;
  --darky:rgba(0,0,0,0.7);

  --primary: linear-gradient(135deg, #ff6a00, #ff2e00);
  --accent:#ff3c00;

  --comment: rgba(255,255,255,0.05);

  --glass-1: rgba(255,255,255,0.03);
  --glass-2: rgba(255,255,255,0.06);
  --glass-3: rgba(255,255,255,0.12);

  --border-soft: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.15);
}

/* ========================= LIGHT MODE ========================= */
body.dark{
  --bg:#f3f4f6;
  --card:#ffffff;
  --border:#e5e7eb;
  --text:#111827;
  --darky:rgba(255,255,255,0.7);

  --primary: linear-gradient(135deg, #ff6a00, #ff2e00);
  --accent:#ff3c00;

  --comment: rgba(255,255,255,0.6);

  --glass-1: rgba(0,0,0,0.02);
  --glass-2: rgba(0,0,0,0.05);
  --glass-3: rgba(0,0,0,0.72);

  --border-soft: rgba(0,0,0,0.05);
  --border-strong: rgba(0,0,0,0.1);
}

/* ========================= GLOBAL ========================= */
body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}



/* ========================= GLASS CARD ========================= */
.card, .box, .panel{
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border:1px solid var(--border-soft);
  border-radius:20px;

  box-shadow:
    0 10px 40px rgba(0,0,0,0.4),
    inset 0 0 20px rgba(255,255,255,0.05);

  transition:0.3s;
}

.card:hover{
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(255,80,0,0.3);
}

/* ========================= COMMENT / CODE BLOCK ========================= */
.comment, textarea, pre{
  background: var(--comment);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);

  border:1px solid var(--border-strong);
  border-radius:16px;

  box-shadow:
    inset 0 0 15px rgba(255,255,255,0.05),
    0 5px 20px rgba(0,0,0,0.2);
}

/* ========================= BUTTON ========================= */
button{
  background: var(--primary);
  border:none;
  color:white;
  padding:10px 18px;
  border-radius:12px;

  font-family:'Orbitron', sans-serif;
  letter-spacing:1px;

  cursor:pointer;
  transition:0.3s;
}

button:hover{
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,80,0,0.6);
}

/* ========================= TITLES ========================= */
h1,h2,h3{
  font-family:'Orbitron', sans-serif;
  letter-spacing:1px;
}

/* ========================= SCROLLBAR ========================= */
::-webkit-scrollbar{
  width:8px;
}

::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg,#ff6a00,#ff2e00);
  border-radius:10px;
}
/* ========================= RESET GLOBAL ========================= */ 
*{ 
    padding:0; margin:0; 
    text-decoration:none; 
    box-sizing:border-box; 
    font-family:'Inter', sans-serif;
}

header {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
}

#toggleTheme {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.layout {
  display: block;
  width: 100%;
}

/* COLONNES FIXES */
.side-menu,
.profile-panel {
  width: 280px;
  flex-shrink: 0;
  height: calc(100vh - 56px);
  position: fixed;
  top: 56px;
  background: var(--glass-dark);
  backdrop-filter: blur(20px);
  border-left: 1px solid #ddd;
  transition: 0.3s;
  z-index: 998;
  
}

.side-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s;
}

.side-menu a i, .profile-panel a i {
  font-size: 20px;
  min-width: 24px;
}

.side-menu a:hover {
  background: rgba(255,255,255,0.08);
}

.menu-separator {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 10px 0;
}

.menu-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #aaa;
  font-size: 14px;
  padding: 6px 10px;
}

.profile-panel a {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
}

.profile-panel a:hover {
  background: #f5f5f5;
}

.profile-user {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.divider {
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

.theme-toggle {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.danger {
  color: #c0392b;
}

/* Mobile */
@media (max-width: 991px) {


  .side-menu,
  .profile-panel {
    position: fixed;
    top: 56px;
    height: calc(100vh - 56px);
    z-index: 999;
    /*display: none;*/
  }

  .side-menu {
    left: -280px;
  }

  .profile-panel {
    right: -280px;
  }

  #burgerBtn,
  #profileBtn {
    display: block;
  }
  
  .title {
        font-size: 15px;
    }
    
  .side-menu {
    left: -280px;
  }

  .side-menu.open {
    left: 0;
  }

  .profile-panel {
    right: -280px;
  }

  .profile-panel.open {
    right: 0;
  }
}

@media (min-width: 992px) {

  /* LAYOUT 3 COLONNES */
  .layout {
    display: flex;
  }

  /* MENUS EN STICKY (PAS FIXED) */
  .side-menu,
  .profile-panel {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    left: auto;
    right: auto;
    z-index: 1;
  }

  .side-menu {
    border-right: 1px solid var(--border-dark);
  }

  .profile-panel {
    border-left: 1px solid var(--border-dark);
  }

  /* FEED CENTRÉ */
  .feed {
    margin: 0 0 1rem;
    max-width: 680px;
    padding: 15px;
  }

  /* ICÔNES MOBILE CACHÉES */
  #burgerBtn,
  #profileBtn {
    display: none !important;
  }
}

/* FEED CENTRAL */
.feed {
  width: 100%;
  max-width: 680px;
  margin: 0 0 1rem;
  padding: 15px;
}

/* Post */
.post {
    background: var(--card);
    border-radius: 18px;
    padding: 14px;
    border: 1px solid var(--border-dark);
    transition: 0.2s;
    margin-bottom: 1rem;
}

.post:hover {
    transform: translateY(-2px);
}

/* Header */
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info{
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-weight: 700;
    color: --text;
}

.timePlus{
    display: flex;
    align-items: center;
    gap: 10px;
}

.plus{
    cursor: pointer;
}

.time {
    font-size: 12px;
    opacity: 0.7;
    color: #6b7280;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
}

/* Title */
.title, a {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}


.read-more {
    /*color: #9ca3af;*/     /* gris clair */
    color: #4ea1ff;
    text-decoration: none;
    font-size: 14px;
    margin-left: 4px;
}

.read-more:hover {
    text-decoration: underline;
}

/* Image */
.image-box {
    width: 100%;
    /*max-height: 500px;*/
    margin-top: 12px;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.image-box img, video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;   /* recadre sans déformer */
    display: block;
}

/* Views */
.views {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: var(--darky);
    backdrop-filter: blur(4px);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
}

/* Actions */
.actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.action {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
}

/*.action:hover {
    background: rgba(0,0,0,0.05);
}*/

.actions i, .timePlus i {
    font-size: 20px;
    transition: 0.3s;
}

.actions i:hover {
    transform: scale(1.2) rotate(5deg);
    color: #ff4d8d; /* rose anime */
}

/* Controls */
.controls {
    display: flex;
    gap: 8px;
}

select {
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* Skeleton */
.skeleton {
    height: 320px;
    border-radius: 18px;
    background: linear-gradient(90deg,#e5e7eb 25%,#f3f4f6 37%,#e5e7eb 63%);
    animation: loading 1.2s infinite;
}

@keyframes loading {
    to { background-position: 200% 0; }
}

/* Like active */
.liked {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
}

.lik.loading {
    pointer-events: none;
    opacity: 0.6;
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    opacity: 0.6;
  pointer-events: none;
}

.like.liked i {
  color: #0080ff;
}

/* Lazy image */
img.lazy {
    filter: blur(6px);
    transition: 0.4s;
}

img.loaded {
    filter: blur(0);
}

/*Post view */
.post-content {
    line-height: 1.3;
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 0.2rem;
    word-wrap: break-word;
    font-family: 
       Inter, system-ui,
       -apple-system, 
       BlinkMacSystemFont,
       sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
}

/* Paragraphes */
.post-content p {
  margin-bottom: 1rem;
}

/* Citations */
.post-content blockquote {
  border-left: 4px solid #2a7cff;
  padding: .8rem 1rem;
  margin: 1.2rem 0;
  background: #f1f5ff;
  border-radius: 6px;
  position: relative;
}

.post-content blockquote::before {
  content: "\eb9c";
  font-family: boxicons;
  position: absolute;
  left: 10px;
  top: 8px;
  color: #2a7cff;
}

/* Code */
.post-content pre {
  /*background: #1e1e1e;*/
  background: var(--bg);
  color: #eaeaea;
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
  position: relative;
}

.post-content pre code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

/* Bouton copier */
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  /*background: #3b82f6;*/
  background: var(--darky);
  color: var(--text);
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.post-content ul,
.post-content ol {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
  position: relative;
}

/* Ligne verticale fine */
.post-content ul::before,
.post-content ol::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 1.1rem;
  width: 1px; /* ligne plus fine */
  height: calc(100% - 2.4rem); /* évite toucher les cercles */
  background: #3b82f6;
  opacity: 0.35;
}

/* Élément */
.post-content li {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

/* Cercle */
.post-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1.5px solid #3b82f6;
  background: var(--card);
  z-index: 2;
}

/* Numérotation */
.post-content ol {
  counter-reset: step;
}

.post-content ol li::after {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #3b82f6;
  z-index: 3;
}

/* Puce pour ul */
.post-content ul li::after {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #3b82f6;
  z-index: 3;
}

/* Dernier élément */
.post-content li:last-child {
  margin-bottom: 0;
}

/* Liens */
.post-content a {
  color: #2a7cff;
  text-decoration: underline;
}

.hashtag {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 7px 16px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;

  text-decoration: none;

  border: 1px solid var(--border);
  /*background: #;*/
  color: #1e293b;

  transition: all .25s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.hashtag:hover {
  background: none;
  /*color: #fff;*/
  border-color: #4da3ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(77,163,255,0.25);
}

.hashtag.active {
  background: #4da3ff;
  color: #fff;
  border-color: #4da3ff;
}

.hashtag.hot {
  background: #fff7ed;
  border-color: #fb923c;
  color: #c2410c;
}

.hashtag.inline {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  font-weight: 500;
  color: #4da3ff;
}

.hashtag.inline:hover {
  background: none;
  color: #1d4ed8;
  box-shadow: none;
  transform: none;
}

.hashtag.premium {
  background: linear-gradient(135deg,#facc15,#f97316);
  border: none;
  color: #000;
}

.md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.md-table th,
.md-table td {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
}

.md-table th {
    background: #f6f7f8;
    font-weight: 600;
    text-align: left;
}

.md-table tr:nth-child(even) {
    background: #fafafa;
}


.video-box{
    position:relative;
    border-radius:16px;
    overflow:hidden;
    cursor:pointer;
    background:#000;
}

/* preview vidéo (sans controls) */
.video-preview{
    width:100%;
    display:block;
    object-fit:cover;
    filter:brightness(0.9);
}

/* overlay sombre */
.video-overlay{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    transition:0.3s;
}

/* bouton play */
.video-overlay i{
    font-size:60px;
    color:white;
    background:rgba(0,0,0,0.6);
    border-radius:50%;
    padding:15px;
    transition:0.3s;
}

/* hover effet */
.video-box:hover .video-overlay{
    background:rgba(0,0,0,0.5);
}

.video-box:hover .video-overlay i{
    transform:scale(1.1);
}

/* vidéo active */
.video-player{
    width:100%;
    border-radius:16px;
    background:#000;
}

/* Youtube preview */
/*.youtube-box{
    position:relative;
    cursor:pointer;
}

.youtube-box img{
    width:100%;
    border-radius:16px;
}

.youtube-box iframe{
    width:100%;
    height:220px;
    border-radius:16px;
}*/

/* Bouton play stylé */
/*.play-btn{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:60px;
    height:60px;
    border-radius:50%;
    background:rgba(0,0,0,0.6);
    display:flex;
    align-items:center;
    justify-content:center;
    backdrop-filter: blur(6px);
}

.play-btn i{
    color:white;
    font-size:30px;
}*/

/* Hover effet */
/*.youtube-box:hover .play-btn{
    transform:translate(-50%,-50%) scale(1.1);
}*/


/*Bouton retour*/
.rules-back{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-bottom:15px;
    color:var(--primary);
    text-decoration:none;
    font-size:0.9rem;
}

.rules-back:hover{
    text-decoration:underline;
}


/*Premium*/
/*.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-left: 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #2b1d00;
    background: linear-gradient(135deg, #FFD700, #F5C542, #E6B800);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.premium-badge i {
    font-size: 16px;
    color: #8a5b00;
}*/

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-left: 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #2b1d00;
    background: linear-gradient(135deg, #FFD700, #F5C542, #E6B800);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

.premium-badge i {
    font-size: 16px;
    color: #8a5b00;
}

.premium-user {
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.12);
}

.premium-avatar {
    border: 3px solid #FFD700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
}

.premium-name {
    background: linear-gradient(90deg, #FFD700, #FFF3B0, #F5C542);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}