/* ══════════════════════════════════════════════════════════
   DésirParent — Design System
   ══════════════════════════════════════════════════════════ */

:root {
  --lavande: #7C3AED;
  --peche: #FB923C;
  --corail: #F472B6;
  --creme: #FFFBF5;
  --prune: #3B0764;
  --teal: #0D9488;
  --amber: #F59E0B;
  --white: #FFFFFF;
  --gray-100: #F9FAFB;
  --gray-200: #F3F4F6;
  --gray-300: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 100px;
  --shadow-sm: 0 1px 3px rgba(59, 7, 100, 0.06);
  --shadow-md: 0 4px 20px rgba(59, 7, 100, 0.08);
  --shadow-lg: 0 12px 40px rgba(59, 7, 100, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--creme);
  color: var(--prune);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--lavande); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--prune);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(59, 7, 100, 0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
  border-radius: 8px;
}
.nav-logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-left: 0.5rem;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo:hover img { opacity: 0.9; }
.nav-logo:hover .nav-logo-text { opacity: 0.9; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.nav-link.active {
  color: var(--white);
  background: var(--lavande);
}

.nav-link.cta {
  background: var(--lavande);
  color: var(--white);
  font-weight: 600;
}

.nav-link.cta:hover {
  background: #6D28D9;
}

.nav-link.logout {
  color: rgba(255,255,255,0.5);
}

.nav-link.logout:hover {
  color: rgba(255,255,255,0.9);
}

body { padding-top: 64px; }

/* ── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--lavande);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  background: #6D28D9;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
  background: var(--white);
  color: var(--prune);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  border-color: var(--lavande);
  color: var(--lavande);
}

.btn-lg {
  padding: 1.1rem 2.75rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── FORMS ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--prune);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--prune);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--lavande);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.85rem;
  color: #DC2626;
  margin-top: 0.3rem;
}

/* ── CATEGORY BADGES ───────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-geniteur { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }
.badge-coparentalite { background: rgba(251, 146, 60, 0.12); color: #EA580C; }
.badge-homoparentalite { background: rgba(244, 114, 182, 0.12); color: #DB2777; }
.badge-fonder { background: rgba(13, 148, 136, 0.12); color: #0D9488; }
.badge-recomposee { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.badge-pioneer {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  font-weight: 700;
}

/* ── CATEGORY CHECKBOXES ───────────────────────────── */
.cat-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cat-check {
  position: relative;
}

.cat-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cat-check label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  user-select: none;
}

.cat-check input:checked + label {
  border-color: transparent;
  color: var(--white);
}

.cat-check[data-cat="geniteur"] input:checked + label { background: #7C3AED; border-color: #7C3AED; }
.cat-check[data-cat="coparentalite"] input:checked + label { background: #FB923C; border-color: #FB923C; }
.cat-check[data-cat="homoparentalite"] input:checked + label { background: #F472B6; border-color: #F472B6; }
.cat-check[data-cat="fonder"] input:checked + label { background: #0D9488; border-color: #0D9488; }
.cat-check[data-cat="recomposee"] input:checked + label { background: #F59E0B; border-color: #F59E0B; }

.cat-check label:hover {
  border-color: var(--lavande);
}

/* ── PHOTO UPLOAD ──────────────────────────────────── */
.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.photo-preview {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.photo-preview:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--lavande);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview .placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-400);
}

.photo-preview .placeholder svg {
  width: 40px;
  height: 40px;
}

.photo-preview .placeholder span {
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(59, 7, 100, 0.04);
}

/* ── PROFILE ───────────────────────────────────────── */
.profile-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.25rem;
}

.profile-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--prune);
  margin-bottom: 0.25rem;
}

.profile-meta {
  color: var(--gray-500);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.profile-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.profile-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.profile-bio {
  max-width: 600px;
  margin: 0 auto;
  color: var(--gray-600);
  line-height: 1.7;
  font-size: 1rem;
}

/* ── ALERT ─────────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: none;
}

.alert.show { display: block; }
.alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }

/* ── CONTAINERS ────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.page-content {
  padding: 3rem 0;
  min-height: calc(100vh - 64px);
}

/* ── FOOTER ────────────────────────────────────────── */
.footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--prune);
  color: rgba(255,255,255,0.5);
}

.footer-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.footer-sub {
  font-size: 0.8rem;
}

/* ── LOADING / SPINNER ─────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── UTILITY ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none !important; }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 640px) {
  .nav { padding: 0 1rem; }
  .nav-link { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
  .container-sm { padding: 0 1rem; }
  .card { padding: 1.5rem; }
  .btn-lg { padding: 0.95rem 2rem; font-size: 1rem; }
}

/* ── BOTTOM NAV ────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #111;
  height: 64px;
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
}

.bottom-nav-item:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.bottom-nav-item.active {
  color: var(--lavande);
}

.bottom-nav-item.active:hover {
  color: var(--lavande);
}

.bottom-nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

body.has-bottom-nav {
  padding-bottom: 64px;
}

/* ── FEED ──────────────────────────────────────────── */
.feed-page {
  min-height: calc(100vh - 64px);
}

.feed-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 1rem;
}

.feed-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--prune);
  margin-bottom: 1.1rem;
}

.feed-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.filter-chip:hover {
  border-color: var(--lavande);
  color: var(--lavande);
  background: rgba(124,58,237,0.05);
}

.filter-chip.active {
  border-color: var(--lavande);
  background: var(--lavande);
  color: var(--white);
}

/* ── FEED CARD ─────────────────────────────────────── */
.feed-card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(59,7,100,0.05);
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.feed-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.feed-card-photo {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-200);
}

.feed-card-body {
  flex: 1;
  min-width: 0;
}

.feed-card-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--prune);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-card-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feed-card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.feed-card-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

/* ── ICON BUTTONS ──────────────────────────────────── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
  color: var(--gray-500);
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--lavande);
  color: var(--lavande);
  transform: scale(1.1);
}

.btn-icon.liked {
  background: #FFF0F5;
  border-color: #E8185A;
  color: #E8185A;
}

.btn-icon.liked:hover {
  background: #FFE0ED;
  transform: scale(1.1);
}

/* ── FEED STATES ───────────────────────────────────── */
.feed-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.feed-empty h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--prune);
  margin-bottom: 0.5rem;
}

.feed-empty p {
  color: var(--gray-400);
  font-size: 0.9rem;
}

.feed-loading {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.feed-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--lavande);
}

.load-more-btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-300);
  background: var(--white);
  color: var(--lavande);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.load-more-btn:hover {
  border-color: var(--lavande);
  background: rgba(124,58,237,0.05);
}

/* ── SEARCH PAGE ───────────────────────────────────── */
.search-bar-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-bar-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-family: inherit;
  color: var(--prune);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--lavande);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.search-filters-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(59,7,100,0.05);
}

.search-filter-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: 0.65rem;
}

.age-range-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.search-results-header {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* ── NOTIFICATIONS PAGE ─────────────────────────────── */
.notif-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.notif-header {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--prune);
  margin-bottom: 1.25rem;
}

.like-row {
  background: var(--white);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(59,7,100,0.05);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.like-row:hover {
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.like-row-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-200);
  flex-shrink: 0;
}

.like-row-body {
  flex: 1;
  min-width: 0;
}

.like-row-name {
  font-weight: 700;
  color: var(--prune);
  font-size: 0.95rem;
}

.like-row-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

.like-row-heart {
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ── MESSAGES PAGE ──────────────────────────────────── */
.messages-page {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.messages-page h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--prune);
  margin-bottom: 0.5rem;
}

.messages-page p {
  color: var(--gray-500);
  max-width: 360px;
  line-height: 1.6;
}

.placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}
