/* ============================================
   AMOURA — style.css (fusion complète)
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --rouge:      #c0415a;
  --rouge-fonce:#8a2a3d;
  --noir:       #1a0d10;
  --creme:      #fdf6ef;
  --rose-clair: #f0d0d8;
  --rose-text:  #9b7882;
  --gold:       #c9a84c;
  --platine:    #c8b8d8;
  --blanc:      #ffffff;
  --radius:     16px;
  --shadow:     0 8px 32px rgba(192,65,90,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  background: var(--creme);
  color: var(--noir);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---------- PAGES ---------- */
.page { display: none; }
.page.active { display: block; }

/* ---------- NAV ---------- */
nav {
  background: var(--noir);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

.logo {
  font-size: 1.8rem;
  color: var(--blanc);
  font-weight: bold;
  font-family: 'DM Serif Display', serif;
}
.logo span { color: var(--gold); font-style: italic; }

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

.nav-links button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 20px;
  font-family: inherit;
  transition: all 0.2s;
}
.nav-links button:hover { background: var(--rouge); color: var(--blanc); }

.btn-premium-nav {
  background: linear-gradient(135deg, #c9a84c, #e0c060) !important;
  color: var(--noir) !important;
  font-weight: 700 !important;
}
.btn-premium-nav:hover { background: var(--gold) !important; transform: translateY(-1px); }

.btn-deconnexion {
  background: rgba(192,65,90,0.1) !important;
  border: 1px solid rgba(192,65,90,0.3) !important;
  color: var(--rouge) !important;
  padding: 0.45rem 1rem !important;
  border-radius: 20px !important;
  cursor: pointer;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}
.btn-deconnexion:hover { background: rgba(192,65,90,0.2) !important; }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, #1a0d10, #2d1720);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.hero h1 { font-size: 3.5rem; color: var(--blanc); margin-bottom: 1rem; font-family: 'DM Serif Display', serif; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 2rem; }
.hero button {
  background: var(--rouge);
  color: var(--blanc);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(192,65,90,0.3);
}
.hero button:hover { background: var(--rouge-fonce); transform: translateY(-2px); }

/* ---------- FORM CONTAINER ---------- */
.form-container {
  max-width: 450px;
  margin: 4rem auto;
  background: var(--blanc);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(192,65,90,0.1);
}
.form-container h2 { font-size: 1.8rem; margin-bottom: 1.5rem; text-align: center; color: var(--noir); font-family: 'DM Serif Display', serif; }

.form-container input,
.form-container select,
.form-container textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--rose-clair);
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  background: var(--creme);
  color: var(--noir);
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus { border-color: var(--rouge); }

.form-container button {
  width: 100%;
  background: var(--rouge);
  color: var(--blanc);
  border: none;
  padding: 0.9rem;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: 0.25rem;
}
.form-container button:hover { background: var(--rouge-fonce); }
.form-container p { text-align: center; margin-top: 1rem; color: var(--rouge); font-size: 0.9rem; }

/* ---------- PROFILS ---------- */
.profils-container { max-width: 1100px; margin: 3rem auto; padding: 0 2rem; }
.profils-container h2 { font-size: 2rem; margin-bottom: 2rem; text-align: center; font-family: 'DM Serif Display', serif; }

.profils-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.profil-card {
  background: var(--blanc);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(192,65,90,0.1);
  transition: transform 0.2s;
  cursor: pointer;
}
.profil-card:hover { transform: translateY(-4px); }

.profil-photo {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1a0d10, #c0415a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.profil-info { padding: 1rem; }
.profil-info h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.profil-info p { font-size: 0.85rem; color: var(--rose-text); }

/* ---------- PROFIL DÉTAILLÉ ---------- */
.profil-detail-container { max-width: 600px; margin: 3rem auto; padding: 0 2rem; }

.profil-detail-card {
  background: var(--blanc);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(192,65,90,0.15);
}

.profil-photo-grande {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #1a0d10, #c0415a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.profil-detail-info { padding: 1.5rem; }
.profil-detail-info h2 { font-size: 1.8rem; margin-bottom: 0.5rem; font-family: 'DM Serif Display', serif; }
.profil-detail-info p { color: var(--rose-text); margin-bottom: 0.5rem; }
.bio { margin-top: 1rem !important; color: var(--noir) !important; line-height: 1.6; }

/* ---------- BOUTONS COMMUNS ---------- */
.btn-retour {
  background: none;
  border: none;
  color: var(--rouge);
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  padding: 0;
  transition: opacity 0.2s;
}
.btn-retour:hover { text-decoration: underline; }

.btn-like {
  margin-top: 1.5rem;
  background: var(--rouge);
  color: var(--blanc);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-like:hover { background: var(--rouge-fonce); transform: translateY(-2px); }

.btn-bloquer {
  background: none;
  border: 1px solid var(--rose-clair);
  color: var(--rose-text);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s;
}
.btn-bloquer:hover { border-color: var(--rouge); color: var(--rouge); }

/* ---------- MESSAGERIE ---------- */
.zone-message { margin-top: 1rem; border-top: 1px solid var(--rose-clair); padding-top: 0.75rem; }
.historique-messages { min-height: 40px; margin-bottom: 0.5rem; }

.message-envoye {
  background: var(--rouge);
  color: var(--blanc);
  border-radius: 12px 12px 2px 12px;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  max-width: 85%;
  margin-left: auto;
}

.input-message-wrap { display: flex; gap: 0.5rem; }
.input-message-wrap input {
  flex: 1; padding: 0.5rem 0.75rem;
  border: 1px solid var(--rose-clair);
  border-radius: 20px; font-size: 0.85rem;
  outline: none; background: var(--creme); font-family: inherit;
}
.input-message-wrap input:focus { border-color: var(--rouge); }
.input-message-wrap button {
  background: var(--rouge); color: var(--blanc); border: none;
  padding: 0.5rem 1rem; border-radius: 20px;
  font-size: 0.85rem; cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.input-message-wrap button:hover { background: var(--rouge-fonce); }

/* ---------- CHAT PLEIN ÉCRAN ---------- */
.chat-container {
  max-width: 600px; margin: 0 auto;
  height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  background: var(--blanc);
}
.chat-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--rose-clair);
  background: var(--blanc);
}
.chat-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--noir);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; overflow: hidden;
  border: 2px solid var(--rose-clair);
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--creme);
}
.msg-bulle { max-width: 70%; padding: 0.7rem 1rem; border-radius: 18px; font-size: 0.9rem; line-height: 1.5; }
.msg-moi { align-self: flex-end; background: var(--rouge); color: var(--blanc); border-bottom-right-radius: 4px; }
.msg-eux { align-self: flex-start; background: var(--blanc); color: var(--noir); border: 1px solid var(--rose-clair); border-bottom-left-radius: 4px; }

.chat-input-zone {
  display: flex; gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--blanc);
  border-top: 1px solid var(--rose-clair);
}
.chat-input-zone input {
  flex: 1; padding: 0.75rem 1.1rem;
  border: 1px solid var(--rose-clair);
  border-radius: 30px; font-size: 0.95rem;
  font-family: inherit; outline: none; background: var(--creme);
  transition: border-color 0.2s;
}
.chat-input-zone input:focus { border-color: var(--rouge); }
.chat-input-zone button {
  background: var(--rouge); color: var(--blanc); border: none;
  padding: 0.75rem 1.4rem; border-radius: 30px;
  font-size: 0.95rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background 0.2s;
}
.chat-input-zone button:hover { background: var(--rouge-fonce); }

/* ---------- MATCHES ---------- */
.matches-container { max-width: 600px; margin: 3rem auto; padding: 0 2rem; }
.matches-container h2 { font-family: 'DM Serif Display', serif; font-size: 2rem; margin-bottom: 2rem; color: var(--noir); text-align: center; }

.match-card {
  background: var(--blanc); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem 1.5rem;
  margin-bottom: 1rem; display: flex; align-items: center;
  gap: 1.25rem; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.match-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(26,13,16,0.13); }
.match-card .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--noir); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; overflow: hidden; border: 2px solid var(--rouge); }
.match-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.match-card .nom { font-weight: 700; font-size: 0.95rem; color: var(--noir); }
.match-card .apercu { font-size: 0.85rem; color: var(--rose-text); }

/* ---------- PREMIUM ---------- */
.premium-container { max-width: 1000px; margin: 3rem auto; padding: 0 2rem 4rem; text-align: center; }
.premium-header { margin-bottom: 2.5rem; }

.badge-gold {
  display: inline-block;
  background: var(--noir); color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 99px; font-size: 0.8rem;
  padding: 4px 16px; letter-spacing: 0.1em; margin-bottom: 1rem;
}

.premium-header h2 { font-size: 2.5rem; color: var(--noir); margin-bottom: 0.75rem; font-family: 'DM Serif Display', serif; }
.premium-header h2 em { color: var(--gold); font-style: italic; }
.premium-header p { color: var(--rose-text); font-size: 1rem; }

.toggle-periode { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 2.5rem; }
.toggle-label { font-size: 0.95rem; color: var(--rose-text); transition: color 0.2s; }
.toggle-label.active { color: var(--gold); font-weight: 600; }

.toggle-switch {
  width: 50px; height: 26px;
  background: var(--noir); border: 1px solid var(--gold);
  border-radius: 99px; position: relative; cursor: pointer;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%; background: var(--gold); transition: left 0.25s;
}
.toggle-thumb.annuel { left: 27px; }

.badge-eco { background: var(--rouge); color: var(--blanc); border-radius: 99px; font-size: 0.75rem; padding: 3px 10px; font-weight: 600; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; align-items: start; }

.plan-card {
  background: var(--blanc); border: 1px solid var(--rose-clair);
  border-radius: 20px; padding: 2rem 1.5rem;
  text-align: left; position: relative; transition: transform 0.2s, box-shadow 0.2s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(26,13,16,0.13); }

.plan-card.plan-gold { background: var(--noir) !important; border: 2px solid var(--gold) !important; color: var(--blanc) !important; }
.plan-card.plan-gold h3, .plan-card.plan-gold .prix, .plan-card.plan-gold .periode { color: var(--gold) !important; }
.plan-card.plan-gold .plan-avantages li { color: rgba(255,255,255,0.85) !important; border-bottom: 1px solid rgba(255,255,255,0.1) !important; }
.plan-card.plan-gold .plan-avantages li.desactive { color: rgba(255,255,255,0.3) !important; }

.plan-card.plan-platine { background: linear-gradient(160deg, #1a0d10, #2d1720) !important; border: 1px solid var(--rose-text) !important; color: var(--blanc) !important; }
.plan-card.plan-platine h3 { color: #e8e0f0 !important; }
.plan-card.plan-platine .prix, .plan-card.plan-platine .periode { color: var(--platine) !important; }
.plan-card.plan-platine .plan-avantages li { color: rgba(255,255,255,0.85) !important; border-bottom: 1px solid rgba(255,255,255,0.1) !important; }
.plan-card.plan-platine .plan-avantages li.desactive { color: rgba(255,255,255,0.3) !important; }

.badge-populaire {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--noir);
  border-radius: 99px; font-size: 0.75rem; font-weight: 700;
  padding: 4px 16px; white-space: nowrap;
}

.plan-header h3 { font-size: 1.3rem; margin-bottom: 0.75rem; font-family: 'DM Serif Display', serif; }
.plan-prix { margin-bottom: 1.5rem; }
.prix { font-size: 2.2rem; font-weight: 700; color: var(--noir); }
.periode { font-size: 0.9rem; color: var(--rose-text); }

.plan-avantages { list-style: none !important; padding-left: 0 !important; margin-bottom: 1.5rem; }
.plan-avantages li { font-size: 0.9rem; color: var(--noir); padding: 0.4rem 0; border-bottom: 1px solid var(--creme); }
.plan-avantages li.desactive { color: #c8b0b8; text-decoration: line-through; }

.btn-plan-gratuit { width: 100%; background: none; border: 1px solid var(--rouge); color: var(--rouge); padding: 0.8rem; border-radius: 30px; font-size: 0.95rem; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-plan-gratuit:hover { background: var(--rouge); color: var(--blanc); }

.btn-plan-gold { width: 100%; background: var(--gold); border: none; color: var(--noir); padding: 0.8rem; border-radius: 30px; font-size: 0.95rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-plan-gold:hover { background: #e0c060; transform: translateY(-2px); }

.btn-plan-platine { width: 100%; background: none; border: 1px solid var(--platine); color: var(--platine); padding: 0.8rem; border-radius: 30px; font-size: 0.95rem; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-plan-platine:hover { background: var(--platine); color: var(--noir); }

.btn-cancel { width: 100%; background: none; border: 1px solid var(--rouge); color: var(--rouge); padding: 0.8rem; border-radius: 30px; font-size: 0.9rem; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.btn-cancel:hover { background: var(--rouge); color: var(--blanc); }

/* ---------- MON PROFIL ---------- */
.profil-edit-container,
.mon-profil-container {
  max-width: 500px; margin: 3rem auto; padding: 0 2rem 4rem; text-align: center;
}
.profil-edit-container h2,
.mon-profil-container h2 { font-size: 2rem; margin-bottom: 2rem; color: var(--noir); font-family: 'DM Serif Display', serif; }

.profil-edit-container input,
.profil-edit-container select,
.profil-edit-container textarea,
.mon-profil-form input,
.mon-profil-form select,
.mon-profil-form textarea {
  width: 100%; padding: 0.85rem 1rem; margin-bottom: 0.75rem;
  border: 1px solid var(--rose-clair); border-radius: 10px;
  font-size: 0.95rem; outline: none; background: var(--creme);
  color: var(--noir); font-family: inherit; transition: border-color 0.2s;
}
.profil-edit-container input:focus,
.profil-edit-container select:focus,
.profil-edit-container textarea:focus,
.mon-profil-form input:focus,
.mon-profil-form select:focus,
.mon-profil-form textarea:focus { border-color: var(--rouge); }

.mon-profil-form { text-align: left; display: flex; flex-direction: column; gap: 0.5rem; }
.mon-profil-form label { font-size: 0.85rem; color: var(--rose-text); margin-top: 0.5rem; }
.mon-profil-form textarea { height: 100px; resize: vertical; }

.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }

.avatar-cercle {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, #1a0d10, #c0415a);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; overflow: hidden; border: 3px solid var(--gold);
}
.avatar-cercle img { width: 100%; height: 100%; object-fit: cover; }

.btn-changer-photo {
  display: inline-block; background: none;
  border: 1px solid var(--rouge); color: var(--rouge);
  padding: 0.4rem 1.2rem; border-radius: 20px;
  font-size: 0.85rem; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-changer-photo:hover { background: var(--rouge); color: var(--blanc); }

.badge-premium-profil { display: inline-block; background: var(--noir); color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; font-size: 0.85rem; padding: 4px 16px; margin-bottom: 1.5rem; }
.badge-gratuit-profil { display: inline-block; background: var(--rose-clair); color: var(--rose-text); border-radius: 99px; font-size: 0.85rem; padding: 4px 16px; margin-bottom: 1.5rem; }

.btn-sauvegarder { width: 100%; background: var(--rouge); color: var(--blanc); border: none; padding: 0.9rem; border-radius: 30px; font-size: 1rem; cursor: pointer; font-family: inherit; font-weight: 600; margin-top: 1rem; transition: all 0.2s; }
.btn-sauvegarder:hover { background: var(--rouge-fonce); transform: translateY(-2px); }

#msg-profil { text-align: center; margin-top: 0.5rem; font-size: 0.9rem; }

/* Badge statut */
#badge-statut { display: inline-block; padding: 0.3rem 0.9rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
#badge-statut.gratuit { background: var(--rose-clair); color: var(--rose-text); }
#badge-statut.gold    { background: linear-gradient(135deg,#c9a84c,#e8c96a); color: var(--noir); }
#badge-statut.platine { background: linear-gradient(135deg,#c8b8d8,#e0d4f0); color: var(--noir); }

a[onclick*="premium"], #badge-statut a { color: var(--rouge); text-decoration: none; font-weight: 600; }

/* Select lieu */
.select-lieu {
  width: 100%; padding: 0.85rem 1rem; font-size: 0.95rem;
  border-radius: 10px; border: 1px solid var(--rose-clair);
  background: var(--creme); color: var(--noir); margin-bottom: 0.75rem;
  appearance: none; cursor: pointer; font-family: inherit;
  transition: border-color 0.2s; outline: none;
}
.select-lieu:focus { border-color: var(--rouge); }
.select-lieu:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--noir); color: var(--blanc);
  padding: 0.75rem 1.5rem; border-radius: 30px;
  font-size: 0.9rem; font-weight: 500; z-index: 9999;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #2d6a4f; }
.toast.error   { background: #8a2a3d; }

/* ---------- GALERIE MÉDIAS ---------- */
.media-item { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; border: 2px solid var(--rose-clair); cursor: pointer; transition: border-color 0.2s; }
.media-item:hover { border-color: var(--rouge); }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rose-clair); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--rouge); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  nav { flex-wrap: wrap; padding: 0.5rem 1rem; }
  .nav-links button { font-size: 0.78rem; padding: 0.4rem 0.6rem; }
  .hero h1 { font-size: 2rem; }
  .premium-header h2 { font-size: 1.8rem; }
  .plans-grid { grid-template-columns: 1fr; }
  .form-container { margin: 1.5rem 1rem; }
  .profil-edit-container, .mon-profil-container { padding: 0 1rem 3rem; }
}