/* Extrait de profil.html (anciens <style> inline) */

header {
  position: relative;
  padding: 0 0 20px 0;
  background: none;
  text-align: center;
}

.cover-container {
  position: relative;
  width: 100%;
  height: 180px;
  background: #222;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  margin-bottom: 0;
}
#coverDisplay {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 0 0 24px 24px;
}
.avatar-container {
  position: absolute;
  left: 50%;
  bottom: -48px;
  transform: translateX(-50%);
  z-index: 2;
}
#avatarDisplay {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  background: #fff;
  object-fit: cover;
}
.profile-header-content {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.profile-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 12px 0 0 0;
}
.profile-actions button {
  min-width: 120px;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 24px;
  border: none;
  background: linear-gradient(135deg, #5c6bc0, #7986cb);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#shareProfileBtn {
  background: linear-gradient(135deg, #4caf50, #66bb6a) !important;
  min-width: 140px;
}

#shareProfileBtn:hover {
  background: linear-gradient(135deg, #43a047, #5cb85c) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#customLinkDisplay a {
  color: #5c6bc0;
  text-decoration: underline;
  font-size: 1rem;
  word-break: break-all;
}
#bioText {
  color: #bbb;
  font-size: 1.05rem;
  margin: 0 0 8px 0;
  text-align: center;
  max-width: 420px;
}
@media (max-width: 600px) {
  .cover-container,
  #coverDisplay {
    height: 110px;
  }
  .avatar-container {
    bottom: -36px;
  }
  #avatarDisplay {
    width: 72px;
    height: 72px;
  }
  .profile-header-content {
    margin-top: 40px;
  }
}

.user-info,
#profilForm {
  background: #1e1e2f;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.user-info p,
.user-info label {
  margin-bottom: 10px;
}

.friends-section details summary {
  cursor: pointer;
  margin: 10px 0;
}

#profilForm input,
#profilForm textarea {
  width: 100%;
  background: #2b2b3c;
  border: 1px solid #444;
  padding: 10px;
  color: #fff;
  border-radius: 6px;
}

#profilForm button {
  background: linear-gradient(135deg, #5c6bc0, #7986cb);
  border: none;
  padding: 12px;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

#postForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1e1e2f;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}

#postForm input,
#postForm textarea {
  background: #2a2a3c;
  border: 1px solid #444;
  color: white;
  padding: 10px;
  border-radius: 6px;
}

.badge-certif,
.badge-mentor,
.badge-pro {
  font-size: 0.7em;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  height: auto;
  min-width: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.badge-certif {
  background: rgba(76, 175, 80, 0.1);
  color: #43a047;
  border: 1px solid #43a04722;
  box-shadow: none;
}
.badge-certif i {
  width: 7px !important;
  height: 7px !important;
  color: #43a047 !important;
  margin-right: 1px;
  vertical-align: middle;
}
.badge-mentor {
  background: #ff9800;
  color: white;
  border: none;
  box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}
.badge-pro {
  background: #e91e63;
  color: white;
  border: none;
  box-shadow: 0 2px 4px rgba(233, 30, 99, 0.3);
}
@media (max-width: 600px) {
  .badge-certif,
  .badge-mentor,
  .badge-pro {
    font-size: 0.5em;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 4px;
    gap: 2px;
    height: auto;
  }
  .badge-certif i {
    width: 8px !important;
    height: 8px !important;
  }
}

footer.bandeau-footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: #aaa;
  font-size: 0.9rem;
}

#openChat {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background: #5c6bc0;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

#chatPopup {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 360px;
  height: 500px;
  z-index: 999;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.slider-item img {
  border-radius: 8px;
  margin-top: 10px;
}

/* Styles pour le compteur de likes style TikTok */
.like-counter-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.like-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.like-button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.like-button.liked {
  animation: likePulse 0.6s ease;
}

.like-button.liked .heart-icon {
  color: #ff4757;
  transform: scale(1.2);
}

.heart-icon {
  font-size: 1.5rem;
  transition: all 0.3s ease;
  color: #fff;
}

.like-count {
  font-weight: bold;
  font-size: 1.1rem;
  color: #fff;
  min-width: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.like-count.animate {
  animation: countBounce 0.5s ease;
}

.like-count.large {
  font-size: 1.3rem;
  color: #ff4757;
}

.like-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: #aaa;
}

.like-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 2px;
}

.like-stats .stat-item i {
  font-size: 0.8rem;
}

/* Animations */
@keyframes likePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes countBounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
}

.heart-beat {
  animation: heartBeat 1.3s ease-in-out;
}

/* Particules de likes */
.like-particles {
  position: absolute;
  pointer-events: none;
  z-index: 10;
}

.particle {
  position: absolute;
  font-size: 1rem;
  color: #ff4757;
  animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(1.5);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .like-counter-container {
    padding: 6px 10px;
    gap: 6px;
  }

  .heart-icon {
    font-size: 1.3rem;
  }

  .like-count {
    font-size: 1rem;
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 4px #4c82ff, 0 0 16px 8px #4c82ff80;
  }
  100% {
    box-shadow: 0 0 0 8px #ff4757, 0 0 32px 16px #ff475780;
  }
}

/* Styles pour les créations dans le profil - identiques au feed */
.slider-item {
  background: #1e1e2f;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid #35355a;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-user-info strong {
  color: #fff;
  font-size: 1rem;
}

.post-user-info small {
  color: #888;
  font-size: 0.8rem;
}

.profile-link {
  color: #4c82ff;
  text-decoration: none;
  font-size: 0.8rem;
}

.profile-link:hover {
  text-decoration: underline;
}

.post-title {
  color: #fff;
  margin-bottom: 8px;
}

.post-desc {
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 16px;
}

.post-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #35355a;
}

.post-meta small {
  color: #888;
  font-size: 0.8rem;
}

.code-controls {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.code-btn,
.clone-btn {
  background: #4c82ff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.code-btn:hover,
.clone-btn:hover {
  background: #3b6bc0;
}

.code-section {
  margin-top: 16px;
  background: #2a2a3c;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #444;
}

.code-block {
  margin-bottom: 16px;
}

.code-block:last-child {
  margin-bottom: 0;
}

.code-block strong {
  color: #4c82ff;
  display: block;
  margin-bottom: 8px;
}

.code-block pre {
  background: #1a1a2a;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  color: #ccc;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

/* Styles pour les actions TikTok-style */
.tiktok-style-actions button {
  transition: all 0.2s ease;
  padding: 4px;
  min-width: auto;
}

.tiktok-style-actions button:hover {
  transform: scale(1.1);
}

.tiktok-style-actions span {
  font-size: 12px !important;
  color: #ccc;
  min-width: auto;
}

/* Styles pour les carrousels d'images */
.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-track img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #bbb;
  transition: background-color 0.3s;
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background-color: #007bff;
}

/* Styles pour les commentaires */
.comment-modal {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 63%;
  background: #1a1a1a;
  color: white;
  z-index: 1000;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  padding: 16px;
  transition: transform 0.3s ease;
}

.comment {
  background: #2a2a3a;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #35355a;
}

/* Styles pour l'audio */
.audio-indicator {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-cover {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.rotating-audio {
  animation: rotate 2s linear infinite;
}

.paused-audio {
  opacity: 0.5;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Styles pour les particules de likes */
.like-particles {
  position: absolute;
  pointer-events: none;
  z-index: 10;
}

.particle {
  position: absolute;
  font-size: 1rem;
  color: #ff4757;
  animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(1.5);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .slider-item {
    padding: 16px;
    margin-bottom: 16px;
  }

  .tiktok-style-actions {
    gap: 8px !important;
  }

  .tiktok-style-actions button {
    font-size: 16px !important;
  }

  .code-controls {
    flex-direction: column;
    gap: 8px;
  }

  .code-btn,
  .clone-btn {
    width: 100%;
  }
}

.story-halo {
  border: 3px solid #4c82ff;
  box-shadow: 0 0 0 4px #4c82ff80, 0 0 16px 8px #4c82ff55;
  pointer-events: none;
  opacity: 0.95;
}
.story-halo-anim {
  animation: storyPulse 1.2s infinite alternate;
}
.story-halo-live {
  border: 3px solid #ff4757;
  box-shadow: 0 0 0 4px #ff475780, 0 0 16px 8px #ff475755;
  animation: livePulse 1.2s infinite alternate;
}
@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 4px #ff475780, 0 0 16px 8px #ff475755;
    border-color: #ff4757;
  }
  100% {
    box-shadow: 0 0 0 8px #ff4757, 0 0 32px 16px #ff475780;
    border-color: #ff4757;
  }
}

/* Styles pour la recherche de profils */
#profileSearchInput:focus {
  border-color: #5c6bc0;
  box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.1);
}

.search-result-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  border-color: #5c6bc0 !important;
}

.search-result-item:active {
  transform: translateY(0) !important;
}

/* Animation pour les résultats de recherche */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  animation: fadeInUp 0.3s ease-out;
}

/* Responsive pour la recherche */
@media (max-width: 600px) {
  .search-result-item {
    padding: 12px !important;
    gap: 12px !important;
  }

  .search-result-item img {
    width: 40px !important;
    height: 40px !important;
  }

  .search-result-item h3 {
    font-size: 1rem !important;
  }

  .search-result-item p {
    font-size: 0.85rem !important;
  }
}

/* Styles pour l'onglet Stories */
#userStoriesContainer {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#userStoriesContainer::-webkit-scrollbar {
  display: none;
}

.story-item-tab {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 15px;
}

.story-item-tab img,
.story-item-tab video {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid #4c82ff;
  box-shadow: 0 4px 12px rgba(76, 130, 255, 0.3);
  transition: transform 0.3s ease;
}

.story-item-tab:hover img,
.story-item-tab:hover video {
  transform: scale(1.05);
}

.story-item-tab .story-info {
  text-align: center;
  margin-top: 8px;
  color: #ccc;
  font-size: 0.9rem;
}

.story-item-tab .story-views {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.story-item-tab .story-time {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.story-item-tab .delete-story-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.story-item-tab .delete-story-btn:hover {
  transform: scale(1.1);
}

@media (max-width: 600px) {
  .story-item-tab img,
  .story-item-tab video {
    width: 100px;
    height: 100px;
  }

  .story-item-tab .story-views,
  .story-item-tab .story-time {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
}

/* Styles pour les sections de raccourcis */
.settings-section,
.edit-section {
  display: none;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.settings-container,
.edit-container {
  background: #1e1e2f;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.settings-header,
.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h2,
.edit-header h2 {
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-btn {
  background: #4c82ff;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.back-btn:hover {
  background: #3b6bdd;
}

.settings-content,
.edit-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-group,
.edit-group {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-group.danger {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.1);
}

.settings-group h3,
.edit-group h3 {
  color: #4c82ff;
  margin: 0 0 16px 0;
  font-size: 1.1rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item label {
  color: #fff;
  font-weight: 500;
}

.setting-item input[type="text"],
.setting-item input[type="email"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  width: 200px;
}

.setting-item input[type="text"]:focus,
.setting-item input[type="email"]:focus {
  outline: none;
  border-color: #4c82ff;
}

.setting-item small {
  color: #94a3b8;
  font-size: 0.8rem;
}

.save-btn {
  background: #4c82ff;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.save-btn:hover {
  background: #3b6bdd;
}

.danger-btn {
  background: #ff4757;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.danger-btn:hover {
  background: #e63946;
}

/* Switch toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4c82ff;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Styles pour la section édition */
.avatar-upload,
.cover-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.current-avatar,
.current-cover {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #4c82ff;
}

.current-cover {
  width: 200px;
  height: 100px;
  border-radius: 8px;
}

.current-avatar img,
.current-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-btn {
  background: #4c82ff;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-btn:hover {
  background: #3b6bdd;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  color: #fff;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4c82ff;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group small {
  color: #94a3b8;
  font-size: 0.8rem;
}

.edit-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cancel-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .settings-container,
  .edit-container {
    margin: 10px;
    padding: 16px;
  }

  .settings-header,
  .edit-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .setting-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .setting-item input[type="text"],
  .setting-item input[type="email"] {
    width: 100%;
  }

  .edit-actions {
    flex-direction: column;
  }
}

/* --- Améliorations page profil (layout, onglets mobile, footer) --- */
.profil-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
}

.page-profil .profile-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 8px 12px 12px;
  margin: 0 auto 4px;
  max-width: 960px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.page-profil .profile-tabs::-webkit-scrollbar {
  height: 6px;
}

.page-profil .profile-tabs .tab-btn {
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
}

.page-profil .profile-tabs .tab-btn:focus-visible {
  outline: 2px solid #4c82ff;
  outline-offset: 2px;
}

.page-profil .profile-actions {
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
}

.page-profil .profile-actions button {
  min-width: min(140px, 100%);
}

.profil-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 16px 12px 28px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.profil-footer__links a {
  color: #8b9eff;
  text-decoration: none;
}

.profil-footer__links a:hover {
  text-decoration: underline;
}

/* Skeletons chargement créations / stories */
@keyframes profil-skeleton-shine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.profil-skeleton__shine {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: profil-skeleton-shine 1.2s ease-in-out infinite;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .profil-skeleton__shine {
    animation: none;
    background: rgba(255, 255, 255, 0.06);
  }
}

.profil-skeleton--creations {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0 16px;
  min-height: 120px;
}

.profil-skeleton__line--title {
  height: 22px;
  width: 55%;
  max-width: 280px;
  margin: 0 auto;
}

.profil-skeleton__card {
  height: 140px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.profil-skeleton--stories {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  padding: 20px 0;
  flex-wrap: wrap;
  width: 100%;
}

.profil-skeleton__circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
}
