/* --- Polices & Variables (Intouchables) --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap');

:root {
  --font-main: 'Outfit', sans-serif;

  --bg-dark: #050505;
  --bg-input: rgba(255, 255, 255, 0.05);
  --bg-badge: rgba(252, 238, 10, 0.15);
  --bg-hover-item: rgba(252, 238, 10, 0.05);
  --bg-op-bubble: rgba(20, 20, 20, 0.8);

  --glass-bg: rgba(20, 20, 20, 0.6);
  --glass-border: rgba(252, 238, 10, 0.3);
  --glass-highlight: rgba(252, 238, 10, 0.1);
  --glass-border-subtle: rgba(255, 255, 255, 0.05);
 
  --text-main: #ffffff;
  --text-muted: #8a8a8a;
  --text-black: #000000;
 
  --accent-glow: #fcee0a;
  --accent-secondary: #00f0ff;
  --accent-pink: #ff003c;

  --shadow-box: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --shadow-glow-white: 0 0 15px rgba(255, 255, 255, 0.2);
  --shadow-glow-accent: 0 0 20px var(--accent-glow);
  --shadow-glow-pink: 0 5px 20px rgba(255, 0, 60, 0.5);
  --shadow-text-glow: 0 0 10px var(--accent-glow);
  --shadow-avatar: 0 5px 15px rgba(0, 0, 0, 0.3);
 
  --radius-xl: 24px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* --- Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#gradient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: blur(60px);
  opacity: 0.8;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--accent-glow);
}

/* --- Composants Glassmorphism --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-box);
}

.glass-text {
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* --- Header --- */
.site-header {
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  border-radius: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
    flex-shrink: 0;
}

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

.logo-link img {
  height: 35px;
}

.site-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  text-shadow: var(--shadow-text-glow);
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

/* --- Boutons --- */
.btn {
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost {
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
}

.btn-ghost:hover {
  background: var(--glass-highlight);
  border-color: var(--text-main);
}

.btn-glow {
  background: var(--text-main);
  color: var(--text-black);
  font-weight: 700;
  box-shadow: var(--shadow-glow-white);
}

.btn-glow:hover {
  background: var(--accent-glow);
  box-shadow: var(--shadow-glow-accent);
  color: var(--text-black);
}

/* --- Layout Principal --- */
.site-main {
  flex: 1;
  max-width: 1200px;
  margin: 10px auto 40px;
  width: 95%;
  padding: 0 15px;
}

/* --- Banner & Breadcrumb --- */
.breadcrumb-bar {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 30px;
}

.breadcrumb-item {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--glass-border);
}

.banner-container {
  position: relative;
  height: 220px;
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: var(--radius-xl);
}

/* Simulation image overlay car pas d'image dans le DOM fourni pour le bg */
.banner-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.7), transparent);
    z-index: 1;
}

.banner-overlay {
  position: absolute;
  bottom: 30px;
  left: 40px;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.banner-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Liste des Forums (HOME) --- */
.forum-section {
  margin-bottom: 40px;
}

.forum-header {
  color: var(--text-main);
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 4px solid var(--accent-glow);
  display: inline-block;
  text-shadow: var(--shadow-text-glow);
}

/* Grille spécifique pour le DOM fourni : Avatar | Sujet | Auteur | Messages | Date */
.forum-item {
  display: grid;
  grid-template-columns: 100px 1fr 140px 100px 180px; /* Adaptation au DOM plat */
  gap: 15px;
  align-items: center;
  padding: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-subtle);
  margin-bottom: -1px; /* Fusion des bordures */
  transition: all 0.2s ease;
}

.forum-item:first-of-type {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}
.forum-item:last-of-type {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.forum-item:hover {
  background: var(--bg-hover-item);
  border-color: var(--glass-highlight);
  z-index: 1;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.forum-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%; /* Cercle parfait */
  object-fit: cover;
  border: 2px solid var(--glass-border);
  box-shadow: var(--shadow-avatar);
}

.forum-subject {
  color: var(--text-main);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-author, 
.forum-messages, 
.forum-last-message {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.forum-author a {
    font-weight: 700;
    color: var(--accent-pink);
}

.forum-messages {
    text-align: center;
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 20px;
}

.forum-last-message {
    text-align: right;
    font-style: italic;
    opacity: 0.8;
}


/* --- Vue Sujet (THREAD) --- */
.thread-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.op-post {
  padding: 30px;
  border: 1px solid var(--accent-glow);
  box-shadow: var(--shadow-glow-accent);
}

.thread-title-display {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 25px;
  line-height: 1.3;
  color: var(--text-main);
  text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.message-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
}

.message-sidebar {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px;
}

.message-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  margin-bottom: 10px;
  box-shadow: var(--shadow-avatar);
}

.message-author-name {
    margin-bottom: 5px;
}
.message-author-name > a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-glow);
}

.message-bubble {
  flex: 1;
  padding: 25px;
  background: var(--bg-op-bubble); /* Léger fond pour contraste */
  border-radius: 0 var(--radius-xl) var(--radius-xl) var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.05);
}

.message-meta {
  margin-bottom: 15px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.message-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
}
.message-content p {
    margin-bottom: 1rem;
}

.reply-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 90;
  padding: 15px 35px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  background: var(--accent-pink);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-glow-pink);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.reply-float:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 0, 60, 0.5);
}


/* --- Vue Profil (USER) --- */
.profile-dashboard {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: start;
}

.profile-id-card {
  position: sticky;
  top: 110px;
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-id-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--glass-border);
  padding: 5px;
  margin-bottom: 20px;
  background: var(--glass-highlight);
  box-shadow: var(--shadow-glow-accent);
}

.profile-id-name {
  font-size: 2rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.profile-id-role {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  font-size: 0.9rem;
  color: var(--accent-secondary);
  margin-bottom: 30px;
  border: 1px solid var(--glass-border);
}

.profile-stats-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 25px;
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-glow);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Contenu Principal Profil */
.profile-content {
  display: flex;
  flex-direction: column;
  gap: 0; /* Les blocs gèrent leur padding */
  overflow: hidden; /* Pour le border-radius */
}

.content-block {
  padding: 30px;
}

.block-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.info-item {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: var(--radius-sm);
}

.info-item strong {
  display: block;
  color: var(--accent-secondary);
  font-size: 0.8rem;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.info-item span {
  font-size: 1.1rem;
  color: var(--text-main);
}

/* Ajustement spécifique pour la liste d'activités dans le profil */
.forum-item-list .forum-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    border: none;
    padding: 0;
}

/* Items individuels d'activité */
.forum-item-list .forum-item > div {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--glass-border);
    transition: background 0.2s;
}

.forum-item-list .forum-item > div:hover {
    background: rgba(255,255,255,0.08);
    border-left-color: var(--accent-pink);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: block;
}

.comment-thread-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.comment-thread-title a {
    color: var(--text-main);
}
.comment-thread-title a:hover {
    color: var(--accent-glow);
}

.comment {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    padding-left: 10px;
    border-left: 2px solid var(--glass-border);
    margin-top: 5px;
}


/* --- Footer --- */
.site-footer {
  margin-top: auto;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  margin: 0 15px;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-glow);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    /* Header compact */
    .header-nav {
        flex-direction: column;
        gap: 15px;
        border-radius: 0;
        background: var(--bg-dark); /* Enlever la transparence pour lisibilité mobile */
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }

    /* Grid Forum Mobile */
    .forum-item {
        grid-template-columns: 50px 1fr;
        grid-template-areas: 
            "avatar subject"
            "avatar meta";
        gap: 10px;
    }
    
    .forum-avatar { grid-area: avatar; }
    .forum-subject { grid-area: subject; }
    
    /* On regroupe les métas */
    .forum-author, .forum-messages, .forum-last-message {
        grid-area: meta;
        font-size: 0.8rem;
    }
    
    .forum-messages {
        display: inline-block;
        margin: 5px 0;
    }
    
    .forum-last-message {
        display: block;
        text-align: left;
        margin-top: 5px;
    }

    /* Profil Mobile */
    .profile-dashboard {
        grid-template-columns: 1fr;
    }
    .profile-id-card {
        position: static;
        margin-bottom: 30px;
    }
    
    /* Thread Mobile */
    .message-row {
        flex-direction: column;
    }
    .message-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        text-align: left;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .message-bubble {
        border-radius: var(--radius-md);
    }
}