:root {
  --bg-dark: #000;
  --text-light: #fff;
  --secondary-bg: #111;
  --max-width: 1200px;
    /* Dégradé principal */
  --gradient-start: #4648FF;
  --gradient-mid:   #FF7262;
  --gradient-end:   #FFAEA5;
}



/* Reset */
* {
  margin: 0; padding: 0; box-sizing: border-box;
  font-family: 'Epilogue', sans-serif;
}
body { background: var(--bg-dark); color: var(--text-light); }

/* Conteneur projet */
.project-overview {
  max-width: var(--max-width);
  margin: 2rem auto; padding: 1rem;
}
.top-row {
  display: flex; flex-wrap: wrap; gap: 2rem;
}
.video-container { flex: 1; min-width: 300px; position: relative; }
.big-video {
  width: 100%; display: block;
}
.fullscreen-btn {
  position: absolute; bottom:10px; right:10px;
  background:rgba(0,0,0,0.6); color:#fff; border:none;
  font-size:1.2rem; padding:0.3rem 0.6rem; border-radius:4px;
  opacity:0; transition:opacity .3s; cursor:pointer;
}
.video-container:hover .fullscreen-btn { opacity:1; }

.right-column { flex:1; min-width:300px; }
.right-column h2 {
  font-size:2rem; margin-bottom:1rem; color:#fff!important;
}
.right-column p { margin-bottom:1rem; line-height:1.5; }


.learn-more {
  color: var(--text-light);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;        /* désactive toute déco native */
  border-bottom: 1px solid var(--text-light);
  padding-bottom: 1px;    
  display: inline-block;
  transition: opacity 0.3s ease;
  margin-bottom: 25px;
}

.learn-more:hover {
  opacity: 0.8;
  cursor: pointer;
  /* si tu veux changer le style au survol, par ex. : */
  /* text-decoration-style: wavy; */
}




/* Détail expansible */
.detailed-text {
  opacity:0; max-height:0; overflow:hidden;
  transition:opacity .5s, max-height .5s;
}
.project-overview.expanded .detailed-text {
  opacity:1; max-height:2000px;
}
.detailed-text section { margin-bottom:1.5rem; }
.detailed-text h3 { font-size:1.3rem; margin-bottom:0.5rem; }
.detailed-text ul { margin-left:1.5rem; list-style:disc; }

/* CARROUSEL */
.carousel {
  position: relative; max-width: var(--max-width);
  margin:2rem auto; overflow:hidden;
}
.carousel__track-container { overflow:hidden; }
.carousel__track {
  display:flex; transition:transform .5s ease;
  list-style:none; padding:0; margin:0;
}
.carousel__slide { min-width:100%; box-sizing:border-box; }
.carousel__slide img {
  width:100%; display:block; border-radius:8px;
}
.carousel__btn {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,0,0,0.5); border:none; color:#fff;
  font-size:2rem; padding:0.2rem 0.6rem; cursor:pointer; z-index:10;
}
.carousel__btn--left  { left:1rem; }
.carousel__btn--right { right:1rem; }

/* Manage-images form (reste inchangé) */
.manage-images { /* ... vos règles existantes ... */ }

/* Responsive */
@media (max-width:1024px) {
  .top-row { flex-direction:column; }
}


.manage-images {
  background: var(--secondary-bg);
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: var(--max-width);
  border-radius: 8px;
  color: var(--text-light);
  font-family: 'Epilogue', sans-serif;
}

.manage-images h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.upload-form label {
  flex: 1 1 100%;
  font-size: 1rem;
}

.upload-form input[type="file"] {
  background: #2b2b2b;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
  color: #fff;
  flex: 1 1 auto;
}

.upload-form button {
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  transition: opacity 0.3s ease;
  flex: 0 0 auto;
}

.upload-form button:hover {
  opacity: 0.8;
}


.manage-images {
  background: var(--secondary-bg);
  padding: 2rem;
  margin: 2rem auto;
  max-width: var(--max-width);
  border-radius: 8px;
  color: var(--text-light);
  font-family: 'Epilogue', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.manage-images h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Formulaire de modification */
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.edit-form input[type="text"],
.edit-form textarea {
  background: #2b2b2b;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.6rem;
  color: #fff;
}
.edit-form button {
  align-self: flex-start;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  border: none; border-radius: 4px;
  padding: 0.6rem 1.2rem; color: #fff;
  cursor: pointer; transition: opacity 0.3s;
}
.edit-form button:hover { opacity: 0.8; }

/* Liste d’images et suppression */
.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.image-item {
  position: relative;
}
.image-item img {
  border-radius: 4px;
  max-width: 200px;
  display: block;
}
.delete-form {
  position: absolute;
  top: 4px; right: 4px;
}
.delete-form button {
  background: rgba(255,0,0,0.7);
  border: none; border-radius: 4px;
  color: #fff; padding: 0.2rem 0.6rem;
  cursor: pointer; transition: opacity 0.3s;
}
.delete-form button:hover { opacity: 0.8; }



/* en mode “expanded” : empile media et texte, media 75%, texte dessous */
.project-overview.expanded .top-row {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-overview.expanded .video-container,
.project-overview.expanded .big-video {
  width: 75%;
  max-width: 75%;
  margin: 0 auto;
}

.project-overview.expanded .right-column {
  width: 75%;
  max-width: 75%;
  margin: 1.5rem auto 0;
}

.project-overview.expanded .right-column > p {
  display: none;
}

.project-overview.expanded .detailed-text {
  opacity: 1;
  max-height: none;
  overflow: visible;
}



/* ─────────────────────────────────────────────── */
/* Carousel : hauteur max fixe de 500px pour tous */
/* ─────────────────────────────────────────────── */

.carousel__track-container {
  /* on limite la hauteur du conteneur à 500px */
  max-height: 500px;
}

.carousel__slide {
  /* on fait en sorte que chaque slide suive la hauteur du conteneur */
  height: 100%;
}

.carousel__slide img {
  /* on contraint l’image à 500px de haut max */
  max-height: 500px;
  max-width: 100%;
  object-fit: contain;
}



.delete-project-form button {
  background: linear-gradient(
    90deg,
    var(--gradient-start) 0%,
    var(--gradient-mid)   65%,
    var(--gradient-end)   100%
  );
  color: var(--text-light);
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.delete-project-form button:hover {
  opacity: 0.8;
}


/* ===========================
   Section Discussion (Chat)
   =========================== */

#discussion {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--secondary-bg);
  border: 1px solid #222;
  border-radius: 8px;
  color: var(--text-light);
  font-family: 'Epilogue', sans-serif;
}

#discussion h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

/* Messages principaux (Evaluateur/Concepteur) */
.message {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5em;
  padding: 1em;
  border-radius: 6px;
  background: #1a1a1a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Fond pour Évaluateur et Concepteur */
.message.eval {
  border-left: 4px solid var(--gradient-start);
}

.message.conc {
  border-left: 4px solid var(--gradient-mid);
}

/* Métadonnées de chaque message */
.message .meta {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.message .meta strong {
  font-size: 0.95rem;
  color: var(--text-light);
}

.message .meta em {
  font-size: 0.85rem;
  font-style: normal;
  background: #333;
  color: #ccc;
  padding: 0.15em 0.5em;
  border-radius: 4px;
}

.message .meta time {
  margin-left: auto;
  font-size: 0.8rem;
  color: #888;
}

/* Contenu du message */
.message p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-light);
  white-space: pre-wrap;
  margin-top: 0.25em;
}

/* Réponses imbriquées */
.reply {
  margin-left: 2em;
  margin-top: 0.75em;
  padding: 0.9em;
  border-radius: 6px;
  background: #2a2a2a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.reply.eval {
  border-left: 4px solid var(--gradient-start);
}

.reply.conc {
  border-left: 4px solid var(--gradient-mid);
}

.reply .meta {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.4em;
}

.reply .meta strong {
  font-size: 0.9rem;
  color: var(--text-light);
}

.reply .meta em {
  font-size: 0.8rem;
  background: #333;
  color: #ccc;
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.reply .meta time {
  margin-left: auto;
  font-size: 0.75rem;
  color: #888;
}

.reply p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-light);
}

/* Formulaires de saisie (nouveau commentaire et réponse) */
.form-new,
.form-reply {
  margin-top: 1.5em;
}

.form-new textarea,
.form-reply textarea {
  width: 100%;
  min-height: 4.5em;
  padding: 0.75em;
  font-size: 1rem;
  line-height: 1.4;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  color: var(--text-light);
  resize: vertical;
}

.form-new textarea:focus,
.form-reply textarea:focus {
  outline: none;
  border-color: var(--gradient-start);
  box-shadow: 0 0 0 2px rgba(70, 72, 255, 0.2);
}

.form-new button,
.form-reply button {
  margin-top: 0.75em;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(
    90deg,
    var(--gradient-start) 0%,
    var(--gradient-mid)   65%,
    var(--gradient-end)   100%
  );
  color: var(--text-light);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.form-new button:hover,
.form-reply button:hover {
  opacity: 0.8;
}

/* Placeholder et labels implicites */
.form-new textarea::placeholder,
.form-reply textarea::placeholder {
  color: #888;
}

/* Responsive : réduire la marge des réponses sur petit écran */
@media (max-width: 640px) {
  .reply {
    margin-left: 1em;
  }
}
