/* =========================================================
   Chez Donald Connect — Public CSS (portail parent)
   ========================================================= */

/* ---- FIL D'ACTUALITÉ ---- */
.cdc-feed { max-width: 680px; }

.cdc-compose {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.cdc-compose textarea {
  width: 100%;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s;
}

.cdc-compose textarea:focus { border-color: #F4872B; }

.cdc-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cdc-compose-tools {
  display: flex;
  gap: 0.5rem;
}

.cdc-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}

.cdc-tool-btn:hover { background: #FFF8EF; border-color: #F4872B; }

.cdc-cible-select {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  background: white;
}

/* Publication card */
.cdc-pub-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 1.25rem;
  overflow: hidden;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cdc-pub-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem 0.75rem;
}

.cdc-pub-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F4872B, #D96A10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.cdc-pub-meta { flex: 1; }
.cdc-pub-author { font-weight: 800; font-size: 0.9rem; color: #1A1A2E; }
.cdc-pub-date   { font-size: 0.75rem; color: #6C757D; }

.cdc-pub-pinned {
  background: rgba(255,204,0,0.15);
  color: #8B6914;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

.cdc-pub-body {
  padding: 0 1.25rem 1rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #343A40;
}

.cdc-pub-medias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px;
  margin: 0 1.25rem 1rem;
}

.cdc-pub-media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.cdc-pub-media img:hover { transform: scale(1.02); }

.cdc-pub-footer {
  border-top: 1px solid #f0f0f0;
  padding: 0.6rem 1.25rem;
  display: flex;
  gap: 1rem;
}

.cdc-pub-action {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #6C757D;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.cdc-pub-action:hover { background: #f8f9fa; color: #F4872B; }

/* ---- MESSAGERIE ---- */
.cdc-messagerie {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  height: 600px;
}

.cdc-msg-list {
  background: white;
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.cdc-msg-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.cdc-msg-item:hover,
.cdc-msg-item.active { background: #FFF8EF; }

.cdc-msg-item.unread .cdc-msg-subject { font-weight: 800; color: #1A1A2E; }

.cdc-msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A6BAF, #3A8FD6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cdc-msg-subject { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.1rem; }
.cdc-msg-preview { font-size: 0.75rem; color: #6C757D; }
.cdc-msg-date    { font-size: 0.7rem;  color: #ADB5BD; margin-left: auto; white-space: nowrap; }

.cdc-msg-detail {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

.cdc-msg-detail-header {
  padding: 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.cdc-msg-detail-header h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.cdc-msg-detail-body      { flex: 1; padding: 1.25rem; overflow-y: auto; font-size: 0.9rem; line-height: 1.7; }

.cdc-msg-reply {
  padding: 1rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 0.75rem;
}

.cdc-msg-reply textarea {
  flex: 1;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  resize: none;
  outline: none;
  height: 60px;
  transition: border-color 0.2s;
}

.cdc-msg-reply textarea:focus { border-color: #F4872B; }

/* ---- TRANSMISSIONS ---- */
.cdc-transmission-form {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.cdc-field-group {
  margin-bottom: 1.25rem;
}

.cdc-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #6C757D;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.cdc-radio-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cdc-radio-btn {
  padding: 0.35rem 0.9rem;
  border: 2px solid #dee2e6;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s;
  background: white;
}

.cdc-radio-btn input { display: none; }
.cdc-radio-btn:has(input:checked) { border-color: #F4872B; background: rgba(244,135,43,0.08); color: #F4872B; }

/* Humeur emojis */
.cdc-humeur-group {
  display: flex;
  gap: 0.75rem;
}

.cdc-humeur-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid #dee2e6;
  background: white;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cdc-humeur-btn input { display: none; }
.cdc-humeur-btn:has(input:checked) { border-color: #F4872B; background: rgba(244,135,43,0.08); transform: scale(1.15); }

/* ---- POINTAGE ---- */
.cdc-pointage-list {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
}

.cdc-pointage-enfant {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.cdc-pointage-enfant:hover { background: #fdf9f5; }

.cdc-pointage-name { font-weight: 700; font-size: 0.9rem; flex: 1; }
.cdc-pointage-time { font-size: 0.82rem; color: #6C757D; min-width: 60px; }

.cdc-btn-pointer {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.cdc-btn-arrivee { background: rgba(76,175,80,0.12); color: #2E7D32; }
.cdc-btn-arrivee:hover { background: #4CAF50; color: white; }
.cdc-btn-depart  { background: rgba(229,57,53,0.12); color: #B71C1C; }
.cdc-btn-depart:hover  { background: #E53935; color: white; }

/* ---- ALBUMS ---- */
.cdc-albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cdc-album-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: all 0.25s;
}

.cdc-album-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }

.cdc-album-cover {
  height: 140px;
  background: linear-gradient(135deg, #1A6BAF, #3A8FD6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.cdc-album-cover img { width: 100%; height: 100%; object-fit: cover; }

.cdc-album-info { padding: 0.85rem; }
.cdc-album-title { font-weight: 800; font-size: 0.9rem; margin-bottom: 0.2rem; }
.cdc-album-meta  { font-size: 0.75rem; color: #6C757D; }

/* ---- SONDAGES ---- */
.cdc-sondage-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 1.25rem;
  border-left: 4px solid #1A6BAF;
}

.cdc-sondage-card.answered { border-left-color: #4CAF50; opacity: 0.8; }

.cdc-sondage-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.5rem; }
.cdc-sondage-dates { font-size: 0.78rem; color: #6C757D; margin-bottom: 1rem; }

.cdc-question { margin-bottom: 1.25rem; }
.cdc-question-text { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.75rem; }

/* Étoiles notation */
.cdc-stars { display: flex; gap: 0.35rem; }
.cdc-star {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  background: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.cdc-star:hover,
.cdc-star.active { border-color: #FFCC00; background: rgba(255,204,0,0.1); }

/* ---- NOTIFICATIONS ---- */
.cdc-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #E53935;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .cdc-messagerie { grid-template-columns: 1fr; height: auto; }
  .cdc-msg-list   { height: 300px; }
  .cdc-albums-grid { grid-template-columns: repeat(2, 1fr); }
}
