/* ============================================================
   PPC ADO — Global CSS
   Police : Nunito (display) + Outfit (body)
   Thème  : Rose corail · Pêche · Violet doux · Fond nuit
   ============================================================ */

:root {
  /* Couleurs */
  --noir:         #0A0A12;
  --nuit:         #0F0F1C;
  --fond:         #13131F;
  --surface:      #1A1A2E;
  --surface2:     #222238;
  --surface3:     #2A2A44;
  --bordure:      rgba(255,255,255,0.08);
  --bordure2:     rgba(255,255,255,0.14);

  --texte:        #F2F0FF;
  --texte-dim:    #9090B8;
  --texte-mute:   #50507A;
  --blanc:        #FFFFFF;

  /* Palette principale */
  --rose:         #FF6EB4;
  --rose-light:   #FFB3D9;
  --rose-dark:    #E0508A;
  --rose-glow:    rgba(255,110,180,0.28);
  --peche:        #FF9A5C;
  --peche-light:  #FFBF99;
  --violet:       #B07FFF;
  --violet-light: #D4B3FF;
  --violet-dark:  #8A5FDD;

  /* Gradients */
  --grad-main:    linear-gradient(135deg, #FF6EB4 0%, #FF9A5C 100%);
  --grad-hero:    linear-gradient(135deg, #FF6EB4 0%, #B07FFF 100%);
  --grad-soft:    linear-gradient(135deg, rgba(255,110,180,0.15) 0%, rgba(176,127,255,0.1) 100%);
  --grad-text:    linear-gradient(135deg, #FF9ACD 0%, #FF9A5C 100%);

  /* États */
  --vert:         #34D399;
  --rouge:        #F87171;
  --or:           #FBBF24;

  /* Typo */
  --font-display: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
  --font-body:    'Outfit', 'Segoe UI', system-ui, sans-serif;

  /* Espacements */
  --radius-xs:    8px;
  --radius-sm:    14px;
  --radius:       20px;
  --radius-lg:    28px;
  --radius-xl:    40px;

  /* Shadows */
  --shadow-rose:  0 8px 32px rgba(255,110,180,0.35);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.45);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--noir); color: var(--texte); line-height: 1.6; overflow-x: hidden; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--noir); }
::-webkit-scrollbar-thumb { background: var(--rose); border-radius: 2px; }

/* ── GRAIN ───────────────────────────────────────────────────── */
.grain-overlay {
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── TYPO ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.15; font-weight: 800; }
p  { line-height: 1.7; }
em { font-style: italic; }
strong { font-weight: 700; }
a  { color: var(--rose-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--rose); }

/* ── CONTENEURS ──────────────────────────────────────────────── */
.container    { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.container--md{ max-width: 860px;  margin: 0 auto; padding: 0 28px; }
.container--sm{ max-width: 640px;  margin: 0 auto; padding: 0 28px; }

/* ── BOUTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 26px; border-radius: var(--radius-xl);
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  text-decoration: none; cursor: pointer; border: none; letter-spacing: 0.01em;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); transition: background 0.3s; }
.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn--primary {
  background: var(--grad-main); color: #fff;
  box-shadow: var(--shadow-rose);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255,110,180,0.5); color: #fff; }

.btn--ghost {
  background: rgba(255,255,255,0.07); color: var(--texte);
  border: 1px solid var(--bordure2); backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,110,180,0.35); color: var(--rose-light); }

.btn--outline {
  background: transparent; color: var(--rose-light);
  border: 1.5px solid rgba(255,110,180,0.4);
}
.btn--outline:hover { background: rgba(255,110,180,0.08); border-color: var(--rose); }

.btn--danger {
  background: rgba(248,113,113,0.15); color: #FCA5A5;
  border: 1px solid rgba(248,113,113,0.3);
}
.btn--danger:hover { background: rgba(248,113,113,0.25); }

.btn--lg { padding: 16px 34px; font-size: 1rem; }
.btn--sm { padding: 9px 18px; font-size: 0.82rem; }
.btn--xs { padding: 6px 13px; font-size: 0.75rem; }
.btn--full { width: 100%; }

/* ── TAG ─────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 13px; border-radius: 50px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  border: 1px solid rgba(255,110,180,0.3);
  color: var(--rose-light); background: rgba(255,110,180,0.08);
}
.tag::before { content: '✦'; font-size: 0.45rem; }
.tag--violet { border-color: rgba(176,127,255,0.3); color: var(--violet-light); background: rgba(176,127,255,0.08); }

/* ── CHIP (intérêts, badges) ─────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600;
  background: var(--surface2); border: 1px solid var(--bordure);
  color: var(--texte-dim); white-space: nowrap;
  transition: all 0.2s;
}
.chip:hover, .chip--active {
  background: rgba(255,110,180,0.12);
  border-color: rgba(255,110,180,0.35);
  color: var(--rose-light);
}

/* ── GRADIENT TEXT ───────────────────────────────────────────── */
.gradient-text {
  background: var(--grad-text); background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: shimmer 4s linear infinite;
}
@keyframes shimmer { 0%{background-position:0% center} 100%{background-position:200% center} }

/* ── ALERT ───────────────────────────────────────────────────── */
.alert {
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: 0.875rem; margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert--success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25); color: #6EE7B7; }
.alert--error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: #FCA5A5; }
.alert--info    { background: rgba(255,110,180,0.08); border: 1px solid rgba(255,110,180,0.2); color: var(--rose-light); }
.alert__icon    { font-size: 1rem; flex-shrink: 0; }

/* ── CARD DE BASE ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 24px;
}
.card--hover { transition: border-color 0.3s, transform 0.3s; }
.card--hover:hover { border-color: rgba(255,110,180,0.25); transform: translateY(-3px); }

/* ── AVATAR ──────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; object-fit: cover;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs  { width: 28px;  height: 28px;  font-size: 0.9rem; }
.avatar--sm  { width: 38px;  height: 38px;  font-size: 1.1rem; }
.avatar--md  { width: 52px;  height: 52px;  font-size: 1.4rem; }
.avatar--lg  { width: 80px;  height: 80px;  font-size: 2rem; }
.avatar--xl  { width: 120px; height: 120px; font-size: 3rem; }
.avatar--border { border: 3px solid rgba(255,110,180,0.4); }

/* ── BADGE NOTIF ─────────────────────────────────────────────── */
.badge-notif {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rose); color: #fff;
  font-size: 0.65rem; font-weight: 800;
  border-radius: 50%; width: 18px; height: 18px;
  flex-shrink: 0;
}

/* ── REVEAL ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ── FORMULAIRES ─────────────────────────────────────────────── */
.form-group   { margin-bottom: 20px; }
.form-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; color: var(--texte);
}
.form-label .req { color: var(--rose); margin-left: 3px; }
.form-label .hint{ font-weight: 400; color: var(--texte-mute); font-size: 0.78rem; }
.form-label a    { font-size: 0.8rem; color: var(--rose-light); }

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 15px;
  background: var(--surface); border: 1.5px solid var(--bordure2);
  border-radius: var(--radius-sm); color: var(--texte);
  font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(255,110,180,0.55);
  box-shadow: 0 0 0 3px rgba(255,110,180,0.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--texte-mute); }
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.form-select option { background: var(--surface2); }
.form-hint { font-size: 0.76rem; color: var(--texte-mute); margin-top: 5px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error{ font-size: 0.76rem; color: #FCA5A5; display: block; margin-top: 4px; }

/* Password wrapper */
.pw-wrap { position: relative; }
.pw-wrap .form-input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px;
  color: var(--texte-mute); transition: color 0.2s;
}
.pw-toggle:hover { color: var(--texte); }

/* Password strength */
.pw-strength {
  height: 4px; background: var(--surface3); border-radius: 2px;
  margin-top: 6px; overflow: hidden;
}
.pw-strength__bar {
  height: 100%; width: 0; border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

/* Radio pills */
.radio-group, .check-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.radio-pill, .check-pill {
  position: relative;
}
.radio-pill input, .check-pill input {
  position: absolute; opacity: 0; pointer-events: none;
}
.radio-pill label, .check-pill label {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  border: 1.5px solid var(--bordure2); background: var(--surface);
  transition: all 0.2s; user-select: none;
}
.radio-pill input:checked + label,
.check-pill input:checked + label {
  background: rgba(255,110,180,0.12);
  border-color: rgba(255,110,180,0.5);
  color: var(--rose-light);
}

/* Checkbox simple */
.form-check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 0.85rem; color: var(--texte-dim); line-height: 1.5;
}
.form-check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--rose); flex-shrink: 0; }
.form-check a { color: var(--rose-light); }

/* Char count */
.char-count {
  display: block; text-align: right;
  font-size: 0.72rem; color: var(--texte-mute); margin-top: 4px;
}

/* ── APP LAYOUT ──────────────────────────────────────────────── */
.app-page {
  display: flex; min-height: 100vh;
}
.app-main {
  margin-left: 250px; flex: 1;
  padding: 28px; min-height: 100vh;
  display: flex; flex-direction: column;
  max-width: calc(100vw - 250px);
}
.app-main > .footer-app { margin-top: auto; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--texte-dim);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 14px; display: block; }
.empty-state h3 { font-size: 1.2rem; color: var(--texte); margin-bottom: 8px; }
.empty-state p  { font-size: 0.9rem; margin-bottom: 20px; }

/* ── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.section-header h2 { font-size: 1.2rem; font-weight: 800; }
.section-header a  { font-size: 0.82rem; color: var(--rose-light); font-weight: 600; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-main { margin-left: 0; max-width: 100%; padding-top: 72px; }
}
@media (max-width: 640px) {
  .container, .container--md, .container--sm { padding: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
  .btn--lg  { padding: 14px 26px; }
}

/* ── MODÉRATION MESSAGES ─────────────────────────────────── */
.message--bloque { opacity: .6; }
.message__bubble--bloque {
  background: rgba(248,113,113,.15) !important;
  border: 1px dashed rgba(248,113,113,.4) !important;
  color: var(--texte-dim) !important;
  text-decoration: line-through;
}

/* Message système inline sous un message */
.msg-systeme {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .78rem;
  line-height: 1.5;
  max-width: 300px;
}
.msg-systeme--warn  { background: rgba(251,191,36,.1);  border: 1px solid rgba(251,191,36,.3); color: #FDE68A; }
.msg-systeme--block { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: #FCA5A5; }

/* Message système standalone (centré dans le chat) */
.msg-systeme-standalone {
  display: flex; justify-content: center;
  margin: 10px 16px;
}
.msg-systeme-standalone span {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: .8rem;
  line-height: 1.6;
  text-align: center;
  max-width: 380px;
}
.msg-systeme-standalone--warn span {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.25);
  color: #FDE68A;
}
.msg-systeme-standalone--block span {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.25);
  color: #FCA5A5;
}
