/* ==========================================================================
   CHALLENGESCOQUINS - STYLE MAÎTRE (v4.1 - Fix Navbar)
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES & CONFIGURATION
   ========================================================================== */
:root {
    /* --- Couleurs Structurelles --- */
    --bg-dark:   #121212;
    --bg-card:   #1e1e24;
    --bg-input:  #000;
    
    /* --- Texte --- */
    --text-main: #fff;
    --text-muted:#b0b0b0;

    /* --- Identité Visuelle --- */
    --primary:   #ff007f;     /* Rose principal */
    --secondary: #9c27b0;     /* Violet */
    --gold:      #ffd700;     /* Or */
    --grad:      linear-gradient(135deg, #ff007f, #9c27b0);

    /* --- Feedback & États --- */
    --danger:    #f44;
    --success:   #00C851;
    --gray-500:  #444;

    /* --- Types de Défis (Code Couleur) --- */
    --jour:      #f44;      /* Rouge */
    --semaine:   #fb3;      /* Jaune/Or */
    --mois:      #00C851;   /* Vert */

    /* --- Dimensions --- */
    --nav-height: 80px;
}

/* ==========================================================================
   2. BASE & RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding-top: var(--nav-height);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; }

/* Scrollbar Custom */
::-webkit-scrollbar { width: 10px; height: 10px; background-color: #121212; }
::-webkit-scrollbar-thumb { background-color: #333; border-radius: 5px; border: 2px solid #121212; }
::-webkit-scrollbar-thumb:hover { background-color: var(--primary); }
::selection { background: var(--primary); color: white; }

/* ==========================================================================
   3. TYPOGRAPHIE & UTILITAIRES
   ========================================================================== */
/* Alignement & Display */
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-left      { text-align: left; }
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.d-inline-block { display: inline-block !important; }

/* Helpers Flexbox */
.d-flex             { display: flex; }
.flex-col           { flex-direction: column; }
.flex-wrap          { flex-wrap: wrap; }
.justify-between    { justify-content: space-between; }
.justify-center     { justify-content: center; }
.items-center       { align-items: center; }
.gap-5              { gap: 5px; }
.gap-10             { gap: 10px; }
.gap-20             { gap: 20px; }
.flex-1             { flex: 1; }
.grow-1             { flex-grow: 1; }

/* Helper Centrage Absolu */
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Styles de texte */
.bold           { font-weight: 700; }
.italic         { font-style: italic; }
.uppercase      { text-transform: uppercase; }
.nowrap         { white-space: nowrap; }
.truncate       { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-wide        { letter-spacing: 2px; }
.font-mono      { font-family: monospace; }

/* Tailles */
.fs-tiny { font-size: 10px; }
.fs-08   { font-size: 0.8rem; }
.fs-09   { font-size: 0.9rem; }
.fs-1-1  { font-size: 1.1rem; }
.fs-1-2  { font-size: 1.2rem; font-weight: 700; }
.fs-1-4  { font-size: 1.4rem; }
.fs-2-rem{ font-size: 2rem; }
.fs-3    { font-size: 3rem; }

/* Couleurs */
.text-primary   { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-danger    { color: var(--danger); }
.text-success   { color: var(--success); }
.text-muted     { color: var(--text-muted); }
.text-gold      { color: var(--gold); }
.text-white     { color: white !important; }
.text-accent    { color: var(--accent-color, var(--primary)); }

/* Espacements */
.w-100 { width: 100%; } .w-auto { width: auto; } .h-100 { height: 100%; }
.pt-0 { padding-top: 0 !important; } .p-10 { padding: 10px; } .m-0 { margin: 0 !important; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 3rem; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 3rem; }
.ml-2 { margin-left: 0.5rem; } .ml-20 { margin-left: 20px; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .my-3 { margin-top: 1rem; margin-bottom: 1rem; }

/* Bordures & Formes */
.border-0 { border: none !important; } .border-1 { border-width: 1px !important; } .border-muted { border-color: #444 !important; }
.radius-6 { border-radius: 6px; } .rounded-circle { border-radius: 50%; }
.relative { position: relative; } .cursor-pointer { cursor: pointer; }
.shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

/* Dividers */
.sidebar-divider { border: 0; border-top: 1px solid #333; margin: 20px 0; }

/* ==========================================================================
   4. LAYOUT GLOBAL
   ========================================================================== */
.container { max-width: 1100px; margin: 0 auto; padding: 20px; width: 100%; animation: fadeInPage 0.6s ease-out; }

/* --- Header / Navigation --- */
.main-header {
    background-color: rgba(18, 18, 18, 0.95); border-bottom: 1px solid #333; height: var(--nav-height);
    width: 100%; position: fixed; top: 0; left: 0; z-index: 1000;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.logo { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 800; color: white; letter-spacing: -0.5px; }
.logo-app-icon { height: 52px; width: 52px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 10px rgba(255, 0, 127, 0.2); transition: transform 0.3s; }
.logo:hover .logo-app-icon { transform: scale(1.05) rotate(-3deg); }

.nav-links ul { display: flex; gap: 15px; align-items: center; }
.nav-links a { color: #ddd; font-weight: 500; font-size: 0.95rem; padding: 8px 16px; border-radius: 20px; }
.nav-links a:hover, .nav-links a.active { background-color: rgba(255, 255, 255, 0.1); color: var(--primary); }

.nav-back-arrow { font-size: 1.5rem; color: #fff; margin-right: 15px; display: flex; align-items: center; cursor: pointer; }
.nav-back-arrow:hover { color: var(--primary); transform: translateX(-3px); }

/* --- MENUS DÉROULANTS (Dropdown) --- */
.dropdown { position: relative; }
.dropdown-content { 
    display: none; flex-direction: column; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background-color: #222; min-width: 180px; border-radius: 8px; border: 1px solid #444; 
    box-shadow: 0 8px 16px rgba(0,0,0,0.5); overflow: hidden; padding: 5px 0; 
}
.dropdown:hover .dropdown-content { display: flex; }
.dropdown-content a { border-radius: 0; text-align: left; padding: 12px 20px; display: block; width: 100%; }
.dropdown-content a:hover { background-color: #333; }

/* Couleurs Dropdown */
.dropdown-content .nav-jour:hover { color: var(--jour) !important; background: rgba(255, 68, 68, 0.1); }
.dropdown-content .nav-semaine:hover { color: var(--semaine) !important; background: rgba(255, 187, 51, 0.1); }
.dropdown-content .nav-mois:hover { color: var(--mois) !important; background: rgba(0, 200, 81, 0.1); }

/* Bouton Messagerie Navbar */
.nav-btn-msg { position: relative; display: flex; align-items: center; justify-content: center; padding: 5px 8px; transition: transform 0.2s; }
.nav-btn-msg:hover { transform: scale(1.1); }
.nav-icon-msg { font-size: 1.4rem; line-height: 1; }
.badge-notif { position: absolute; top: -2px; right: -4px; font-size: 0.65rem; padding: 2px 5px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.3); }
.pulse-animation { animation: pulse-red 2s infinite; }

/* --- Footer --- */
.site-footer { margin-top: 80px; padding-bottom: 30px; width: 100%; }
.footer-links a { color: #888; font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: var(--primary); }
.footer-links .sep { margin: 0 10px; color: #444; }

/* ==========================================================================
   5. UI KIT
   ========================================================================== */
/* Boutons */
.btn { 
    display: inline-block; background: var(--grad); color: white; padding: 10px 20px; 
    border-radius: 50px; border: none; cursor: pointer; font-weight: bold; text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 0, 127, 0.4); filter: brightness(1.1); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }

/* Variantes Boutons */
.btn-admin-nav { border: 1px solid var(--primary); color: var(--primary) !important; padding: 6px 15px !important; }
.btn-admin-nav:hover { background: var(--primary) !important; color: black !important; }
.btn-login { background: var(--primary); color: black !important; font-weight: bold !important; }
.btn-login:hover { filter: brightness(1.1); transform: scale(1.05); }
.btn-outline { background: transparent; border: 1px solid #555; color: #ddd; }
.btn-outline:hover { background: #333; color: white; border-color: #fff; }
.btn-secondary { background: #333; border: 1px solid #555; color: white; }
.btn-secondary:hover { background: #444; }
.bg-dark { background-color: #111 !important; }
.bg-success { background-color: var(--success) !important; color: white; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 1.2em; opacity: 0.7; color: #fff; }
.btn-trash { color: var(--danger); }
.btn-sm { padding: 5px 10px !important; font-size: 0.85rem; line-height: 1.2; }
.btn-xs { padding: 0 4px; height: 24px; font-size: 0.7rem; border-radius: 3px; display: flex; align-items: center; justify-content: center; }

/* Boutons Ronds Action (Fusionnés) */
.btn-delete-avatar, .photo-action-btn {
    width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; border: none;
}
.btn-delete-avatar { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-delete-avatar:hover { background: var(--danger); color: white; transform: scale(1.1); }
.photo-action-btn { position: absolute; top: 10px; z-index: 20; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.photo-action-btn:hover { transform: scale(1.1); }
.btn-delete-cross { right: 10px; background: rgba(220, 53, 69, 0.9); color: white; }
.btn-anon-toggle { left: 10px; background: rgba(30, 30, 30, 0.9); color: #ccc; }
.btn-anon-toggle.is-anon { color: var(--primary); border: 1px solid var(--primary); }

/* Formulaires */
input[type="text"], input[type="email"], input[type="password"], input[type="file"], select, textarea, .form-input-dark { 
    width: 100%; padding: 12px; background: var(--bg-input); border: 1px solid #444; color: white; 
    border-radius: 6px; margin-bottom: 10px; font-family: inherit; transition: border-color 0.3s;
}
input:focus, select:focus, textarea:focus, .form-input-dark:focus { outline: none; border-color: var(--primary); }
.form-box { background: #222; padding: 15px; border-radius: 8px; }
.form-check { display: flex; align-items: center; cursor: pointer; }
.form-row { display: flex; gap: 15px; } 
.form-col { flex: 1; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px; background: var(--bg-input); padding: 10px; border: 1px solid var(--gray-500); border-radius: 6px; }
.cat-check-input { display: none; }
.cat-check-label { cursor: pointer; background: var(--bg-card); border: 1px solid var(--gray-500); padding: 6px 12px; border-radius: 4px; font-size: 0.9em; user-select: none; }
.cat-check-label:hover { border-color: #888; }
.cat-check-input:checked + .cat-check-label { background: var(--primary); color: white; border-color: var(--primary); }

/* Upload Preview */
.preview-container { text-align: center; margin-bottom: 1rem; }
.preview-box { background-color: #000; padding: 10px; border-radius: 8px; border: 1px dashed #444; display: inline-block; }
.preview-img { max-height: 200px; max-width: 100%; border-radius: 4px; display: block; }
.upload-preview-img { height: 150px; width: auto; object-fit: contain; border-radius: 6px; border: 1px solid #fff; display: inline-block; }

/* Badges & Alertes */
.badge { padding: 3px 8px; border-radius: 4px; font-size: 0.7em; font-weight: bold; text-transform: uppercase; color: black; display: inline-block; }
.badge-jour { background-color: var(--jour); color: white; }
.badge-semaine { background-color: var(--semaine); color: black; }
.badge-mois { background-color: var(--mois); color: white; }
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; text-align: center; font-weight: 600; }
.alert-success { background: rgba(0, 200, 81, 0.15); border: 1px solid var(--success); color: var(--success); }
.alert-danger { background: rgba(255, 68, 68, 0.15); border: 1px solid var(--danger); color: var(--danger); }
.alert-info { background: rgba(51, 181, 229, 0.15); border: 1px solid #33b5e5; color: #33b5e5; }

/* ==========================================================================
   6. MODULE : HERO & ACCUEIL
   ========================================================================== */
.card {
    background: var(--bg-card); border-radius: 12px; padding: 20px; margin-bottom: 30px; position: relative;
    border: 1px solid #333; box-shadow: 0 5px 15px rgba(0,0,0,0.2); border-top: 5px solid var(--accent-color, var(--gray-500)); 
}
.border-jour { --accent-color: var(--jour); }
.border-semaine { --accent-color: var(--semaine); }
.border-mois { --accent-color: var(--mois); }
.border-gold { --accent-color: var(--gold); }
.border-primary { --accent-color: var(--primary); }

.hero-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border: 1px solid #333; border-radius: 16px; padding: 30px; text-align: center;
    position: relative; overflow: hidden; margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-card:hover { transform: translateY(-5px); }
.hero-title { font-size: 2rem; font-weight: 900; margin: 10px 0; text-transform: uppercase; background: -webkit-linear-gradient(#fff, #aaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { color: #bbb; font-size: 1rem; max-width: 600px; margin: 0 auto 25px auto; }
.hero-meta { display: flex; justify-content: center; gap: 20px; margin-bottom: 25px; font-size: 0.9rem; color: #888; }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-badge { padding: 5px 15px; border-radius: 20px; font-weight: 800; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; display: inline-block; margin-bottom: 15px; }

.btn-hero {
    background: var(--grad); color: white; font-size: 1.1rem; padding: 12px 40px;
    border-radius: 50px; font-weight: 800; text-transform: uppercase; display: inline-block;
    box-shadow: 0 5px 15px rgba(255, 0, 127, 0.4); transition: all 0.3s;
}
.btn-hero:hover { transform: scale(1.05); }

/* Variantes Hero */
.hero-jour { border-color: var(--jour); box-shadow: 0 0 20px rgba(255, 68, 68, 0.1); }
.hero-jour:hover { border-color: var(--jour); box-shadow: 0 15px 40px rgba(255, 68, 68, 0.4) !important; }
.hero-card.hero-jour .hero-badge { background: var(--jour); color: white; box-shadow: 0 0 10px var(--jour); animation: pulseBadge 2s infinite; }
.btn-hero-jour { background: var(--jour); box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4); }
.btn-hero-jour:hover { background: #d32f2f; box-shadow: 0 0 20px var(--jour); }

.hero-semaine { border-color: var(--semaine); box-shadow: 0 0 20px rgba(255, 187, 51, 0.1); }
.hero-semaine:hover { border-color: var(--semaine); box-shadow: 0 15px 40px rgba(255, 187, 51, 0.4) !important; }
.hero-badge-semaine { background: var(--semaine); color: #000; }
.timer-semaine { color: var(--semaine); }
.btn-hero-semaine { background: var(--semaine); color: #000; box-shadow: 0 5px 15px rgba(255, 187, 51, 0.4); }
.btn-hero-semaine:hover { background: #ffca28; color: #000; box-shadow: 0 0 20px var(--semaine); }

.hero-mois { border-color: var(--mois); box-shadow: 0 0 20px rgba(0, 200, 81, 0.1); }
.hero-mois:hover { border-color: var(--mois); box-shadow: 0 15px 40px rgba(0, 200, 81, 0.4) !important; }
.hero-badge-mois { background: var(--mois); color: white; }
.timer-mois { color: var(--mois); }
.btn-hero-mois { background: var(--mois); color: white; box-shadow: 0 5px 15px rgba(0, 200, 81, 0.4); }
.btn-hero-mois:hover { background: #007E33; color: white; box-shadow: 0 0 20px var(--mois); }

/* AJOUT : Classe Manquante */
.btn-hero-primary { background: var(--primary); color: white; box-shadow: 0 5px 15px rgba(255, 0, 127, 0.4); }
.btn-hero-primary:hover { background: #d6006b; }

@keyframes pulseBadge {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

/* ==========================================================================
   7. MODULE : PODIUM & HALL OF FAME
   ========================================================================== */
.hall-of-fame { background: linear-gradient(to bottom, rgba(255, 215, 0, 0.05), transparent); padding: 0px; border-radius: 15px; border-top: 1px solid rgba(255, 215, 0, 0.2); }
.hof-grid { display: flex; justify-content: center; align-items: flex-end; }
.hof-card { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; width: 90px; transition: transform 0.3s; }
.hof-card:hover { transform: translateY(-5px) scale(1.05); z-index: 20 !important; }
.hof-rank-1 { order: 2; z-index: 10; margin: 0 -15px; padding-bottom: 20px; }
.hof-rank-2 { order: 1; z-index: 5; }
.hof-rank-3 { order: 3; z-index: 5; }
.hof-avatar { border-radius: 50%; object-fit: cover; background: #000; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.hof-rank-1 .hof-avatar { width: 90px; height: 90px; border: 3px solid #FFD700; }
.hof-rank-2 .hof-avatar { width: 70px; height: 70px; border: 3px solid #C0C0C0; }
.hof-rank-3 .hof-avatar { width: 70px; height: 70px; border: 3px solid #CD7F32; }
.hof-crown { line-height: 1; z-index: 15; text-shadow: 0 2px 4px rgba(0,0,0,0.8); margin-bottom: -12px; position: relative; }
.hof-rank-1 .hof-crown { font-size: 2rem; }
.hof-rank-2 .hof-crown, .hof-rank-3 .hof-crown { font-size: 1.5rem; }
.hof-username { margin-top: 8px; font-size: 0.8rem; font-weight: 700; color: #fff; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hof-username:hover { color: var(--primary); }

.podium-grid { display: flex; justify-content: center; align-items: center; margin: 50px 0; padding: 0 20px; }
.podium-card { background: #1a1a1a; border: 2px solid #333; border-radius: 12px; padding: 15px; text-align: center; position: relative; width: 280px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; transition: transform 0.3s ease; }
.podium-card.rank-1:hover { transform: translateY(-5px) scale(1.2) !important; z-index: 50 !important; }
.podium-card:hover { transform: translateY(-5px) scale(1.05) !important; z-index: 100 !important; }
.rank-1 { order: 2; z-index: 10; border-color: #ffd700; background: linear-gradient(180deg, rgba(255, 215, 0, 0.1), rgba(0,0,0,0.8)); box-shadow: 0 10px 40px rgba(0,0,0,0.8); transform: scale(1.1); }
.rank-2 { order: 1; z-index: 5; border-color: #C0C0C0; background: #1a1a1a; transform: scale(0.95) translateX(20px); filter: brightness(0.9); }
.rank-3 { order: 3; z-index: 4; border-color: #cd7f32; background: #1a1a1a; transform: scale(0.8) translateX(-20px); filter: brightness(0.8); }
.podium-crown { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); z-index: 15; font-size: 2.5rem; }
.podium-img-wrapper { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; margin-bottom: 10px; border: 1px solid #333; background: black; }
.podium-img { width: 100%; height: 100%; object-fit: cover; }
.podium-username { display: block; font-weight: 800; margin: 10px 0 2px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; cursor: pointer; }
.podium-username:hover { color: var(--primary) !important; text-decoration: underline; transform: scale(1.05); }
.rank-1 .podium-username { color: #ffd700; }
.rank-2 .podium-username { color: #C0C0C0; }
.rank-3 .podium-username { color: #cd7f32; }

/* ==========================================================================
   8. MODULE : GALERIE, MÉDIAS & ACTIONS
   ========================================================================== */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-top: 20px; }
.media-container { position: relative; overflow: hidden; border-radius: 8px; background: #000; height: 200px; border: 1px solid #333; transition: border-color 0.3s ease; }
.media-container:hover { border-color: var(--primary); }
.media-content { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.media-container:hover .media-content { transform: scale(1.1); }

.media-info { 
    position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0)); 
    padding: 10px; font-size: 0.85em; color: white; font-weight: 600; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none; 
}
.media-container:hover .media-info { opacity: 1; transform: translateY(0); }
.media-info .btn-vote { pointer-events: auto; }

.blur-heavy { filter: blur(10px); }
.blur-overlay, .media-info.locked-info { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); color: white; font-weight: bold; pointer-events: none; z-index: 2; }

.user-tag { 
    display: block; margin-top: 8px; background: #0a0a0a; color: var(--text-muted); font-size: 0.75em; font-weight: 700; text-transform: uppercase; text-align: center; border: 1px solid #333; border-left: 4px solid var(--primary); border-radius: 0 4px 4px 0; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.user-tag:hover { background: #222; color: white; padding-left: 12px; }
.user-tag.locked { border-left-color: #555; color: #555; cursor: not-allowed; }
.tag-anonyme-admin { border-left-color: var(--danger) !important; }

/* ==========================================================================
   9. MODULE : SYSTÈME DE VOTE
   ========================================================================== */
.btn-vote {
    width: auto !important; height: auto !important; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 30px; color: white; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; z-index: 50;
}
.btn-vote:hover { background: rgba(255, 255, 255, 0.15); border-color: var(--primary); transform: scale(1.05); }
.btn-vote:active { transform: scale(0.95); }
.btn-vote svg { width: 18px; height: 18px; fill: #fff; transition: fill 0.3s; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); }
.btn-vote .icon-full { display: none; }
.btn-vote .icon-empty { display: block; opacity: 0.8; }
.btn-vote.voted { border-color: #ff4757; background: rgba(255, 71, 87, 0.1); }
.btn-vote.voted .icon-empty { display: none; }
.btn-vote.voted .icon-full { display: block; fill: #ff4757; animation: popHeart 0.4s ease-out; }
@keyframes popHeart { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* ==========================================================================
   10. MODULE : ARCHIVES & ZONES
   ========================================================================== */
.archives-list { display: flex; flex-direction: column; gap: 15px; }
.archive-card { display: flex !important; align-items: center; gap: 15px; padding: 15px 20px; text-decoration: none; min-height: 90px; border-top: 0; border-left: 5px solid var(--accent-color); }
.card-interactive:hover { transform: scale(1.02); background: rgba(255,255,255,0.05); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.archive-img-col { width: 60px; height: 60px; flex-shrink: 0; position: relative; }
.archive-thumb { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #333; transition: border-color 0.3s ease; }
.archive-card:hover .archive-thumb { border-color: var(--accent-color); }
.placeholder-thumb { background: #222; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #555; border-radius: 50%; border: 2px solid #333; width: 100%; height: 100%; }
.archive-card-title { color: var(--text-main); font-size: 1.1rem; font-weight: 800; margin: 4px 0; line-height: 1.2; }
.archive-meta { font-size: 0.85rem; color: var(--text-muted); }
.archive-arrow { font-size: 1.4rem; color: #444; margin-left: auto; transition: 0.3s; }
.archive-card:hover .archive-arrow { color: var(--accent-color); transform: translateX(5px); }

.zones-container { min-height: 50px; border: 2px dashed #444; padding: 15px; border-radius: 8px; background: #1a1a1a; margin-bottom: 20px; }
.zone-block { background: var(--bg-card); border: 1px solid #444; padding: 15px; margin-bottom: 15px; border-radius: 8px; }
.zone-header { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--primary); font-weight: 800; border-bottom: 1px solid #333; padding-bottom: 8px; }
.zone-controls { display: flex; gap: 10px; }
.zone-textarea { width: 100%; background: #121212; border: 1px solid #333; color: white; padding: 10px; min-height: 80px; }

.rule-list { padding-left: 0; }
.rule-list > li { position: relative; padding-left: 30px; margin-bottom: 15px; line-height: 1.6; color: #ddd; }
.rule-list > li::before { content: '👉'; position: absolute; left: 0; top: 0; color: var(--primary); }
.sub-list { list-style: none; padding-left: 20px; margin-top: 10px; border-left: 2px solid #555; }
.sub-list li { font-size: 0.9em; color: #bbb; margin-bottom: 5px; }
.sub-list li::before { content: '⛔ '; }

/* ==========================================================================
   11. RESPONSIVE & MOBILE
   ========================================================================== */
.burger-menu { display: none; cursor: pointer; }
.burger-menu span { display: block; width: 25px; height: 3px; background-color: white; margin: 5px; transition: 0.3s; }

@media screen and (max-width: 900px) {
    .nav-links { position: fixed; right: 0; top: var(--nav-height); height: calc(100vh - var(--nav-height)); width: 100%; background-color: #111; border-top: 1px solid #333; display: block; overflow-y: auto; transform: translateX(100%); transition: transform 0.3s ease-in-out; }
    .nav-links ul { flex-direction: column; padding: 40px 0; gap: 20px; }
    .nav-active { transform: translateX(0%); }
    .burger-menu { display: block; }
    .burger-menu.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger-menu.toggle span:nth-child(2) { opacity: 0; }
    .burger-menu.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
    .media-info { opacity: 1 !important; transform: translateY(0) !important; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%); }
    .podium-grid { flex-direction: column; gap: 40px; }
    .podium-card { width: 100%; max-width: 300px; transform: none !important; margin: 0 auto; }
    .rank-1 { order: 1; } .rank-2 { order: 2; } .rank-3 { order: 3; }
    .login-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .span-full { grid-column: span 1; }
    .settings-avatar-wrapper { flex-direction: column; text-align: center; }
    .profile-header-row { flex-direction: column; text-align: center; gap: 10px; }
    .profile-identity { text-align: center; }
    .profile-actions-grid { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: span 1; }
    /* Correctif Mobile Dropdown */
    .dropdown-content { position: static; display: flex; transform: none; background: #1a1a1a; width: 90%; margin: 10px auto; border: none; }
}
@keyframes fadeInPage { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   12. MODULES ADMIN (Dashboard & Listes)
   ========================================================================== */
.admin-header { background-color: rgba(18, 18, 18, 0.98); border-bottom: 1px solid var(--primary); height: var(--nav-height); width: 100%; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.5); backdrop-filter: blur(5px); }
.admin-header a:not(.btn):hover { color: var(--primary) !important; transition: color 0.3s; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; width: 100%; }
.dash-card { background-color: #1e1e24; border: 1px solid #333; border-radius: 8px; padding: 20px; display: flex; align-items: center; border-left: 5px solid #555; box-shadow: 0 4px 6px rgba(0,0,0,0.3); transition: transform 0.2s; min-height: 100px; }
.dash-card:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.4); }

.dash-card.danger { border-left-color: var(--danger); background: linear-gradient(to right, rgba(255, 68, 68, 0.1), rgba(30, 30, 36, 1)); }
.dash-card.warning { border-left-color: var(--gold); background: linear-gradient(to right, rgba(255, 215, 0, 0.1), rgba(30, 30, 36, 1)); }
.dash-card.info { border-left-color: var(--primary); background: linear-gradient(to right, rgba(255, 0, 127, 0.1), rgba(30, 30, 36, 1)); }

.dash-icon { font-size: 2.5rem; margin-right: 20px; opacity: 0.9; }
.dash-content { flex: 1; }
.dash-title { font-weight: 800; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 5px; letter-spacing: 1px; }
.dash-msg { font-size: 0.95rem; color: #ccc; line-height: 1.4; }

.table-collapse { border-collapse: collapse; width: 100%; }
.hover-bg-dark:hover { background-color: rgba(255,255,255,0.05); }
.status-dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-green { background: var(--success); box-shadow: 0 0 5px var(--success); }
.dot-blue { background: #33b5e5; }
.dot-gray { background: #555; }

/* ==========================================================================
   13. MES PHOTOS (Gestionnaire)
   ========================================================================== */
.control-box { background: var(--bg-card); border: 1px solid #333; border-radius: 6px; padding: 15px; margin: 0 auto 20px auto; max-width: 500px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); text-align: center; }
.control-title { margin: 0 0 5px 0; font-size: 1.1rem; color: var(--primary); }
.control-desc { margin: 0 0 15px 0; font-size: 0.85rem; color: var(--text-muted); }
.control-legend { display: flex; justify-content: center; align-items: flex-start; gap: 30px; }
.legend-item { display: flex; flex-direction: column; align-items: center; }
.legend-icon { font-weight: bold; font-size: 0.9rem; margin-bottom: 2px; }
.legend-sub { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.legend-sep { width: 1px; height: 30px; background: rgba(255,255,255,0.1); margin-top: 5px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.gallery-card { background: var(--bg-dark); border: 1px solid #333; border-radius: 4px; overflow: hidden; position: relative; display: flex; flex-direction: column; transition: border-color 0.2s, box-shadow 0.2s; }
.gallery-card:hover { z-index: 5; box-shadow: 0 5px 15px rgba(0,0,0,0.5); border-color: #777; }
.gallery-img-wrap { height: 130px; position: relative; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9); transition: filter 0.2s; }
.gallery-card:hover .gallery-img { filter: brightness(1); }
.gallery-badge-anon { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.8); border: 1px solid #444; border-radius: 4px; font-size: 0.7rem; padding: 2px 4px; }
.gallery-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 5px; display: flex; justify-content: space-between; font-size: 0.7rem; font-weight: bold; color: #fff; }
.gallery-info { padding: 8px; background: var(--bg-card); flex: 1; display: flex; flex-direction: column; }
.gallery-title a { color: #fff; text-decoration: none; font-weight: bold; font-size: 0.75rem; display: block; text-align: center; }
.gallery-title a:hover { color: var(--primary); }
.gallery-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 5px; }

/* ==========================================================================
   14. PARAMÈTRES & PROFIL
   ========================================================================== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-group { display: flex; flex-direction: column; gap: 5px; }
.settings-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: bold; }
.input-privacy-group { display: flex; align-items: center; gap: 10px; width: 100%; }
.privacy-toggle input { display: none; }
.privacy-icon { font-size: 1.2rem; cursor: pointer; opacity: 0.5; filter: grayscale(1); transition: 0.3s; user-select: none; }
.privacy-toggle input:checked + .privacy-icon { opacity: 1; filter: grayscale(0); }
.switch-wrapper { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch-wrapper input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #444; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }
.span-full { grid-column: span 2; }

.settings-avatar-wrapper { display: flex; align-items: center; gap: 20px; }
.settings-avatar-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); background-color: var(--bg-dark); }

.profile-card-content { display: flex; flex-direction: column; align-items: center; width: 100%; }
.profile-header-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-avatar-header { width: 80px; height: 80px; object-fit: cover; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 5px 15px rgba(0,0,0,0.4); background: var(--bg-card); }
.profile-placeholder-header { width: 80px; height: 80px; border: 3px solid #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; background-color: var(--primary); color: white; font-size: 2rem; font-weight: 700; }
.profile-identity { text-align: left; }
.profile-username-lg { font-size: 2rem; font-weight: 900; text-transform: uppercase; color: white; line-height: 1; margin-bottom: 5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.profile-date-sm { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.profile-info-centered { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.info-badge { background-color: rgba(255, 255, 255, 0.05); border: 1px solid #444; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; color: #e0e0e0; display: flex; align-items: center; gap: 6px; transition: background 0.3s; }
.info-badge:hover { background-color: rgba(255, 255, 255, 0.1); border-color: #666; }
.info-icon { font-size: 1rem; }
.profile-bio-full { width: 100%; background-color: rgba(255, 255, 255, 0.03); border: 1px solid #333; border-radius: 8px; padding: 20px; text-align: left; position: relative; }
.bio-title { font-size: 0.8rem; text-transform: uppercase; color: var(--primary); font-weight: 800; letter-spacing: 1px; margin-bottom: 10px; display: block; }

.info-badge.badge-private, .profile-bio-full.badge-private { background-color: rgba(255, 68, 68, 0.15) !important; border: 1px dashed #ff4444 !important; color: #ffcccc !important; }
.info-badge.badge-private:hover, .profile-bio-full.badge-private:hover { background-color: rgba(255, 68, 68, 0.25) !important; cursor: help; }

/* Boutons Actions Profil */
.btn-gallery-hero { background: linear-gradient(45deg, #ff007f, #9c27b0, #ff007f); background-size: 200% auto; color: white; font-size: 1.1rem; font-weight: 800; padding: 15px 40px; border-radius: 50px; text-transform: uppercase; letter-spacing: 1px; border: none; display: inline-flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(255, 0, 127, 0.4); transition: all 0.4s ease; animation: gradientMove 3s infinite linear; text-decoration: none; }
.btn-gallery-hero:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 15px 40px rgba(255, 0, 127, 0.6); color: white; }
.btn-gallery-hero i, .btn-gallery-hero span.icon { font-size: 1.4rem; }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.profile-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.action-column { background: rgba(255, 255, 255, 0.03); border: 1px solid #333; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.3s; }
.action-title { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 5px; text-align: center; letter-spacing: 1px; }
.action-column.manage { border-color: var(--primary); }
.action-column.manage .action-title { color: var(--primary); }
.btn-action-full { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; border: 1px solid transparent; }
.btn-view { background: rgba(0, 0, 0, 0.3); border-color: #444; color: #ddd; }
.btn-view:hover { background: #333; border-color: #fff; color: white; }
.btn-manage { background: rgba(255, 0, 127, 0.1); border-color: var(--primary); color: white; }
.btn-manage:hover { background: var(--primary); color: black; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; background: #222; color: #555; border: 1px dashed #444; }

/* Stats Détaillées */
.stats-row { display: flex; justify-content: space-around; align-items: center; width: 100%; margin-top: 10px; }
.stat-item { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.stat-item:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 10%; height: 80%; width: 1px; background: rgba(255, 255, 255, 0.1); }
.stat-val { font-size: 1.5rem; font-weight: 800; color: white; line-height: 1.2; }
.stat-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.stat-icon { font-size: 1.2rem; margin-bottom: 5px; }
.gold { color: #ffd700; } .silver { color: #c0c0c0; } .bronze { color: #cd7f32; }

/* Stats 30 Jours */
.col-span-2 { grid-column: span 2; }
.dash-card.performance { border-left-color: #00e676; background: linear-gradient(to right, rgba(0, 230, 118, 0.05), rgba(30, 30, 36, 1)); display: flex; flex-direction: column; justify-content: center; padding: 20px 30px; }
.text-perf { color: #00e676 !important; }
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; width: 100%; margin-top: 15px; }
.progress-group { display: flex; flex-direction: column; gap: 5px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: #ccc; font-weight: 600; }
.progress-track { width: 100%; height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 4px; width: 0%; transition: width 1s ease-out; }
.fill-jour { background: var(--jour); } .fill-semaine { background: var(--semaine); } .fill-mois { background: var(--mois); } .fill-global { background: linear-gradient(90deg, #ff007f, #9c27b0); }
.perf-rank-msg { margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center; }
.rank-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.1); color: white; font-weight: 800; font-size: 0.9rem; margin-top: 5px; border: 1px solid rgba(255,255,255,0.2); }
/* =========================================
   NETTOYAGE FINAL (Classes utilitaires)
   ========================================= */

/* Pour les avatars dans les tableaux admin */
.avatar-xs {
    width: 35px; height: 35px;
    object-fit: cover;
    margin: 0 auto;
    border: 1px solid #444;
}

/* Pour les inputs de recherche */
.input-search-md {
    width: 250px;
}

/* Pour les bulles de messagerie */
.msg-width-limit {
    max-width: 85%;
    width: fit-content;
}

/* Pour les cartes de stats (Profile) */
.dash-card-tall {
    min-height: 140px;
}

/* Lien sans décoration (ex: pseudos) */
.link-clean {
    text-decoration: none;
    color: inherit;
}
/* =========================================
   SIGNATURE ADMIN (Mode Narcisse 👑) - CORRIGÉ
   ========================================= */
.admin-skin {
    /* Dégradé Rose vers Or */
    background: linear-gradient(135deg, #ff007f 30%, #ffd700 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Effet de brillance */
    filter: drop-shadow(0 0 5px rgba(255, 0, 127, 0.5));
    font-weight: 900 !important;
    display: inline-block; /* Important pour le dégradé */
}

/* La couronne automatique après le pseudo */
.admin-skin::after {
    content: ' 👑'; 
    display: inline-block; /* <--- C'EST CETTE LIGNE QUI MANQUAIT POUR L'ANIMATION */
    -webkit-text-fill-color: initial; /* Garde la couleur de l'emoji */
    filter: none;
    font-size: 0.8em;
    vertical-align: top;
    margin-left: 5px;
    animation: floatCrown 3s ease-in-out infinite;
}

/* Animation de flottement */
@keyframes floatCrown {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); } /* J'ai accentué le mouvement */
}
/* =========================================
   CORRECTIF : SIGNATURE ADMIN DANS GALERIE
   ========================================= */

/* 1. On force la largeur normale dans la galerie */
.user-tag.admin-skin {
    display: block !important;     /* Prend toute la largeur */
    width: 100% !important;
    text-align: center;
    background-size: 200% auto;    /* Améliore le rendu du dégradé sur une grande surface */
}

/* 2. On empêche le Hover de casser le dégradé */
.user-tag.admin-skin:hover {
    /* On force le dégradé à rester, sinon le fond gris l'écrase */
    background: linear-gradient(135deg, #ff007f 30%, #ffd700 90%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    
    /* On ajoute une bordure dorée pour montrer le survol */
    border-color: #ffd700 !important;
    
    /* On garde le petit décalage du texte pour l'effet "bouton" */
    padding-left: 12px; 
}
/* =========================================
   MODALE GALERIE + CHAT
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 9999;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    display: flex; width: 95%; max-width: 1300px; height: 90vh;
    background: #111; border-radius: 8px; overflow: hidden;
    border: 1px solid #333; box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* Colonne Gauche : Image */
.modal-image-col {
    flex: 2; background: #000; display: flex; align-items: center; justify-content: center;
    position: relative;
}
.modal-img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Colonne Droite : Chat */
.modal-chat-col {
    flex: 1; min-width: 350px; display: flex; flex-direction: column;
    border-left: 1px solid #333; background: #1a1a1a;
}
.chat-header { padding: 15px; border-bottom: 1px solid #333; background: #222; }
.chat-body { flex: 1; overflow-y: auto; padding: 15px; }
.chat-footer { padding: 15px; border-top: 1px solid #333; background: #222; }

/* Messages */
.chat-msg { margin-bottom: 12px; font-size: 0.95rem; line-height: 1.4; }
.chat-msg .meta { font-size: 0.75rem; color: #666; float: right; margin-left: 10px; }
.chat-msg .text { color: #ddd; display: block; margin-top: 2px; }

/* Signature Admin dans le chat */
.chat-admin { 
    background: linear-gradient(135deg, #ff007f 30%, #ffd700 90%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    font-weight: 900;
}
.chat-admin::after { content: ' 👑'; -webkit-text-fill-color: initial; font-size: 0.8em;}

/* Mobile : Image en haut, Chat en bas */
@media (max-width: 900px) {
    .modal-content { flex-direction: column; height: 90vh; width: 90%; border-radius: 0; }
    .modal-image-col { flex: 1; height: 45%; }
    .modal-chat-col { flex: 1; height: 45%; min-width: 90%; }
}
.comment-actions { font-size: 0.75rem; margin-top: 5px; }
.comment-actions a { color: #666; text-decoration: underline; cursor: pointer; margin-right: 8px; }
.comment-actions a:hover { color: #ff007f; }
.edit-area { 
    width: 90%; background: #222; border: 1px solid #ff007f; color: white; 
    padding: 5px; border-radius: 4px; font-size: 0.9rem; margin-top: 5px;
}
/* Positionnement des cœurs sur les miniatures */
.media-container, .podium-img-wrapper { position: relative; }

.mini-vote-layer {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 50; /* Pour passer devant le lien de la photo */
}

/* On s'assure que le bouton de vote est cliquable et propre sur l'image */
.mini-vote-layer .btn-vote {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 4px 8px;
    backdrop-filter: blur(2px);
    transform: scale(0.85); /* Un peu plus discret sur les miniatures */
}

/* Badge pour tes propres photos (Podium) */
.badge-votes-me {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
/* Pastille du pseudo incrustée */
.user-tag-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 60; /* Au-dessus de tout */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
    max-width: calc(100% - 60px); /* Évite d'écraser le bouton de vote */
}

.user-tag-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* On cache les anciens tags sous les photos s'ils existent encore */
.gallery .user-tag { display: none; }
/* Style des réponses et actions compactes */
.chat-msg.is-reply {
    margin-left: 20px; /* Plus petit décalage */
    border-left: 1px solid var(--primary); /* Ligne plus fine */
    padding-left: 10px;
    background: rgba(255, 255, 255, 0.01);
    margin-top: -8px; /* Colle un peu plus au parent */
}

.comment-actions { 
    display: inline-flex; 
    gap: 12px; 
    margin-left: 10px; 
    font-size: 0.8rem;
}

.comment-actions a { 
    cursor: pointer; 
    text-decoration: none !important; 
    transition: transform 0.2s; 
}

.comment-actions a:hover { transform: scale(1.2); }

.reply-link { color: #888; }
.edit-link { color: #ffca28; }
.delete-link { color: #f44; font-weight: bold; }

/* Zone d'édition compacte */
.edit-area {
    width: 100%;
    background: #000;
    border: 1px solid var(--primary);
    color: #fff;
    font-size: 0.85rem;
    padding: 5px;
    border-radius: 4px;
    margin: 5px 0;
}
/* Empêche le texte de sortir de la modale */
.chat-msg .text { 
    color: #ddd; 
    display: block; 
    margin-top: 2px;
    word-break: break-word; /* FIX : Retour à la ligne automatique */
    overflow-wrap: break-word;
    flex: 1; /* Prend toute la place dispo */
}

/* Alignement des actions pour qu'elles ne bougent pas */
.chat-msg .actions-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.comment-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* Empêche les icônes de rétrécir */
}
.nav-btn-msg {
    position: relative;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.badge-notif {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}
/* Bouton Message Secret (Profil) */
.btn-msg-secret {
    display: inline-flex !important; /* Force l'alignement icône/texte */
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

/* Taille de l'emoji enveloppe */
.btn-msg-secret .icon-lg {
    font-size: 1.2rem;
    line-height: 1;
}
/* Bouton Poubelle rapide sur la liste */
.btn-trash-quick {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 35px; /* Un peu plus gros pour le doigt */
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    font-size: 1rem;
    z-index: 20; /* Important : au-dessus du lien principal */
    text-decoration: none !important;
    border: 1px solid rgba(255, 68, 68, 0.3);
    background: rgba(30, 30, 36, 0.9); /* Fond sombre pour lisibilité */
    transition: all 0.2s;
}

/* --- COMPORTEMENT SUR ORDINATEUR (Survol) --- */
@media (min-width: 901px) {
    .btn-trash-quick {
        opacity: 0; /* Caché par défaut */
        background: rgba(0,0,0,0.5);
    }
    
    .card:hover .btn-trash-quick {
        opacity: 1; /* Apparaît au survol */
    }

    .btn-trash-quick:hover {
        background: #ff4444;
        color: white;
        transform: translateY(-50%) scale(1.1);
    }
}

/* --- COMPORTEMENT SUR MOBILE (Toujours visible) --- */
@media (max-width: 900px) {
    .btn-trash-quick {
        opacity: 1; /* Toujours visible */
        right: 5px; /* Un peu plus au bord */
        background: rgba(0, 0, 0, 0.6); /* Fond semi-transparent permanent */
        border-color: #ff4444;
    }
    
    /* On décale un peu le texte sur mobile pour pas qu'il passe sous le bouton */
    .card .flex-1 {
        padding-right: 40px !important; 
    }
}
/* =========================================
   GESTION DES LIENS IMBRIQUÉS (Pseudo vs Tchat)
   ========================================= */

/* 1. Le conteneur de la carte devient le référent */
.card-relative {
    position: relative;
}

/* 2. Le lien "Tchat" devient invisible et couvre toute la carte */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Niveau 1 : Le fond */
    content: "";
    cursor: pointer;
}

/* 3. Les éléments "Au-dessus" (Pseudo, Avatar, Poubelle) */
.z-top {
    position: relative;
    z-index: 10; /* Niveau 10 : Passe au-dessus du lien Tchat */
    pointer-events: auto; /* Assure le clic */
}

/* 4. Feedback visuel au survol du pseudo */
a.z-top:hover,
.z-top:hover .text-white,
.z-top:hover .admin-skin {
    text-decoration: underline !important;
    filter: brightness(1.2);
    color: var(--primary); /* Petit bonus : le pseudo devient rose au survol */
}
/* Pastille de notification sur les onglets */
.badge-tab-corner {
    position: absolute;
    top: -5px;      /* Décalage vers le haut */
    right: -10px;   /* Décalage vers la droite */
    background-color: var(--primary); /* Ou var(--danger) si spécifié */
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-dark); /* Contour pour séparer du fond */
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
}

/* On s'assure que le parent est bien positionné pour recevoir l'absolute */
.relative {
    position: relative !important;
}
/* Nouveaux boutons profil harmonisés */
.btn-action-profile {
    flex: 1;                 /* Ils prennent chacun 50% de la place */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;                /* Espace entre icône et texte */
    padding: 10px 15px;      /* Moins haut que les boutons "hero" */
    border-radius: 50px;     /* Bien arrondis */
    font-size: 0.9rem;       /* Texte lisible mais compact */
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
    max-width: 300px;        /* Pour pas qu'ils soient géants sur PC */
    
    /* Style par défaut (comme btn-primary) */
    background: var(--primary); 
    color: white;
    border: 1px solid var(--primary);
}

/* Variante "Outline" pour la galerie (pour le contraste visuel) */
.btn-action-profile.btn-outline {
    background: transparent;
    border: 1px solid var(--muted);
    color: #ccc;
}

.btn-action-profile:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    color: white;
    border-color: white;
}
/* ==============================================
   CORRECTIFS MOBILE - SECTION "MES INFORMATIONS"
   ============================================== */
@media only screen and (max-width: 768px) {

    /* 1. On transforme la grille en une seule colonne verticale */
    .settings-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* 2. On s'assure que chaque groupe prend toute la largeur */
    .settings-group {
        width: 100%;
        min-width: 100%;
    }

    /* 3. LE POINT CLÉ : On force les inputs à s'empiler */
    /* On autorise le retour à la ligne dans le groupe input + œil */
    .input-privacy-group {
        display: flex;
        flex-wrap: wrap; /* Permet aux éléments de passer à la ligne */
        gap: 8px;
    }

    /* 4. On force chaque champ (select, input, textarea) à faire 100% de large */
    .input-privacy-group select,
    .input-privacy-group input,
    .input-privacy-group textarea {
        width: 100% !important;     /* Force la largeur totale */
        flex: 1 1 100% !important;  /* Force l'élément flex à prendre 100% */
        margin-right: 0;            /* Enlève les marges droites */
    }

    /* 5. Gestion de l'icône Œil (Privacy) */
    /* Elle se placera naturellement en bas à droite puisque les inputs prennent toute la place */
    .privacy-toggle {
        margin-left: auto; /* Pousse l'icône tout à droite */
        margin-top: 5px;   /* Un petit espace au-dessus */
        margin-bottom: 5px;
    }
/* --- 2. SWITCHS (Messagerie / Privé) - VERSION CENTRÉE --- */
    
    /* On cible le conteneur flex à l'intérieur des cards */
    .card .d-flex.items-center.justify-between {
        display: flex;
        flex-direction: column; /* Empile les éléments verticalement */
        align-items: center !important; /* Centre tout horizontalement */
        text-align: center; /* Centre le texte */
        gap: 20px; /* Espace entre le texte et le bouton */
    }

    /* On force le bouton switch à se centrer et on enlève les marges bizarres */
    .switch-wrapper {
        align-self: center !important; /* Centre le switch lui-même */
        margin: 0 !important;
        transform: scale(1.2); /* Optionnel : grossit un peu le bouton pour le tactile */
    }

    /* On s'assure que le bloc de texte prend toute la largeur */
    .card .d-flex.items-center.justify-between > div {
        width: 100%;
    }
}
/* ==========================================================================
   15. ACCORDÉON MOBILE (Hero Cards)
   ========================================================================== */

/* Par défaut (PC) : La flèche est cachée, tout le contenu est visible */
.mobile-arrow { display: none; }
.hero-foldable { display: block; opacity: 1; }

/* UNIQUEMENT SUR MOBILE */
@media screen and (max-width: 768px) {
    
    /* La carte devient cliquable */
    .hero-card {
        cursor: pointer;
        padding-bottom: 20px; /* Padding réduit quand fermé */
        transition: transform 0.3s ease, box-shadow 0.3s ease, padding 0.3s;
    }

    /* Conteneur du haut (Badge + Flèche + Titre) */
    .hero-header-mobile {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    /* Ligne du haut (Badge à gauche, Flèche à droite) */
    .hero-top-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
    }

    /* La flèche d'indication */
    .mobile-arrow {
        display: block;
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--text-muted);
        transition: transform 0.3s ease;
        padding: 5px;
    }

    /* Rotation de la flèche quand ouvert */
    .hero-card.open .mobile-arrow {
        transform: rotate(180deg);
        color: white;
    }

    /* Zone repliable (Description, Timer, Bouton) */
    .hero-foldable {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        margin-top: 0;
        /* Animation fluide */
        transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s;
    }

    /* État OUVERT */
    .hero-card.open .hero-foldable {
        max-height: 3000px; /* Assez grand pour tout contenir */
        opacity: 1;
        margin-top: 20px;
padding-bottom: 30px;
    }

    /* Ajustement du titre sur mobile */
    .hero-title {
        font-size: 1.6rem;
        margin: 5px 0 0 0;
        text-align: left;
    }
    
    /* Centrer le titre si on veut, sinon laisser aligné gauche */
    .text-center .hero-title { text-align: center; }
}