/* ═══════════════════════════════════════════
   DragonsMag — profil.css
   Page de profil utilisateur
   Dépend de base.css
═══════════════════════════════════════════ */

/* ════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════ */
.page-profil {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ════════════════════════════════════════════
   CARTE IDENTITÉ — en-tête du profil
════════════════════════════════════════════ */
.profil-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    overflow: hidden;
}

/* Bandeau de fond */
.profil-banner {
    height: 100px;
    background: linear-gradient(
        135deg,
        var(--bg2) 0%,
        rgba(116,27,71,.3) 50%,
        rgba(103,81,81,.2) 100%
    );
    position: relative;
}

/* Motif décoratif */
.profil-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(116,27,71,.04) 20px,
        rgba(116,27,71,.04) 21px
    );
}

.profil-card-body {
    padding: 0 24px 24px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: -40px;
    position: relative;
}

/* Avatar */
.profil-avatar-wrap {
    flex-shrink: 0;
    position: relative;
}

.profil-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--bg2);
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fh);
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

.profil-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge rôle sur l'avatar */
.profil-role-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--bg2);
    white-space: nowrap;
}

/* Infos principales */
.profil-identity {
    flex: 1;
    min-width: 0;
    padding-top: 44px;
}

.profil-username {
    font-family: var(--fh);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profil-realname {
    font-family: var(--fb);
    font-size: 14px;
    color: var(--text3);
    margin-top: 2px;
}

/* Métadonnées (sexe, age, pays) */
.profil-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.profil-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--fb);
    font-size: 12px;
    color: var(--text2);
}
.profil-meta-item svg {
    width: 13px;
    height: 13px;
    color: var(--text3);
    flex-shrink: 0;
}

/* Actions (bouton éditer son propre profil) */
.profil-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding-top: 44px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════
   BLOCS DE SECTION
════════════════════════════════════════════ */
.profil-section {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    overflow: hidden;
}

.profil-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
}

.profil-section-title {
    font-family: var(--fh);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .3px;
}

.profil-section-title svg {
    width: 15px;
    height: 15px;
    color: var(--accent3);
}

.profil-section-body {
    padding: 16px 18px;
}

/* ════════════════════════════════════════════
   RÉSEAUX SOCIAUX
════════════════════════════════════════════ */
.profil-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profil-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--r);
    border: 1px solid var(--border2);
    background: var(--bg3);
    color: var(--text2);
    text-decoration: none;
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    transition: all .15s;
}
.profil-social-link:hover {
    border-color: var(--accent2);
    color: var(--accent3);
    background: var(--accent-bg);
    transform: translateY(-1px);
}
.profil-social-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.profil-social-link i   { font-size: 14px; }

/* ════════════════════════════════════════════
   STATISTIQUES COLLECTION
════════════════════════════════════════════ */
.profil-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.profil-stat-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profil-stat-label {
    font-family: var(--fb);
    font-size: 10px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.profil-stat-value {
    font-family: var(--fh);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.profil-stat-value.accent { color: var(--accent3); }
.profil-stat-value.green  { color: var(--green); }
.profil-stat-value.amber  { color: var(--amber); }
.profil-stat-value.blue   { color: var(--blue); }

.profil-stat-sub {
    font-size: 11px;
    color: var(--text3);
}

/* ════════════════════════════════════════════
   STATS JEU VIDÉO
════════════════════════════════════════════ */
.profil-jv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 768px) {
    .profil-jv-grid { grid-template-columns: 1fr; }
}

/* Grid 1 — Dernier jeu */
.profil-jv-last {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.profil-jv-last-card {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg4);
    border: 1px solid var(--border);
}

.profil-jv-last-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.6);
    transition: filter .3s;
}
.profil-jv-last-card:hover img { filter: brightness(.75); }

.profil-jv-last-overlay {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%);
}

.profil-jv-last-name {
    font-family: var(--fh);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.profil-jv-last-meta {
    font-size: 10px;
    color: rgba(255,255,255,.6);
    margin-top: 3px;
}

.profil-jv-last-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
}

/* Grid 2 — Stats du mois */
.profil-jv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

/* Grid 3 — Liens stats globales */
.profil-jv-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.profil-jv-link-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    transition: all .15s;
}
.profil-jv-link-card:hover {
    border-color: var(--accent2);
    background: var(--accent-bg);
    transform: translateY(-1px);
}

.profil-jv-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profil-jv-link-icon svg { width: 15px; height: 15px; color: var(--accent3); }

.profil-jv-link-label {
    font-family: var(--fh);
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    transition: color .15s;
}
.profil-jv-link-card:hover .profil-jv-link-label { color: var(--accent3); }

.profil-jv-link-sub {
    font-size: 10px;
    color: var(--text3);
    margin-top: 1px;
}

/* ════════════════════════════════════════════
   FAVORIS
════════════════════════════════════════════ */
.profil-favoris-group { margin-bottom: 14px; }
.profil-favoris-group:last-child { margin-bottom: 0; }

.profil-favoris-label {
    font-family: var(--fm);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 8px;
}

.profil-favoris-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profil-favori-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    transition: all .15s;
}
.profil-favori-item:hover {
    border-color: var(--accent2);
    background: var(--accent-bg);
}

.profil-favori-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg4);
    flex-shrink: 0;
}
.profil-favori-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profil-favori-name {
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    transition: color .15s;
}
.profil-favori-item:hover .profil-favori-name { color: var(--accent3); }

/* ════════════════════════════════════════════
   ÉVÉNEMENTS
════════════════════════════════════════════ */
.profil-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profil-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    transition: all .15s;
}
.profil-event-item:hover {
    border-color: var(--accent2);
    background: var(--bg4);
}

.profil-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 36px;
    flex-shrink: 0;
}
.profil-event-day {
    font-family: var(--fh);
    font-size: 18px;
    font-weight: 800;
    color: var(--accent3);
    line-height: 1;
}
.profil-event-month {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.profil-event-info { flex: 1; min-width: 0; }
.profil-event-name {
    font-family: var(--fh);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.profil-event-item:hover .profil-event-name { color: var(--accent3); }
.profil-event-lieu {
    font-size: 11px;
    color: var(--text3);
    margin-top: 1px;
}

.profil-event-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    flex-shrink: 0;
}
.profil-event-status.confirmed {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(74,222,128,.3);
}
.profil-event-status.pending {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid rgba(251,191,36,.3);
}

/* ════════════════════════════════════════════
   JOURNAL D'ACTIVITÉ
════════════════════════════════════════════ */
.profil-journal-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Ligne de temps verticale */
.profil-journal-list::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border2);
}

.profil-journal-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0 8px 0;
    position: relative;
}

/* Point sur la timeline */
.profil-journal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg2);
    flex-shrink: 0;
    margin-top: 4px;
    margin-left: 14px;
    box-shadow: 0 0 0 3px rgba(116,27,71,.15);
    z-index: 1;
}

.profil-journal-content { flex: 1; min-width: 0; padding-left: 4px; }

.profil-journal-text {
    font-family: var(--fb);
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
}
.profil-journal-text a {
    color: var(--accent3);
    text-decoration: none;
}
.profil-journal-text a:hover { text-decoration: underline; }

.profil-journal-date {
    font-family: var(--fm);
    font-size: 10px;
    color: var(--text3);
    margin-top: 2px;
}

/* ════════════════════════════════════════════
   ÉTAT NON CONNECTÉ
════════════════════════════════════════════ */
.profil-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    color: var(--text3);
    text-align: center;
    background: var(--bg3);
    border-radius: var(--r);
}
.profil-locked svg { opacity: .3; }
.profil-locked-title {
    font-family: var(--fh);
    font-size: 14px;
    font-weight: 700;
    color: var(--text2);
}
.profil-locked p {
    font-size: 12px;
    line-height: 1.6;
    max-width: 280px;
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 768px) {
    .profil-card-body { flex-direction: column; align-items: flex-start; gap: 10px; }
    .profil-actions   { padding-top: 0; }
    .profil-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .profil-favoris-list { gap: 6px; }
}

@media (max-width: 480px) {
    .profil-avatar    { width: 72px; height: 72px; font-size: 26px; }
    .profil-username  { font-size: 18px; }
    .profil-stats-grid { grid-template-columns: 1fr 1fr; }
}
