/* ============================================================
   USER PROFILE — user-profile.css v1.1
   Adapté au thème AlphaVault Drive (drive.css)
   Compatible dark mode (défaut) & light mode
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. VARIABLES ALIASES (bridge vers --avd-* de drive.css)
════════════════════════════════════════════════════════════ */
body.avd-page {
    --text-primary:   var(--avd-text,         #f0f4f8);
    --text-secondary: var(--avd-text-muted,   #cbd5e1);
    --text-dim:       var(--avd-text-dim,     #94a3b8);
    --primary:        var(--avd-primary,      #667eea);
    --primary-dark:   var(--avd-primary-dark, #764ba2);
    --glass-bg:       var(--avd-card,         rgba(30, 41, 59, 0.92));
    --glass-border:   var(--avd-border,       rgba(255, 255, 255, 0.08));
    --danger:         var(--avd-red,          #ef4444);
    --success-color:  var(--avd-green,        #10b981);
    --warning-color:  var(--avd-amber,        #f59e0b);
}

body.avd-page.light-mode {
    --text-primary:   var(--avd-text,   #1e293b);
    --text-secondary: var(--avd-text-muted, #475569);
    --glass-bg:       var(--avd-card,   #ffffff);
    --glass-border:   var(--avd-border, rgba(0, 0, 0, 0.08));
}

/* ════════════════════════════════════════════════════════════
   2. THIN MODERN SPINNERS
   Override FA fa-spin partout dans les sections profil
════════════════════════════════════════════════════════════ */
@keyframes thinSpinProfile {
    to { transform: rotate(360deg); }
}

/* Ciblage large : HTML initial + JS dynamique (showLoader) */
.profile-section .avd-spinner i.fa-spinner,
.glass-card .avd-spinner i.fa-spinner,
#followingList     i.fa-spinner,
#followersList     i.fa-spinner,
#savedPostsList    i.fa-spinner,
#followingList-loader  i.fa-spinner,
#followersList-loader  i.fa-spinner,
#savedPostsList-loader i.fa-spinner {
    /* Masquer le glyphe Font Awesome */
    font-size:   0       !important;
    /* Spinner thin line */
    display:     inline-block !important;
    width:       22px    !important;
    height:      22px    !important;
    border:      1.5px solid rgba(102, 126, 234, 0.12) !important;
    border-top-color:   var(--avd-primary)      !important;
    border-right-color: transparent             !important;
    border-radius: 50%                          !important;
    background:  none                           !important;
    animation:   thinSpinProfile 0.65s linear infinite !important;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Container du spinner profil : flex colonne centré */
.profile-section .avd-spinner,
.glass-card      .avd-spinner {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             10px;
    padding:         32px 16px;
    color:           var(--avd-text-dim);
    font-size:       12px;
    font-weight:     600;
}

/* Loader dynamique JS (showLoader / showError) */
#followingList-loader,
#followersList-loader,
#savedPostsList-loader {
    display:         flex         !important;
    flex-direction:  column       !important;
    align-items:     center       !important;
    justify-content: center       !important;
    gap:             10px         !important;
    padding:         24px 16px   !important;
    text-align:      center       !important;
    color:           var(--avd-text-dim) !important;
    font-size:       12px;
    font-weight:     600;
}

#followingList-loader  p,
#followersList-loader  p,
#savedPostsList-loader p {
    font-size:   11px !important;
    margin:      0    !important;
    color:       var(--avd-text-dim) !important;
}

/* ════════════════════════════════════════════════════════════
   3. END MESSAGE — "All items loaded"
════════════════════════════════════════════════════════════ */
#followingList-end,
#followersList-end,
#savedPostsList-end {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             6px;
    padding:         14px 16px;
    font-size:       11px;
    font-weight:     600;
    color:           var(--avd-text-dim);
    letter-spacing:  0.3px;
}

#followingList-end i,
#followersList-end i,
#savedPostsList-end i {
    color:     var(--avd-green);
    font-size: 12px;
}

/* ════════════════════════════════════════════════════════════
   4. PROFILE CONTAINER
════════════════════════════════════════════════════════════ */
.profile-container {
    max-width:      820px;
    margin:         0 auto;
    display:        flex;
    flex-direction: column;
    gap:            20px;
    padding-bottom: 48px;
}

/* ════════════════════════════════════════════════════════════
   5. SECTION BASE & GLASS CARD
════════════════════════════════════════════════════════════ */
.profile-section {
    position: relative;
}

.glass-card {
    background:    var(--avd-card);
    border:        1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    padding:       24px;
    transition:    var(--avd-transition);
}

body.avd-page.light-mode .glass-card {
    background:  #ffffff;
    box-shadow:  0 1px 6px rgba(0, 0, 0, 0.06);
}

/* ════════════════════════════════════════════════════════════
   6. PROFILE HEADER SECTION
════════════════════════════════════════════════════════════ */
.profile-header-section {
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.14) 0%,
        rgba(118, 75, 162, 0.09) 100%);
    border:        1px solid rgba(102, 126, 234, 0.22);
    border-radius: var(--avd-radius-xl);
    padding:       40px;
    overflow:      hidden;
}

body.avd-page.light-mode .profile-header-section {
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.08) 0%,
        rgba(118, 75, 162, 0.05) 100%);
}

/* Gradient orbs décoratifs */
.gradient-orb {
    position:       absolute;
    border-radius:  50%;
    filter:         blur(70px);
    pointer-events: none;
    z-index:        0;
}

.gradient-orb-1 {
    width:      220px;
    height:     220px;
    background: rgba(102, 126, 234, 0.28);
    top:        -60px;
    right:      -60px;
}

.gradient-orb-2 {
    width:      160px;
    height:     160px;
    background: rgba(118, 75, 162, 0.18);
    bottom:     -40px;
    left:       120px;
}

/* ── Avatar Wrapper ──────────────────────────────── */
.profile-avatar-wrapper {
    display:     flex;
    align-items: center;
    gap:         36px;
    position:    relative;
    z-index:     1;
}

.profile-avatar-container {
    position:   relative;
    flex-shrink: 0;
}

.avatar-ring {
    position:      absolute;
    inset:         -4px;
    border-radius: 50%;
    background:    linear-gradient(135deg, var(--avd-primary), var(--avd-primary-dark));
    z-index:       0;
    animation:     avatarRingPulse 3s ease-in-out infinite;
}

@keyframes avatarRingPulse {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 1;   }
}

.profile-avatar-large {
    width:         120px;
    height:        120px;
    border-radius: 50%;
    object-fit:    cover;
    position:      relative;
    z-index:       1;
    border:        4px solid var(--avd-bg, #0b1120);
    display:       block;
}

body.avd-page.light-mode .profile-avatar-large {
    border-color: #f1f5f9;
}

.avatar-overlay {
    position:        absolute;
    inset:           0;
    border-radius:   50%;
    background:      rgba(0, 0, 0, 0.58);
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             4px;
    opacity:         0;
    transition:      opacity 0.2s ease;
    cursor:          pointer;
    z-index:         2;
    color:           #fff;
    font-size:       12px;
    font-weight:     700;
}

.avatar-overlay i { font-size: 20px; margin-bottom: 2px; }
.profile-avatar-container:hover .avatar-overlay { opacity: 1; }

/* ── Header Info ─────────────────────────────────── */
.profile-header-info {
    flex:      1;
    min-width: 0;
}

.profile-username {
    font-size:   26px;
    font-weight: 900;
    color:       var(--avd-text);
    margin:      0 0 4px;
    line-height: 1.2;
}

.profile-email {
    font-size: 13px;
    color:     var(--avd-text-muted);
    margin:    0 0 14px;
}

/* ── Badges ──────────────────────────────────────── */
.profile-badges {
    display:     flex;
    align-items: center;
    gap:         8px;
    flex-wrap:   wrap;
}

.badge {
    font-size:      9px;
    font-weight:    800;
    padding:        4px 12px;
    border-radius:  20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display:        inline-flex;
    align-items:    center;
    gap:            4px;
}

.badge-plan {
    background: rgba(102, 126, 234, 0.14);
    color:      #a5b4fc;
    border:     1px solid rgba(102, 126, 234, 0.28);
}

body.avd-page.light-mode .badge-plan {
    background: rgba(102, 126, 234, 0.1);
    color:      var(--avd-primary);
}

.badge-verified {
    background: rgba(16, 185, 129, 0.12);
    color:      var(--avd-green);
    border:     1px solid rgba(16, 185, 129, 0.25);
}

/* Icons */
.profile-icon-pulse,
.section-icon-glow { color: var(--avd-primary); }
.section-icon-danger { color: var(--avd-red); }

/* ════════════════════════════════════════════════════════════
   7. SECTION HEADER
════════════════════════════════════════════════════════════ */
.section-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   20px;
}

.section-header h3 {
    font-size:      13px;
    font-weight:    800;
    color:          var(--avd-text);
    display:        flex;
    align-items:    center;
    gap:            8px;
    margin:         0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ════════════════════════════════════════════════════════════
   8. BUTTONS
════════════════════════════════════════════════════════════ */
.btn-edit {
    display:     inline-flex;
    align-items: center;
    gap:         6px;
    padding:     7px 14px;
    background:  var(--avd-input-bg);
    border:      1px solid var(--avd-border);
    border-radius: 8px;
    font-family: inherit;
    font-size:   11px;
    font-weight: 700;
    color:       var(--avd-text-muted);
    cursor:      pointer;
    transition:  var(--avd-transition);
}

.btn-edit:hover {
    background:   rgba(102, 126, 234, 0.1);
    color:        var(--avd-primary);
    border-color: rgba(102, 126, 234, 0.3);
}

.btn-save {
    display:      inline-flex;
    align-items:  center;
    gap:          6px;
    padding:      9px 18px;
    background:   linear-gradient(135deg, var(--avd-primary), var(--avd-primary-dark));
    border:       none;
    border-radius: 8px;
    font-family:  inherit;
    font-size:    12px;
    font-weight:  700;
    color:        #fff;
    cursor:       pointer;
    transition:   var(--avd-transition);
    box-shadow:   0 4px 14px rgba(102, 126, 234, 0.35);
    text-decoration: none;
}

.btn-save:hover {
    transform:  translateY(-1px);
    box-shadow: 0 6px 22px rgba(102, 126, 234, 0.5);
}

.btn-cancel {
    display:      inline-flex;
    align-items:  center;
    gap:          6px;
    padding:      9px 18px;
    background:   var(--avd-input-bg);
    border:       1px solid var(--avd-border);
    border-radius: 8px;
    font-family:  inherit;
    font-size:    12px;
    font-weight:  700;
    color:        var(--avd-text-muted);
    cursor:       pointer;
    transition:   var(--avd-transition);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color:      var(--avd-text);
}

body.avd-page.light-mode .btn-cancel:hover {
    background: rgba(0, 0, 0, 0.06);
}

.btn-secondary {
    display:      inline-flex;
    align-items:  center;
    gap:          6px;
    padding:      7px 14px;
    background:   var(--avd-input-bg);
    border:       1px solid var(--avd-border);
    border-radius: 8px;
    font-family:  inherit;
    font-size:    11px;
    font-weight:  700;
    color:        var(--avd-text-muted);
    cursor:       pointer;
    transition:   var(--avd-transition);
    white-space:  nowrap;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color:      var(--avd-text);
}

body.avd-page.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
}

.btn-secondary:disabled {
    opacity: 0.45;
    cursor:  not-allowed;
}

.btn-danger {
    display:      inline-flex;
    align-items:  center;
    gap:          6px;
    padding:      8px 16px;
    background:   rgba(239, 68, 68, 0.08);
    border:       1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-family:  inherit;
    font-size:    11px;
    font-weight:  700;
    color:        var(--avd-red);
    cursor:       pointer;
    transition:   var(--avd-transition);
    white-space:  nowrap;
    flex-shrink:  0;
}

.btn-danger:hover {
    background:   rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.4);
}

/* ════════════════════════════════════════════════════════════
   9. PROFILE FORM
════════════════════════════════════════════════════════════ */
.profile-form {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.form-row {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   16px;
}

.form-group {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}

.form-group label {
    font-size:      10px;
    font-weight:    800;
    color:          var(--avd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display:        flex;
    align-items:    center;
    gap:            6px;
}

.form-group label i {
    font-size:  11px;
    color:      var(--avd-primary);
    width:      12px;
    text-align: center;
}

.form-input {
    background:    var(--avd-input-bg);
    border:        1px solid var(--avd-border);
    border-radius: 8px;
    padding:       10px 14px;
    font-family:   'Inter', -apple-system, sans-serif;
    font-size:     13px;
    color:         var(--avd-text);
    outline:       none;
    transition:    var(--avd-transition);
    width:         100%;
    box-sizing:    border-box;
}

.form-input::placeholder { color: var(--avd-text-dim); }

.form-input:focus {
    border-color: var(--avd-primary);
    box-shadow:   0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-input:disabled {
    opacity: 0.55;
    cursor:  not-allowed;
}

textarea.form-input {
    resize:      vertical;
    min-height:  80px;
    line-height: 1.5;
}

.form-hint {
    font-size:  11px;
    color:      var(--avd-text-dim);
    margin-top: 2px;
    display:    block;
}

.form-actions {
    display:         flex;
    gap:             10px;
    justify-content: flex-end;
    padding-top:     12px;
    border-top:      1px solid var(--avd-border);
}

/* ════════════════════════════════════════════════════════════
   10. LISTS SCROLL CONTAINERS
════════════════════════════════════════════════════════════ */
#followingList,
#followersList,
#savedPostsList {
    overflow-y:     scroll !important;
    overflow-x:     hidden !important;
    max-height:     320px;
    scrollbar-gutter: stable;
    padding-right:  4px;
    position:       relative;
}

/* Webkit scrollbars */
#followingList::-webkit-scrollbar,
#followersList::-webkit-scrollbar,
#savedPostsList::-webkit-scrollbar {
    width: 4px;
}

#followingList::-webkit-scrollbar-track,
#followersList::-webkit-scrollbar-track,
#savedPostsList::-webkit-scrollbar-track {
    background:    transparent;
    border-radius: 4px;
}

#followingList::-webkit-scrollbar-thumb,
#followersList::-webkit-scrollbar-thumb,
#savedPostsList::-webkit-scrollbar-thumb {
    background:    linear-gradient(180deg, var(--avd-primary), var(--avd-primary-dark));
    border-radius: 4px;
    min-height:    36px;
}

/* Firefox */
#followingList,
#followersList,
#savedPostsList {
    scrollbar-width: thin;
    scrollbar-color: var(--avd-primary) transparent;
}

/* ════════════════════════════════════════════════════════════
   11. FOLLOWING & FOLLOWER CARDS — Minimalistes
════════════════════════════════════════════════════════════ */
.following-item-wrapper,
.follower-item-wrapper {
    display: block;
}

.following-item,
.follower-item {
    display:     flex;
    align-items: center;
    gap:         12px;
    padding:     10px 12px;
    background:  transparent;
    border:      none;
    border-bottom: 1px solid var(--avd-border);
    border-radius: 0;
    transition:  background 0.15s ease;
}

.following-item:last-of-type,
.follower-item:last-of-type {
    border-bottom: none;
}

.following-item:hover,
.follower-item:hover {
    background:    rgba(102, 126, 234, 0.04);
    border-radius: 8px;
    border-color:  transparent;
}

body.avd-page.light-mode .following-item:hover,
body.avd-page.light-mode .follower-item:hover {
    background: rgba(0, 0, 0, 0.025);
}

/* Avatar dans les items */
.following-item img,
.follower-item img {
    width:         40px !important;
    height:        40px !important;
    border-radius: 50% !important;
    object-fit:    cover !important;
    flex-shrink:   0 !important;
    border:        1.5px solid var(--avd-border) !important;
}

/* Infos texte */
.following-item h4,
.follower-item h4 {
    font-size:   13px !important;
    font-weight: 700 !important;
    color:       var(--avd-text) !important;
    margin:      0 0 2px !important;
}

.following-item p,
.follower-item p {
    font-size:     11px !important;
    color:         var(--avd-text-dim) !important;
    margin:        0 !important;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    max-width:     280px;
}

/* Stats inline */
.following-item span,
.follower-item span {
    font-size: 10px !important;
    color:     var(--avd-text-dim) !important;
}

/* ════════════════════════════════════════════════════════════
   12. SAVED POSTS CARDS — Minimalistes
════════════════════════════════════════════════════════════ */
.saved-post-item-wrapper {
    display: block;
}

.saved-post-item {
    display:       flex !important;
    gap:           12px !important;
    padding:       10px 12px !important;
    background:    transparent !important;
    border:        none !important;
    border-bottom: 1px solid var(--avd-border) !important;
    border-radius: 0 !important;
    transition:    background 0.15s ease !important;
    cursor:        pointer;
    align-items:   center !important;
}

.saved-post-item:last-of-type {
    border-bottom: none !important;
}

.saved-post-item:hover {
    background:    rgba(102, 126, 234, 0.04) !important;
    border-radius: 8px !important;
    border-color:  transparent !important;
}

body.avd-page.light-mode .saved-post-item:hover {
    background: rgba(0, 0, 0, 0.025) !important;
}

/* Image miniature */
.saved-post-item img {
    width:         52px !important;
    height:        52px !important;
    border-radius: 6px !important;
    object-fit:    cover !important;
    flex-shrink:   0 !important;
    opacity:       0.92;
}

/* Titre */
.saved-post-item h4 {
    font-size:     13px !important;
    font-weight:   700 !important;
    color:         var(--avd-text) !important;
    margin:        0 0 4px !important;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

/* Excerpt */
.saved-post-item p {
    font-size:     11px !important;
    color:         var(--avd-text-dim) !important;
    margin:        0 !important;
    line-height:   1.4 !important;
    display:       -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow:      hidden !important;
}

/* Meta badges (channel, date) */
.saved-post-item span {
    font-size: 10px !important;
    color:     var(--avd-text-dim) !important;
}

/* ════════════════════════════════════════════════════════════
   13. SECURITY SECTION
════════════════════════════════════════════════════════════ */
.security-items {
    display:        flex;
    flex-direction: column;
}

.security-item {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         14px 0;
    border-bottom:   1px solid var(--avd-border);
    gap:             16px;
}

.security-item:last-child { border-bottom: none; }

.security-item-info {
    display:     flex;
    align-items: center;
    gap:         14px;
    flex:        1;
    min-width:   0;
}

.security-item-info > i {
    font-size:  16px;
    color:      var(--avd-primary);
    width:      22px;
    text-align: center;
    flex-shrink: 0;
}

.security-item-info h4 {
    font-size:   13px;
    font-weight: 700;
    color:       var(--avd-text);
    margin:      0 0 2px;
}

.security-item-info p {
    font-size: 11px;
    color:     var(--avd-text-muted);
    margin:    0;
}

.security-icon-pulse {
    animation: securityPulse 2.5s ease-in-out infinite;
}

@keyframes securityPulse {
    0%, 100% { opacity: 1;    }
    50%       { opacity: 0.5; }
}

/* ════════════════════════════════════════════════════════════
   14. STATS GRID
════════════════════════════════════════════════════════════ */
.stats-grid {
    display:               grid;
    grid-template-columns: repeat(2, 1fr);
    gap:                   12px;
}

.stat-card {
    background:    var(--avd-input-bg);
    border:        1px solid var(--avd-border);
    border-radius: var(--avd-radius);
    padding:       16px;
    display:       flex;
    align-items:   center;
    gap:           14px;
    transition:    var(--avd-transition);
}

.stat-card:hover {
    border-color: var(--avd-border-hover);
    transform:    translateY(-2px);
    box-shadow:   var(--avd-shadow);
}

.stat-icon {
    width:           42px;
    height:          42px;
    border-radius:   12px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       16px;
    flex-shrink:     0;
    background:      rgba(102, 126, 234, 0.1);
    color:           var(--avd-primary);
}

.stat-content h4 {
    font-size:      9px;
    font-weight:    800;
    color:          var(--avd-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin:         0 0 5px;
}

.stat-content p {
    font-size:   18px;
    font-weight: 900;
    color:       var(--avd-text);
    margin:      0;
}

/* ════════════════════════════════════════════════════════════
   15. DANGER ZONE
════════════════════════════════════════════════════════════ */
.danger-section {
    border-color: rgba(239, 68, 68, 0.2)  !important;
    background:   rgba(239, 68, 68, 0.03) !important;
}

body.avd-page.light-mode .danger-section {
    background: rgba(239, 68, 68, 0.02) !important;
}

.danger-section .section-header h3 { color: var(--avd-red); }

.danger-items {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.danger-item {
    display:     flex;
    align-items: flex-start;
    justify-content: space-between;
    gap:         24px;
}

.danger-item-info h4 {
    font-size:   13px;
    font-weight: 800;
    color:       var(--avd-red);
    margin:      0 0 8px;
}

.danger-item-info p {
    font-size:   12px;
    color:       var(--avd-text-muted);
    margin:      0;
    line-height: 1.6;
}

.danger-list {
    margin:      10px 0 0 18px;
    padding:     0;
    line-height: 1.9;
    color:       var(--avd-text-dim);
    font-size:   12px;
}

/* ════════════════════════════════════════════════════════════
   16. TOAST NOTIFICATIONS
════════════════════════════════════════════════════════════ */
.toast-container {
    position:       fixed;
    bottom:         24px;
    right:          24px;
    z-index:        99999;
    display:        flex;
    flex-direction: column;
    gap:            10px;
    max-width:      360px;
    pointer-events: none;
}

.toast {
    display:       flex;
    align-items:   flex-start;
    gap:           12px;
    padding:       14px 16px;
    background:    #1e293b;
    border:        1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow:    var(--avd-shadow-lg);
    animation:     toastSlideIn 0.3s ease;
    pointer-events: all;
}

body.avd-page.light-mode .toast {
    background:  #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow:  0 8px 32px rgba(0, 0, 0, 0.12);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

.toast.success { border-left: 3px solid var(--avd-green);   }
.toast.error   { border-left: 3px solid var(--avd-red);     }
.toast.warning { border-left: 3px solid var(--avd-amber);   }
.toast.info    { border-left: 3px solid var(--avd-primary); }

.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.toast.success .toast-icon { color: var(--avd-green);   }
.toast.error   .toast-icon { color: var(--avd-red);     }
.toast.warning .toast-icon { color: var(--avd-amber);   }
.toast.info    .toast-icon { color: var(--avd-primary); }

.toast-content { flex: 1; min-width: 0; }

.toast-title {
    font-size:   13px;
    font-weight: 800;
    color:       var(--avd-text);
    margin-bottom: 3px;
}

.toast-message {
    font-size:   11px;
    color:       var(--avd-text-muted);
    line-height: 1.4;
}

.toast-close {
    background:  none;
    border:      none;
    color:       var(--avd-text-dim);
    cursor:      pointer;
    font-size:   11px;
    padding:     0;
    flex-shrink: 0;
    transition:  color 0.15s;
    pointer-events: all;
}

.toast-close:hover { color: var(--avd-red); }

/* ════════════════════════════════════════════════════════════
   17. MODAL
════════════════════════════════════════════════════════════ */
.modal {
    display:         none;
    position:        fixed;
    inset:           0;
    background:      rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index:         10000;
    align-items:     center;
    justify-content: center;
    padding:         16px;
}

.modal.active { display: flex; }

.glass-modal {
    background:    #1a2235;
    border:        1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--avd-radius-xl);
    max-width:     440px;
    width:         100%;
    box-shadow:    var(--avd-shadow-lg);
    overflow:      hidden;
}

body.avd-page.light-mode .glass-modal {
    background:   #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

/* ════════════════════════════════════════════════════════════
   18. RESPONSIVE — MOBILE (≤ 768px)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .profile-container     { padding-bottom: 60px; }
    .profile-header-section { padding: 28px 20px; }

    .profile-avatar-wrapper {
        flex-direction: column;
        align-items:    center;
        text-align:     center;
        gap:            20px;
    }

    .profile-header-info { text-align:    center; }
    .profile-badges      { justify-content: center; }

    .form-row { grid-template-columns: 1fr; gap: 12px; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    .danger-item { flex-direction: column; gap: 16px; }
    .danger-item .btn-danger { width: 100%; justify-content: center; }

    .security-item { flex-wrap: wrap; gap: 12px; }

    .glass-card { padding: 18px; }

    /* Cards mobiles : colonne centrée */
    .following-item,
    .follower-item,
    .saved-post-item {
        flex-direction: column  !important;
        align-items:    center  !important;
        text-align:     center  !important;
        padding:        16px 12px !important;
        gap:            10px    !important;
    }

    .following-item p,
    .follower-item  p { max-width: 100%; }

    #followingList,
    #followersList,
    #savedPostsList { max-height: 280px; }

    .toast-container { bottom: 16px; right: 12px; left: 12px; max-width: none; }
}

/* ════════════════════════════════════════════════════════════
   19. RESPONSIVE — SMALL MOBILE (≤ 480px)
════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .profile-avatar-large { width: 90px; height: 90px; }
    .profile-username     { font-size: 20px; }
    .stats-grid           { grid-template-columns: 1fr; }
    .stat-card            { padding: 12px; }
    .profile-header-section { padding: 20px 16px; }
    .glass-card           { padding: 14px; }

    #followingList,
    #followersList,
    #savedPostsList { max-height: 240px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE — Boutons Remove / Delete / Unfollow dans les cards
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .following-item .btn-danger,
    .follower-item  .btn-secondary,
    .saved-post-item .btn-danger {
        padding:         6px 14px  !important;
        font-size:       10px      !important;
        width:           auto      !important;
        max-width:       160px     !important;
        margin:          0 auto    !important;
        justify-content: center    !important;
    }
}