/* ═══════════════════════════════════════════════════════════════
   MISS MADEMOISELLE — Design System commun · Noir & Violet glamour
   Ce fichier ne contient QUE les éléments partagés par toutes les
   pages (variables, reset, nav, footer, boutons, cartes, formulaires,
   tags, alertes). Chaque page charge en plus sa propre feuille CSS
   pour ses styles spécifiques.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Variables ──────────────────────────────────────────── */
:root {
  /* Palette principale — violet / rose */
  --or:            #C13BA0;
  --or-dk:         #8B2A73;
  --or-lt:         #E29AD1;
  --or-xlt:        #F3DFF0;

  --champagne:     #F3DFF0;
  --champagne-dk:  #C9A8C4;

  /* Touche sensuelle */
  --rose-poudre:    #E8C5C0;
  --rose-poudre-dk: #C9938C;

  /* Fonds sombres glamour */
  --bg:            #0B0904;
  --bg-2:          #100D06;
  --surface:       #151009;
  --surface-2:     #1E1710;
  --surface-3:     #2A2013;

  /* Textes */
  --text:          #F3DFF0;
  --text-2:        #C9A8C4;
  --text-3:        #8A6C82;
  --text-inv:      #0B0904;

  /* Bordures */
  --border:        #3A1F3A;
  --border-2:      #55265A;

  /* Dégradés signatures */
  --grad-or:       linear-gradient(135deg, #F3DFF0 0%, #C13BA0 50%, #6B1F5C 100%);
  --grad-dark:     linear-gradient(135deg, #0B0904 0%, #2A2013 100%);
  --grad-hero:     linear-gradient(160deg, #0B0904 0%, #151009 40%, #1E1710 70%, #100D06 100%);
  --grad-card:     linear-gradient(145deg, #151009 0%, #1E1710 100%);
  --grad-btn:      linear-gradient(135deg, #C13BA0 0%, #8B2A73 100%);
  --grad-nav:      linear-gradient(90deg, #0B0904 0%, #151009 60%, #0B0904 100%);

  /* États */
  --success:       #22c55e;
  --success-lt:    #166534;
  --warning:       #f59e0b;
  --warning-lt:    #78350f;
  --danger:        #ef4444;
  --danger-lt:     #7f1d1d;
  --info:          #38bdf8;

  /* Effets */
  --glow-or:       0 0 20px rgba(193,59,160,.45), 0 0 40px rgba(193,59,160,.20);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.5);
  --shadow:        0 4px 16px rgba(0,0,0,.6);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.7);
  --shadow-or:     0 4px 20px rgba(193,59,160,.3);

  /* Rayon */
  --radius-sm:     4px;
  --radius:        10px;
  --radius-lg:     18px;
  --radius-xl:     28px;
  --radius-full:   9999px;

  /* Typo */
  --font:          'Playfair Display', 'Georgia', 'Palatino Linotype', serif;
  --font-ui:       -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --nav-h:         72px;
  --transition:    .2s ease;
}

/* ── 2. Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--or-lt);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--or); text-decoration: underline; }

img { max-width: 100%; height: auto; }

p { margin: 0 0 .8em; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

/* ── 3. Navigation ─────────────────────────────────────────── */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--nav-h);
  background: var(--grad-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px 0 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,.6), 0 1px 0 rgba(193,59,160,.15);
  backdrop-filter: blur(8px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 24px;
}
.nav-brand-name {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--grad-or);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-brand-tagline {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-top: -2px;
}
.nav-crown { width: 30px; height: 22px; flex-shrink: 0; }

#menu-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex: 1;
}

.menuItem a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: .4px;
  transition: all var(--transition);
  white-space: nowrap;
}
.menuItem a:hover,
.menuItem.actif a {
  color: var(--or);
  background: rgba(193,59,160,.12);
  text-decoration: none;
}
.menuItem.actif a { box-shadow: inset 0 0 0 1px rgba(193,59,160,.3); }

.nav-icons-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-notif {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
}
.nav-notif:hover { border-color: var(--or); color: var(--or); }

#menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 18px;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: auto;
}

/* ── 4. Layout principal ───────────────────────────────────── */
.app-body {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}

.page-wrap {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 48px;
}
.page-wrap-lg { max-width: 1180px; }
.page-wrap-sm { max-width: 460px; }

.page-titre {
  font-family: var(--font);
  font-size: 26px;
  color: var(--or-lt);
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.page-sub { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }

.section-titre {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-titre::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--grad-btn);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── 5. Cards génériques ───────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-2); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }

.profil-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-inv);
  flex-shrink: 0;
  border: 2px solid var(--border-2);
  overflow: hidden;
  position: relative;
}
.profil-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── 6. Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-btn); color: var(--text-inv); box-shadow: var(--shadow-or); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--glow-or); color: var(--text-inv); text-decoration: none; }
.btn-outline { background: transparent; color: var(--or); border: 1px solid var(--or); }
.btn-outline:hover { background: rgba(193,59,160,.12); text-decoration: none; color: var(--or); }
.btn-ghost { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.btn-danger { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }

.btn-heart {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-3);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .2s;
}
.btn-heart:hover { background: rgba(193,59,160,.1); color: var(--or); border-color: var(--or); }
.btn-heart.voted { color: var(--or); border-color: var(--or); background: rgba(193,59,160,.12); }

.btn-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.btn-icon-action:hover { background: var(--surface-3); border-color: var(--or); color: var(--or); }

/* ── 7. Formulaires ────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 10px 13px;
  font-family: var(--font-ui);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--or); box-shadow: 0 0 0 3px rgba(193,59,160,.15); }
.form-control::placeholder { color: var(--text-3); }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }

label.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}

/* ── 8. Tags & badges ──────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.tag-or    { background: rgba(193,59,160,.15); color: var(--or-lt);        border: 1px solid rgba(193,59,160,.25); }
.tag-rose  { background: rgba(232,197,192,.15); color: var(--rose-poudre); border: 1px solid rgba(232,197,192,.25); }
.tag-vert  { background: rgba(34,197,94,.1);   color: #4ade80;             border: 1px solid rgba(34,197,94,.2); }
.tag-gris  { background: rgba(255,255,255,.06); color: var(--text-3);      border: 1px solid var(--border); }

.badge-verif {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 16px;
  height: 16px;
  background: var(--or);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--text-inv);
  border: 1px solid var(--surface);
}

/* ── 9. Alertes ────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.25); color: #4ade80; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25); color: #f87171; }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: #fbbf24; }
.alert-info    { background: rgba(56,189,248,.08);border: 1px solid rgba(56,189,248,.2);  color: #7dd3fc; }

/* ── 10. Footer ────────────────────────────────────────────── */
.app-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}
.app-footer a { color: var(--text-3); margin: 0 8px; }
.app-footer a:hover { color: var(--or-lt); text-decoration: none; }
.footer-sep { color: var(--border-2); }

/* ── 11. Responsive commun ─────────────────────────────────── */
@media (max-width: 820px) {
  .page-wrap { padding: 16px; }
  #menu-toggle { display: flex; }
  #menu-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    z-index: 200;
  }
  #menu-nav.open { display: flex; }
  .menuItem a { border-radius: 0; padding: 12px 20px; }
}

/* ── 12. Scrollbar stylisée ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--or); }
