:root {
  --bg-main: #030712;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-color: rgba(56, 189, 248, 0.2);
  --accent-cyan: #38bdf8;
  --accent-pink: #ec4899;
  --accent-neon: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Arrière-plan animé néon & colonnes d'images défilantes */
.cyber-bg-wrapper {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  display: flex;
  justify-content: space-around;
  opacity: 0.35;
  pointer-events: none;
  filter: blur(1px);
}

.neon-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
}

.scrolling-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 140px;
  position: relative;
  animation: scrollColumns linear infinite;
}

.scrolling-column.col-1 { animation-duration: 25s; animation-direction: normal; }
.scrolling-column.col-2 { animation-duration: 32s; animation-direction: reverse; margin-top: -100px; }
.scrolling-column.col-3 { animation-duration: 28s; animation-direction: normal; margin-top: -50px; }
.scrolling-column.col-4 { animation-duration: 35s; animation-direction: reverse; margin-top: -150px; }

@keyframes scrollColumns {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

.bg-card-item {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--accent-cyan);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.bg-card-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-neon);
}

.bg-card-item span {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Structure principale Profil */
.profile-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 2;
}

.profile-card {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 35px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 0 25px rgba(56, 189, 248, 0.1);
}

h1 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

h1 i { 
  color: var(--accent-cyan); 
  filter: drop-shadow(0 0 8px var(--accent-cyan)); 
}

p.subtitle { 
  color: var(--text-muted); 
  font-size: 0.95rem; 
  margin-bottom: 30px; 
}

.avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.avatar-container-wrapper {
  position: relative;
  cursor: pointer;
  width: 85px;
  height: 85px;
  border-radius: 50%;
}

.avatar-preview {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.avatar-container-wrapper:hover .avatar-preview {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--accent-cyan);
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-container-wrapper:hover .avatar-overlay {
  opacity: 1;
}

.avatar-overlay i {
  color: #fff;
  font-size: 1.2rem;
  text-shadow: 0 0 8px var(--accent-cyan);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: span 2;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.phone-wrapper {
  display: flex;
  gap: 10px;
}

/* Dropdowns personnalisés style néon */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.phone-code-dropdown {
  flex: 0 0 180px;
}

.dropdown-selected {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dropdown-selected:hover, .dropdown-selected.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 280px;
  background: #0b1329;
  border: 1px solid var(--accent-cyan);
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 15px rgba(56, 189, 248, 0.2);
  z-index: 1000;
  display: none;
  flex-direction: column;
  max-height: 280px;
  overflow: hidden;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-search-box {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
}

.dropdown-search-box i {
  color: var(--accent-cyan);
}

.dropdown-search-box input {
  border: none;
  background: transparent;
  padding: 4px;
  color: var(--text-main);
  font-size: 0.9rem;
  width: 100%;
  box-shadow: none !important;
}

.dropdown-search-box input:focus {
  outline: none;
  border: none;
  box-shadow: none !important;
}

.dropdown-items {
  overflow-y: auto;
  max-height: 220px;
}

.dropdown-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.dropdown-item:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
}

.dropdown-item span.flag {
  font-size: 1.2rem;
}

.socials-section {
  grid-column: span 2;
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.social-input-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.social-input-item:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Effet d'illumination (Neon Glow) quand un lien est fourni */
.social-input-item.has-link {
  border-color: var(--accent-cyan, #38bdf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.07);
}

.social-input-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.social-input-item input {
  border: none;
  background: transparent;
  padding: 4px;
  font-size: 0.85rem;
  box-shadow: none !important;
}

.social-input-item input:focus {
  border: none;
  box-shadow: none !important;
}

/* Style pour les badges de réseaux sociaux enregistrés et cliquables */
.social-link-badge {
  flex: 1;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0 8px;
  transition: opacity 0.2s;
}

.social-link-badge:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.btn-edit-social {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-edit-social:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-save {
  margin-top: 30px;
  width: 100%;
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4), 0 0 15px rgba(168, 85, 247, 0.3);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-save:hover { 
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6), 0 0 20px rgba(168, 85, 247, 0.5);
}