/* ---------------------------------------------------------
   ANDROAMBIANCE — STYLE GLOBAL
   Esthétique douce, pastel, androgynous
--------------------------------------------------------- */

/* --- IMPORT FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:wght@400;500;600&display=swap');

/* --- BASE --- */
body {
  margin: 0;
  padding: 0;
  background: #f7e9f5;
  color: #4b3c5f;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- HEADER --- */
.main-header {
  background: rgba(232, 223, 247, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #d8c8ef;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: #4b3c5f;
  letter-spacing: 1px;
}

/* --- MENU --- */
.menu {
  display: flex;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.menu a {
  text-decoration: none;
  color: #4b3c5f;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  transition: 0.25s ease;
}

.menu a:hover {
  background: #d9c4f0;
  transform: translateY(-2px);
}

/* --- HERO IMAGE --- */
.hero-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  animation: fadeIn 0.8s ease;
}

.hero-image h1 {
  margin-top: 1rem;
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  color: #4b3c5f;
  animation: fadeIn 1s ease;
}

/* --- TEXT BLOCK --- */
.soft-text {
  margin-top: 1rem;
  background: rgba(255,255,255,0.7);
  padding: 1.2rem 1.5rem;
  border-radius: 14px;
  backdrop-filter: blur(6px);
  font-size: 1.1rem;
  animation: fadeIn 1.2s ease;
}

/* --- ACTION BUTTONS --- */
.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

button,
.button {
  border: none;
  background: #c7b0e5;
  color: #3b2c4f;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.25s ease;
}

button:hover,
.button:hover {
  background: #b79ad8;
  transform: translateY(-2px);
}

/* --- GRID --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: rgba(255,255,255,0.75);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
  transition: 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.8rem;
}

/* --- COMMENTS (ANCIEN BLOC .comment, conservé si utilisé ailleurs) --- */
.comment {
  background: rgba(255,255,255,0.75);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
}

.comment .meta {
  font-size: 0.85rem;
  color: #6a5a7a;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d7cbe5;
  padding: 0.8rem;
  font-family: inherit;
  resize: vertical;
}

/* --- FOOTER --- */
.footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  text-align: center;
  background: rgba(232, 223, 247, 0.8);
  border-top: 1px solid #d8c8ef;
  backdrop-filter: blur(8px);
}

.back-to-top {
  display: inline-block;
  margin-top: 0.8rem;
  text-decoration: none;
  color: #4b3c5f;
  background: rgba(255,255,255,0.6);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: 0.25s ease;
}

.back-to-top:hover {
  background: #d9c4f0;
  transform: translateY(-2px);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main-header {
  position: relative;
  z-index: 10;
}

.logo-link {
  position: relative;
  z-index: 20;
  display: inline-block;
  cursor: pointer;
}

/* --- LOGO & SLOGAN --- */
.logo-img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

.site-title {
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.slogan-wrapper {
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
}

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.site-slogan {
  margin-top: 4px;
  margin-left: 80px;
  font-size: 1.1rem;
  font-weight: 300;
  color: #c08fa8;
  font-style: italic;
  letter-spacing: 0.5px;
}

/* --- HOME BANNER --- */
.home-banner {
  width: 100%;
  margin: 0;
  padding: 0;
}

.home-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* --- DANGER BUTTON --- */
.danger-button {
  background: #b33939;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.danger-button:hover {
  background: #d64545;
}

/* ---------------------------------------------------------
   COMMENTAIRES — VERSION SIMPLE, NON IMBRIQUÉE
--------------------------------------------------------- */

/* Style bulle blanc */
.comment-bubble {
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Décalage progressif par niveau */
.level-0 { margin-left: 0 !important; }
.level-1 { margin-left: 15px !important; }
.level-2 { margin-left: 30px !important; }
.level-3 { margin-left: 45px !important; }
.level-4 { margin-left: 60px !important; }
.level-5 { margin-left: 75px !important; }

/* Tous les niveaux supérieurs restent au max */
.level-6,
.level-7,
.level-8,
.level-9,
.level-10,
.level-11,
.level-12,
.level-13,
.level-14,
.level-15,
.level-16 {
  margin-left: 75px !important;
}

.comment-bubble .meta {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 6px;
}

.comment-bubble .text {
  margin-bottom: 8px;
}

/* Bouton répondre */
.reply-btn {
  background: #f2f2f2;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8em;
  color: #555;
}

.reply-btn:hover {
  background: #e6e6e6;
}

.toggle-btn,
.toggle-all-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6a5a7a;
    padding: 0;
    margin-right: 6px;
}

.toggle-btn:hover,
.toggle-all-btn:hover {
    color: #4b3c5f;
}

.pagination {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1rem;
}

.page-link,
.page-current,
.page-disabled {
    margin: 0 6px;
    text-decoration: none;
    color: #4b3c5f;
}

.page-current {
    font-weight: bold;
    border-bottom: 2px solid #4b3c5f;
}

.page-disabled {
    color: #999;
}

/* ---------------------------------------------------------
   PANNEAU CATÉGORIES — FEED.PHP
   Style pastel, doux, cohérent avec Androambiance
--------------------------------------------------------- */

/* Bouton d'ouverture */
.cat-toggle {
    position: fixed;
    right: 20px;
    top: 140px;
    z-index: 1000;

    background: rgba(255,255,255,0.85);
    border: 1px solid #d8c8ef;
    padding: 10px 16px;
    border-radius: 12px;

    color: #4b3c5f;
    font-size: 0.95rem;
    font-weight: 500;

    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);

    cursor: pointer;
    transition: 0.25s ease;
}

.cat-toggle:hover {
    background: #e8dff7;
    transform: translateY(-2px);
}

/* Panneau latéral */
.categories-panel {
    position: fixed;
    right: -260px;
    top: 140px;
    width: 240px;

    background: rgba(255,255,255,0.92);
    border: 1px solid #d8c8ef;
    border-radius: 14px;

    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);

    transition: right 0.35s ease;
    z-index: 999;
}

.categories-panel.open {
    right: 20px;
}

/* Titre */
.categories-panel h3 {
    margin: 0 0 12px 0;
    font-family: "Playfair Display", serif;
    font-size: 1.3rem;
    color: #4b3c5f;
    font-weight: 500;
}

/* Liste */
.categories-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-panel li {
    margin: 10px 0;
}

/* Liens */
.categories-panel a {
    display: block;
    text-decoration: none;
    color: #4b3c5f;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.6);
    transition: 0.25s ease;
}

.categories-panel a:hover {
    background: #e8dff7;
    transform: translateX(4px);
}

/* ---------------------------------------------------------
   Catégorie active — Feed.php
--------------------------------------------------------- */

.categories-panel a.active-cat {
    background: #d9c4f0 !important;
    color: #3b2c4f !important;
    font-weight: 600;
    border-left: 4px solid #b79ad8;
    transform: translateX(4px);
}

.feed-item.text-only .feed-thumb {
    display: none;
}

.feed-item.text-only {
    background: rgba(255,255,255,0.85);
    padding-top: 1.5rem;
}
/* Curseur cliquable sur les vignettes du flux */
.feed-item {
    cursor: pointer;
}


/* --- MOBILE --- */
@media (max-width: 768px) {
  .menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo-img {
    height: 80px;
  }

  .site-slogan {
    margin-left: 20px;
    font-size: 0.95rem;
  }
  
      .cat-toggle {
        top: 100px;
        right: 10px;
        padding: 8px 12px;
    }

    .categories-panel {
        width: 200px;
        right: -220px;
        top: 100px;
    }

    .categories-panel.open {
        right: 10px;
    }
}
