/* Variables globales */
:root {
    --primary-bg: #404040;
    --secondary-bg: #404040;
    --header-bg: #1a1a1a;
    --text-color: #fff;
    --accent-color: #4a90e2;
    --grid-bg: #454647;
    --card-bg: #1a1a1a;
    --hover-color: #5a5a5a;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header Principal */
.primary-header {
    background-color: var(--header-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    background-image: url('/images/logo.png');
    background-repeat: no-repeat;
    background-size: contain; /* Ajouté pour s'assurer que l'image s'adapte */
    width: 150px;
 height: 60px;
    margin-bottom:  -15px;
        margin-top:  -5px;
}

.logo a {
text-indent: -9999px;
      font-size: 30px;
    font-weight: bold;
    display: block;
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Contenu Principal */
.main-content {
    padding: 20px;
    background-color: var(--grid-bg);
    min-height: calc(80vh - 140px);
}

/* Zone des vidéos */
.video-container {
    max-width: 1200px;
    margin: 0 auto;
}

.video-section {
    width: 90%;
    left: 5%;
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 0 15px 0 #C5BDA9;
}

.video-section video {
    width: 100%;
    display: block;
}

/* Contrôles vidéo */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-section:hover .video-controls,
.video-controls:hover {
    opacity: 1;
}

.video-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
    position: relative;
    cursor: pointer;
}

.video-progress-filled {
    height: 100%;
    background: #ff0000;
    width: 0;
}

.video-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.video-time {
    font-size: 14px;
    margin-left: 10px;
    color: #fff;
}

/* Contrôles volume */
.volume-container {
    display: flex;
    align-items: center;
    position: relative;
}

.volume-slider {
    width: 0;
    height: 30px;
    overflow: hidden;
    transition: width 0.3s;
    display: flex;
    align-items: center;
}

.volume-container:hover .volume-slider {
    width: 100px;
}

.volume-progress {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 10px;
    cursor: pointer;
}

.volume-progress-filled {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 2px;
}

/* Stats et interactions */
.stats-right {
    font-size: 18px;
    text-align: left;
    margin: -20px 0 2% 10%;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Media query pour tablettes */
@media screen and (max-width: 1024px) {
    .stats-right {
        font-size: 16px;
        margin: -15px 0 2% 8%;
        gap: 15px;
    }
}

/* Media query pour mobile */
@media screen and (max-width: 768px) {
    .stats-right {
        font-size: 14px;
        margin: -10px 0 2% 5%;
        gap: 12px;
        flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
    }
}

/* Très petits écrans */
@media screen and (max-width: 480px) {
    .stats-right {
        font-size: 13px;
        margin: -8px 0 2% 3%;
        gap: 10px;
    }
}

.view-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Bouton Like */
.like-form {
    display: inline-flex;
}

.like-button {
    font-size: 18px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
}

.like-button:active {
    transform: scale(1.2);
}

.like-button.liked {
    font-size: 20px;
    color: #d926a4;
}

/* Bouton Achat */
.buy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.buy-button:hover {
    background: linear-gradient(90deg, #4fc3f7, #00bfa5);
    transform: translateY(-2px);
}

/* Titre et Description */
.video-title {
    white-space: pre-line;
    margin-left: 10%;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.video-description {
    margin-left: 10%;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Section Commentaires */
.login-prompt {
    text-align: center;
    padding: 20px;
    background: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 20px;
}
.comments-section {
    margin: 40px 40% 0 10%;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
}

/* Media query pour tablettes */
@media screen and (max-width: 1024px) {
    .comments-section {
        margin: 30px 30% 0 10%;
        padding: 15px;
    }
}

/* Media query pour mobile */
@media screen and (max-width: 768px) {
    .comments-section {
        margin: 20px 5% 0 5%; /* Marges réduites et égales */
        padding: 12px;
        border-radius: 6px;
    }
}

/* Très petits écrans */
@media screen and (max-width: 480px) {
    .comments-section {
        margin: 15px 2% 0 2%;
        padding: 10px;
    }
}

.comments-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.comment-form {
    margin-bottom: 30px;
}
.comment-input-container {
    display: flex;
    margin-bottom: 1px;
}
.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #2a2a2a;
    color: #fff;
    margin-bottom: 10px;
    resize: vertical;
}

.comment {
    position: relative;
margin: -40px  0px  20px 40px;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    
    background-image: radial-gradient(
      at 90% 0%,
      hsla(43, 15%, 9%, 1) 0px,
      transparent 85%
    ),
    radial-gradient(at 49% 30%, #2a2a2a 0px, transparent 95%),
    radial-gradient(at 14% 26%, #2a2a2a 0px, transparent 95%),
    radial-gradient(at 0% 64%, #2a2a2a 0px, transparent 95%),
    radial-gradient(at 41% 94%, #2a2a2a  0px, transparent 95%),
    radial-gradient(at 100% 99%, #5596d4 0px, transparent 95%);
  box-shadow: 0px -1px 2px 0px #71b6f9 inset;
}



.vip-comment {
 background-image: radial-gradient(
      at 90% 0%,
      hsla(43, 15%, 9%, 1) 0px,
      transparent 85%
    ),
    radial-gradient(at 49% 30%, #2a2a2a 0px, transparent 95%),
    radial-gradient(at 14% 26%, #2a2a2a 0px, transparent 95%),
    radial-gradient(at 0% 64%, #2a2a2a 0px, transparent 95%),
    radial-gradient(at 41% 94%, #2a2a2a  0px, transparent 95%),
    radial-gradient(at 100% 99%, #edc747 0px, transparent 95%);
  box-shadow: 0px -1px 2px 0px #fcdc70 inset;
}

.comment-content-wrapper {
    flex-grow: 1;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
	   box-shadow: 0px 0px 1px 0px #C5BDA9;
}

.comment-header {
        margin-top:-10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-author {
  font-weight: bold;
    color: #fff;
}
.comment-form button {
    
    padding:8px 20px;
    margin-left:40px;
    background: var(--accent-color);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form button:hover {
    background: #357abd;
}

.comment-date {
    
    margin-left:  20px;
    font-size: 12px;
    color: #888;
}

.comment-content {
       margin-left:4px;
    color: #fff;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;          /* Permet au texte de se couper */
    overflow-wrap: break-word;      /* Version moderne de word-wrap */
    word-break: break-word;         /* Coupe les mots très longs si nécessaire */
    overflow: hidden;               /* Cache tout débordement */
    max-width: 100%;               /* S'assure que le contenu ne dépasse pas */
}

.edit-comment-btn {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    padding: 10px;
}

.vip-badge {
    background-color: #ffd700;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}


/* Footer */
.footer {
    background-color: var(--header-bg);
    text-align: center;
    padding: 15px;
    margin-top: auto;
}

/* Notifications et Upload */
.notifications {
    position: relative;
    margin-right: 20px;
}


.bell-icon{
	 font-size: 25px;
}


.notifications a {
    color: var(--text-color);
    text-decoration: none;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -15px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 20px;  /* Largeur fixe */
    height: 20px; /* Hauteur fixe et égale à la largeur pour garantir un cercle */
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.notifications-dropdown {
 
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    margin-right:-42px;
    width: 250px;
    background-color: var(--secondary-bg);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 300px;
    border: #5f6060 solid 1px;
   -webkit-border-radius: 10px;
   -moz-border-radius: 10px;
   border-radius: 10px;
}

.notifications-dropdown:after
{
  content: '';
    position: absolute;
    border-style: solid;
    border-width: 0 21px 14px;
    border-color: #404040 transparent;
    display: block;
    width: 0;
    z-index: 1;
    top: -14px;
    left: 175px;
}

.notifications-dropdown:before
{
    content: '';
    position: absolute;
    border-style: solid;
    border-width: 0 21px 14px;
    border-color: #5f6060 transparent;
    display: block;
    width: 0;
    z-index: 0;
    top: -15px;
    left: 175px;
}


.notifications:hover .notifications-dropdown {
    display: block;
}

.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item p {
    margin: 0 0 10px 0;
}

.view-all-btn {
    display: block;
    padding: 6px 10px;
    color: white;
    text-align: center;
    border-radius: 4px;
    margin-top: 5px;
    text-decoration: none;
     border: 0 solid;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0);
  outline: 1px solid;
  outline-color: rgba(255, 255, 255, 0);
  outline-offset: 0px;
  text-shadow: none;
  -webkit-transition: all 1250ms cubic-bezier(0.19, 1, 0.22, 1);
          transition: all 1250ms cubic-bezier(0.19, 1, 0.22, 1);
  outline-color: #ffefa3;
  outline-offset: 0px;
}

.view-all-btn:hover {
   border: 1px solid;
  box-shadow: inset 0 0 20px #ffefa3, 0 0 20px rgba(255, 255, 255, 0.2);
  outline-offset: 15px;
  outline-color: rgba(255, 255, 255, 0);
  text-shadow: 1px 1px 2px #427388;
}
/* Profil Utilisateur */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--secondary-bg);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 250px;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.user-profile:hover .profile-dropdown {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 8px 15px;
}

.profile-dropdown a:hover {
    background-color: var(--hover-color);
}

.user-info {
    padding: 10px 15px;
    border-bottom: 1px solid #fff;
    margin-bottom: 5px;
}

.user-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

/* Modal Connexion */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
}

.modal-content {
    background-color: var(--secondary-bg);
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Formulaires */
.login-form,
.register-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.login-form input,
.form-group input {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: var(--primary-bg);
    color: var(--text-color);
    width: 100%;
}

.login-btn,
.register-button {
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.login-btn:hover,
.register-button:hover {
    background-color: #357abd;
}

/* Messages */
.error-message,
.success-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.error-message {
    background-color: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.success-message {
    background-color: rgba(0, 200, 81, 0.1);
    color: #00C851;
}

/* Giveaway */
.giveaway-button {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.giveaway-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.giveaway-button:active {
    transform: translateY(1px);
}

.giveaway-button.participated {
    background: linear-gradient(45deg, #6BFF6B, #53FF8E);
    cursor: default;
    opacity: 0.8;
}

.giveaway-button:disabled {
    background: linear-gradient(45deg, #808080, #A0A0A0);
    cursor: not-allowed;
    opacity: 0.7;
}

.giveaway-button:not(.logged-in):not(.participated):hover::after {
    content: "Please log in";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse at bottom,
        rgba(71, 81, 92, 1) 0%,
        rgba(11, 21, 30, 1) 45%
    );
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 14px;
    white-space: nowrap;
    margin-bottom: 10px;
    z-index: 100;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 1s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.giveaway-winner {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 15px;
    padding: 5px 10px;
    margin: 10px 0;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    animation: winner-glow 2s infinite;
    color: black;
}

.giveaway-winner i {
    color: black;
    margin-right: 8px;
    font-size: 18px;
}

@keyframes winner-glow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
}

/* Partage sur les réseaux sociaux */
.share-container {
    position: relative;
    display: inline-block;
    margin: 0 8px;
}

.share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 1px;
    background: none;
    color: #fff;
    border: none;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.share-toggle:hover {
    opacity: 0.8;
    color: #f0a000;
}

.share-toggle:active {
    transform: scale(0.95);
}

.share-modal {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    width: 400px;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 16px;
    z-index: 1000;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.close-modal {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    padding: 4px;
}

.create-post-btn {
    width: 100%;
    padding: 10px;
    background: #ff1694;
    color: white;
    border: none;
    border-radius: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: #fff;
    transition: color 0.2s;
}

.share-option:hover {
    color: #f0a000;
}

.share-option i {
    font-size: 24px;
    margin-bottom: 6px;
}

.share-option span {
    font-size: 12px;
    font-weight: 500;
}

.embed-code-container {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #454647;
    border-radius: 8px;
}

.embed-code-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
}

.copy-btn {
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background: #267ce1;
}






/* Video info container layout */
.video-info-container {
    display: flex;
    margin: 0px 0;
    gap: 30px;
}

.video-info-left {
    flex: 3;
}

/* Giveaway section styling */
.giveaway-container {
    flex: 1;
    margin-top: -50px;
    margin-right: 70px;
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 5px;
    max-width: 250px;
margin-bottom: auto; 
}

.giveaway-header {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}



.giveaway-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.giveaway-thumbnail img {
     max-height: 110px;
    width: 100%;
    display: block;
}


.giveaway-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: -5px;
    padding-bottom: 15px;
}