/* ============================================================
   style_auth.css — Systeme authentification TIP
   Theme arc-en-ciel, reutilisable sur toutes les pages
   ============================================================ */

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

/* Variables */
:root {
  --bg:            #0D0D12;
  --bg2:           #14141C;
  --bg3:           #1C1C28;
  --bg4:           #242434;

  --text:          #F0EEF8;
  --text-muted:    #8880A8;
  --text-subtle:   #5A5475;

  --border:        rgba(255,255,255,0.08);
  --shadow:        rgba(0,0,0,0.5);

  --rainbow-1: #FF4B4B;
  --rainbow-2: #FF8C00;
  --rainbow-3: #FFD700;
  --rainbow-4: #4DDB6A;
  --rainbow-5: #4B9EFF;
  --rainbow-6: #7B4BFF;
  --rainbow-7: #E040FB;

  --rainbow: linear-gradient(90deg,
    #FF4B4B 0%, #FF8C00 16%, #FFD700 33%,
    #4DDB6A 50%, #4B9EFF 66%, #7B4BFF 83%, #E040FB 100%);

  --primary:       #7B4BFF;
  --primary-light: #A67CFF;

  --success-bg:    rgba(77,219,106,0.10);
  --success-border:rgba(77,219,106,0.35);
  --success-text:  #4DDB6A;
  --error-bg:      rgba(255,75,75,0.10);
  --error-border:  rgba(255,75,75,0.35);
  --error-text:    #FF7070;
  --info-bg:       rgba(75,158,255,0.08);
  --info-border:   rgba(75,158,255,0.30);
  --info-text:     #88BFFF;

  --radius:    14px;
  --radius-sm: 9px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Helvetica, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--primary-light); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; text-decoration: underline; }

/* ── Fond avec halos arc-en-ciel subtils ── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 16px;
  position: relative; overflow: hidden;
  /* fond aléatoire injecté en inline style par PHP */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Overlay sombre pour lisibilité */
.auth-page::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: rgba(8, 8, 14, 0.72);
}
/* Ligne arc-en-ciel en haut de page */
.auth-page::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--rainbow); pointer-events: none; z-index: 10;
}

.auth-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ── Card avec bordure arc-en-ciel ── */
.auth-card-wrap {
  position: relative; border-radius: calc(var(--radius) + 2px); padding: 2px;
  background: var(--rainbow);
  box-shadow: 0 0 40px rgba(123,75,255,0.15), 0 8px 40px var(--shadow);
}
.auth-card {
  background: radial-gradient(ellipse 120% 80% at 50% -10%, rgba(123,75,255,0.12) 0%, var(--bg2) 55%);
  border-radius: var(--radius);
  padding: 32px 28px;
}
@media (max-width: 480px) { .auth-card { padding: 24px 18px; } }

/* ── Logo ── */
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo-img {
  max-width: 240px;
  width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.auth-logo-sub {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.auth-title {
  font-size: 19px; font-weight: 700; color: var(--text);
  margin-bottom: 20px; letter-spacing: -0.01em;
}

/* ── Banniere info ── */
.info-banner {
  position: relative;
  border-radius: calc(var(--radius-sm) + 1px);
  margin-bottom: 20px;
  padding: 1.5px;
  background: var(--rainbow);
}
.info-banner-inner {
  background: rgba(10, 10, 20, 0.92);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  display: flex; gap: 10px; align-items: flex-start;
}
.info-icon {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
}
.info-banner-text {
  font-size: 14px; font-weight: 500; line-height: 1.6;
  background: var(--rainbow);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Alertes ── */
.alert {
  border-radius: var(--radius-sm); padding: 11px 14px;
  font-size: 13px; line-height: 1.5; margin-bottom: 18px;
  display: flex; gap: 8px; align-items: flex-start;
  animation: slideDown 0.2s ease;
  backdrop-filter: blur(6px);
}
@keyframes slideDown { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.alert-error   { background: rgba(35, 8, 8, 0.92);  border: 1px solid var(--error-border);   color: #FFA3A3; }
.alert-success { background: rgba(6, 30, 14, 0.92); border: 1px solid var(--success-border); color: #7FE89B; }

/* ── Formulaire ── */
.form-group { margin-bottom: 15px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 360px) { .form-row { grid-template-columns: 1fr; } }

.form-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--text);
  font-family: inherit; font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #7B4BFF, 0 0 0 4px rgba(123,75,255,0.15);
  background: var(--bg4);
}
.form-input::placeholder { color: var(--text-subtle); }
.form-input.error { box-shadow: 0 0 0 2px var(--rainbow-1); }

/* Icône native des champs <input type="date"> : noire par défaut,
   invisible sur nos fonds sombres — on l'inverse pour qu'elle reste
   lisible partout sur le site où un champ date est utilisé. */
input[type="date"].form-input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.3);
  cursor: pointer;
}

/* Champ password + toggle */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 42px; }
.pwd-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-subtle); padding: 4px;
  transition: color 0.2s; line-height: 1;
  display: flex; align-items: center;
}
.pwd-toggle:hover { color: var(--text-muted); }
.pwd-toggle svg { width: 18px; height: 18px; }

/* ── Checkbox CGU ── */
.form-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
  margin-bottom: 14px; cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 15px; height: 15px; min-width: 15px;
  accent-color: var(--primary); cursor: pointer; margin-top: 2px;
}

/* ── Captcha ── */
.captcha-wrap {
  background: var(--bg3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 13px 15px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.captcha-question {
  font-size: 16px; font-weight: 700;
  background: var(--rainbow); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  white-space: nowrap; flex-shrink: 0;
}
.captcha-input {
  width: 72px; flex-shrink: 0;
  background: var(--bg4); border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm); padding: 8px 10px;
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 700;
  text-align: center; outline: none;
  transition: box-shadow 0.2s;
}
.captcha-input:focus { box-shadow: 0 0 0 2px var(--primary); }
.captcha-hint { font-size: 12px; color: var(--text-subtle); flex: 1; }

/* ── Bouton principal — dégradé violet→bleu (même esprit que .btn-save-sm
   côté admin), plus lisible que l'arc-en-ciel à 7 couleurs avec du texte
   blanc dessus (zones jaune/vert clair mangeaient le contraste). ── */
.btn-primary {
  display: block; width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--rainbow-5));
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  letter-spacing: 0.03em; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center; text-decoration: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-primary:hover {
  opacity: 0.9; color: #fff; text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(123,75,255,0.35);
}
.btn-primary:active { transform: translateY(0); }

/* ── Liens secondaires ── */
.auth-link-row {
  text-align: center; font-size: 13px;
  color: var(--text-muted); margin-top: 16px;
}

/* ── Selecteur de langue flottant (top-right) ── */
.lang-float {
  position: fixed; top: 16px; right: 16px; z-index: 100;
}
.lang-float-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 7px 11px;
  cursor: pointer; color: var(--text);
  font-size: 13px; font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  outline: none; user-select: none;
}
.lang-float-btn:hover { border-color: rgba(255,255,255,0.25); background: var(--bg3); }
.lang-float-btn img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; }
.lang-float-btn .chevron { font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }

.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 6px;
  min-width: 155px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: none;
  z-index: 200;
}
.lang-float.open .lang-dropdown { display: block; }
.lang-float.open .chevron { transform: rotate(180deg); }

.lang-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  text-decoration: none; color: var(--text-muted);
  font-size: 13px; transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lang-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.lang-item.active { color: var(--text); background: var(--bg4); }
.lang-item img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; }
/* Pastille arc-en-ciel sur langue active */
.lang-item.active::before { display: none; }
.lang-item .check { margin-left: auto; font-size: 11px; opacity: 0; }
.lang-item.active .check { opacity: 1; color: #4DDB6A; }

/* ── Indicateur force mot de passe ── */
.pwd-strength      { margin-top: 6px; height: 3px; border-radius: 2px; background: var(--bg4); overflow: hidden; }
.pwd-strength-bar  { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; width: 0; }
.pwd-strength-text { font-size: 11px; color: var(--text-subtle); margin-top: 4px; }

/* ── Footer ── */
.auth-footer {
  text-align: center; font-size: 12px; color: var(--text-subtle); padding: 4px 0;
}
.auth-footer a { color: var(--text-subtle); }
.auth-footer a:hover { color: var(--text-muted); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-page      { padding: 16px 12px; }
  .lang-btn       { font-size: 12px; padding: 5px 8px; }
  .captcha-wrap   { flex-direction: column; align-items: flex-start; }
}

/* ── Utilitaires ── */
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }

/* ── Widget "Derniers dons" (index.php) + page donateurs.php ── */
.donor-widget-wrap { box-shadow: 0 0 24px rgba(123,75,255,0.10), 0 6px 24px var(--shadow); }
.donor-widget { padding: 20px 22px; }
.donor-widget-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 12px;
  background: var(--rainbow);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.donor-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.donor-row:last-of-type { border-bottom: none; }
.donor-name { flex: 1; color: var(--text); font-weight: 600; }
.donor-amount { color: var(--success-text); font-weight: 700; }
.donor-date { color: var(--text-subtle); font-size: 12px; min-width: 72px; text-align: right; }
.donor-see-all {
  display: block; text-align: center; margin-top: 14px;
  font-size: 13px; font-weight: 700;
}

/* ── Page donateurs.php : liste complète ── */
.donor-list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.donor-list-row:last-of-type { border-bottom: none; }
