/* ==========================================================================
   SOMMAIRE DU THEME MMFR
   1. Configurations Globales & BBCode
   2. Header & Navigation Visuelle
   3. Accueil (Grille des Forums & Statistiques)
   4. Messages (Viewtopic & Menu Hamburger)
   5. Profil (Memberlist)
   6. Footer & Statistiques du bas
   ========================================================================== */

/* ==========================================================================
   1. CONFIGURATIONS GLOBALES & BBCODE
   ========================================================================== */

/* Couleur de survol (Hover) globale pour tout le forum */
a.forumtitle:hover,
a.topictitle:hover,
.nav-link:hover,
.postbody h3 a:hover,
.pagination li a:hover {
    color: #d41142 !important;
    text-decoration: underline !important;
}

/* On ne force pas la couleur du pseudo au survol :
   il doit garder la couleur du groupe phpBB. */
.postprofile dt a:hover {
    text-decoration: underline !important;
}

/* Redesign des tags BBCode (Annule le rouge et change le bleu) */
.forum-tag {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 0.9em;
    font-weight: bold;
    margin: 0 2px;
    transition: all 0.2s ease !important;
}

.forum-tag:hover,
a.forum-tag:hover {
    background-color: #11304a !important;
    color: #ffffff !important;
    border-color: #11304a !important;
    text-decoration: none !important;
}

/* ==========================================================================
   2. HEADER & NAVIGATION VISUELLE
   ========================================================================== */

#menu-hautgauche {
    background-color: #11304a;
    padding: 0px 6px;
    border-radius: 4px;
}

/* Conteneur et disposition */
.visual-nav-container {
    margin: 15px auto;
    padding: 0 10px;
    max-width: 100%;
}

.visual-nav-inner {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons Visuels */
.visual-nav-item {
    flex: 1 1 calc(50% - 15px);
    min-width: 280px;
    max-width: 600px;
    display: block;
    border-radius: 6px;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.visual-nav-item:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Bannières (Fonds SVG) */
.map-shortcut {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='rgba(255,255,255,0.15)' stroke-width='1.5'/%3E%3Cpath d='M5 50 H95 M50 5 V95' stroke='rgba(255,255,255,0.2)' stroke-width='1.5'/%3E%3Cpath d='M11.5 30 Q50 42 88.5 30 M11.5 70 Q50 58 88.5 70' fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='1.5'/%3E%3Cpath d='M30 11.5 Q42 50 30 88.5 M70 11.5 Q58 50 70 88.5' fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 20px center, linear-gradient(135deg, #475569 0%, #334155 100%);
    background-size: 75px 75px, auto;
    border: 1px solid #2d394a;
}

.roadtrip-shortcut {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 L35 55 L75 80 L115 42 L140 68 L160 50 L160 100 Z' fill='rgba(255,255,255,0.15)'/%3E%3Cpath d='M0 100 L20 75 L55 65 L95 85 L130 52 L160 72 L160 100 Z' fill='rgba(255,255,255,0.10)'/%3E%3C/svg%3E") no-repeat right center, linear-gradient(135deg, #225682 0%, #11304a 100%);
    background-size: 150px 100%, auto;
    border: 1px solid #0d2539;
}

/* Textes et Icônes de la navigation */
.v-nav-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    gap: 12px;
    min-height: 28px;
}

.v-nav-icon {
    font-size: 16px !important;
    color: #ffffff !important;
    line-height: 16px !important;
    height: 16px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.4);
    display: inline-block;
    width: 28px;
    text-align: center;
}

.v-nav-text {
    color: #ffffff !important;
    font-size: 16px !important;
    line-height: 16px !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: block;
}

@media (max-width: 700px) {
    .visual-nav-inner { gap: 10px; }
    .visual-nav-item { flex: 1 1 100%; }
    .v-nav-content { padding: 12px; min-height: 44px; }
    .v-nav-text { font-size: 14px !important; line-height: 20px !important; }
    .v-nav-icon { font-size: 14px !important; width: 26px; line-height: 20px !important; height: 20px; }
}

/* ==========================================================================
   3. ACCUEIL (GRILLE DES FORUMS)
   ========================================================================== */

.modern-category-block { margin-bottom: 45px; }

.modern-cat-header {
    background-color: #4688ce;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.modern-cat-header a {
    color: #ffffff !important;
    text-decoration: none;
}

.modern-forum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 25px;
}

.modern-forum-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 15px rgba(17, 48, 74, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.modern-forum-card:hover {
    box-shadow: 0 8px 25px rgba(17, 48, 74, 0.15);
    border-color: #94a3b8;
}

.modern-forum-card.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #ef4444;
    z-index: 10;
}

/* Partie Haute (Titre + Icône) */
.mf-top {
    display: flex;
    gap: 15px;
    padding: 22px 20px;
    flex-grow: 1;
}

.mf-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0059b3 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modern-forum-card .mf-icon svg { fill: #11304a !important; }

.modern-forum-card.unread .mf-icon { background: #fecaca !important; border-color: #ef4444 !important; }
.modern-forum-card.unread .mf-icon svg { fill: #991b1b !important; }

.mf-info { flex-grow: 1; min-width: 0; }

.forumtitle {
    font-size: 16px;
    font-weight: 800;
    color: #11304a !important;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    line-height: 1.3;
}
.forumtitle:hover { color: #d41142 !important; }

.forum-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* Sous-Forums */
.forum-subs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.subforum {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569 !important;
    text-decoration: none !important;
    transition: background 0.2s ease;
    white-space: normal;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
}
.subforum:hover { background: #e2e8f0; }
.subforum.unread { border-color: #fca5a5; color: #b91c1c !important; background: #fff5f5; }
.subforum i, .subforum .icon { flex-shrink: 0; }

/* Statistiques */
.mf-stats {
    display: flex;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    background: #e8eff5;
    margin-top: auto;
}
.mf-stat {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
}
.mf-stat:first-child { border-right: 1px solid #cbd5e1; }
.mf-stat-val { font-size: 16px; font-weight: 800; color: #11304a; }
.mf-stat-name { font-size: 11px; text-transform: uppercase; color: #64748b; font-weight: 700; margin-top: 2px; }

/* Dernier Message (Hauteur verrouillée) */
.mf-lastpost {
    background: #ffffff;
    padding: 12px 20px !important;
    display: flex !important;
    gap: 12px;
    align-items: center !important;
    box-sizing: border-box;
    height: 115px !important;
    min-height: 115px !important;
    max-height: 115px !important;
    overflow: hidden !important;
}

.mf-lp-content { display: flex; flex-direction: column; width: 100%; }

.mf-lp-title {
    font-size: 13px;
    font-weight: 700;
    color: #11304a !important;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
    max-width: 100%;
}
.mf-lp-title:hover { color: #d41142 !important; text-decoration: underline; }

.mf-lp-author {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0 !important;
}
.mf-lp-author strong,
.mf-lp-author a {
    font-weight: 700;
}

.mf-lp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
}
.mf-lp-time { font-size: 11px; color: #94a3b8; margin: 0; }

.mf-lp-readmore {
    font-size: 11px;
    font-weight: 800;
    color: #20517b !important;
    text-decoration: none !important;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}
.mf-lp-readmore:hover { color: #d41142 !important; }

.no-post { font-size: 12px; color: #94a3b8; font-style: italic; text-align: center; }

@media (max-width: 768px) {
    .modern-forum-grid { gap: 30px; }
    .modern-forum-card { border-width: 2px; border-color: #cbd5e1; }
    .modern-forum-card:has(.forum-subs) { grid-column: span 1; }
}
@media (max-width: 500px) {
    .forum-subs { grid-template-columns: 1fr; }
}

/* ==========================================================================
   4. MESSAGES (VIEWTOPIC) & MENU HAMBURGER
   ========================================================================== */

.post {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 0 30px 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.post .inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 20px;
    padding: 0 !important;
    background: transparent !important;
    position: relative !important;
}
.post + hr.divider { display: none !important; }

/* Profil de l'auteur (Gauche) */
.postprofile {
    box-sizing: border-box !important;
    width: 270px !important;
    min-width: 270px !important;
    margin: 0 !important;
    height: auto !important;
    background: #e1eaf2 !important;
    border: 1px solid #d1dce8 !important;
    border-radius: 8px !important;
    padding: 20px 15px !important;
    float: none !important;
    display: flex;
    flex-direction: column;
}

.postprofile .avatar-container { text-align: center !important; margin-bottom: 12px; }
.postprofile .avatar img { max-width: 90px !important; height: auto !important; border-radius: 8px !important; border: 2px solid #ffffff; box-shadow: 0 2px 8px rgba(17, 48, 74, 0.08); }

.postprofile dt { text-align: center !important; font-size: 15px; font-weight: 800; color: #11304a; margin-bottom: 5px; }

/* Important : ne pas forcer la couleur ici.
   phpBB injecte la couleur du groupe sur le lien du pseudo. */
.postprofile dt a {
    font-weight: 800;
    text-decoration: none;
}
.postprofile dt a:hover {
    text-decoration: underline;
}

/* Sécurité supplémentaire pour les pseudos colorés phpBB */
.postprofile dt a.username-coloured,
.postprofile dt .username-coloured {
    font-weight: 800;
}

.postprofile .profile-rank { text-align: center !important; color: #64748b; font-size: 11px; font-weight: bold; margin-bottom: 15px; text-transform: uppercase; }

.postprofile dd { display: block !important; text-align: left !important; margin: 0 !important; width: 100%; border-bottom: 1px solid #d1dce8; padding: 8px 0 !important; color: #11304a; font-size: 13px !important; font-weight: bold !important; }
.postprofile dd:last-of-type { border-bottom: none; }
.postprofile dd strong { display: block !important; color: #64748b !important; font-size: 11px !important; text-transform: uppercase; margin-bottom: 2px !important; font-weight: 700; }

/* On évite color: ... !important sur les liens/spans pour ne pas écraser les couleurs natives phpBB. */
.postprofile dd a,
.postprofile dd span {
    font-size: 13px !important;
    font-weight: bold !important;
}


/* Sécurité couleurs phpBB :
   ces classes doivent pouvoir garder la couleur de groupe définie en ACP. */
.postprofile .username-coloured,
.postprofile a.username-coloured {
    font-weight: 800;
}

/* Corps du Message (Droite) */
.postbody {
    box-sizing: border-box !important;
    margin: 0 !important;
    height: auto !important;
    flex-grow: 1;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 25px 30px !important;
    box-shadow: 0 4px 10px rgba(17, 48, 74, 0.03);
    float: none !important;
    width: auto !important;
    position: relative !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.post .back2top { position: absolute !important; bottom: 15px !important; right: 20px !important; margin: 0 !important; z-index: 5; }

.postbody h3 { font-size: 18px !important; font-weight: 800 !important; color: #11304a !important; border-bottom: none !important; padding-bottom: 0 !important; margin-bottom: 5px !important; padding-right: 50px !important; }
.postbody p.author { color: #94a3b8 !important; font-size: 12px; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; margin-bottom: 20px; }
.postbody .content { font-size: 15px; line-height: 1.6; color: #1e293b; flex-grow: 1; }

/* Menu Hamburger */
.post-buttons { position: absolute !important; top: 20px !important; right: 25px !important; display: block !important; margin: 0 !important; z-index: 10; }
.post-buttons > li:not(.post-buttons-responsive-menu) { display: none !important; }
.post-buttons > li.post-buttons-responsive-menu { display: block !important; }

.post-buttons .button-icon-only {
    background: #f1f5f9 !important; border: 1px solid #cbd5e1 !important; color: #475569 !important; border-radius: 6px !important; width: 36px !important; height: 36px !important; display: inline-flex !important; align-items: center; justify-content: center; padding: 0 !important; transition: all 0.2s ease; box-shadow: none !important;
}
.post-buttons .button-icon-only:hover { background: #11304a !important; color: #ffffff !important; border-color: #11304a !important; text-decoration: none !important; }

/* Contenu du Menu Déroulant */
.dropdown-contents {
    background: #ffffff !important; border-radius: 8px !important; border: 1px solid #cbd5e1 !important; box-shadow: 0 4px 15px rgba(17, 48, 74, 0.08) !important; padding: 5px 0 !important; min-width: 150px !important; max-height: none !important; overflow: visible !important;
}
.dropdown .pointer-inner { border-bottom-color: #ffffff !important; }
.dropdown-up .pointer-inner { border-bottom-color: transparent !important; border-top-color: #ffffff !important; }
.dropdown .pointer { border-bottom-color: #cbd5e1 !important; }
.dropdown-up .pointer { border-top-color: #cbd5e1 !important; }

.dropdown-contents a.button {
    width: 100% !important; display: flex !important; align-items: center !important; background: transparent !important; border: none !important; border-radius: 0 !important; height: auto !important; padding: 7px 15px !important; color: #475569 !important; font-size: 13px !important; font-weight: 600 !important; box-shadow: none !important; transition: background-color 0.1s ease, color 0.1s ease !important;
}
.dropdown-contents a.button i, .dropdown-contents a.button .icon { color: #94a3b8 !important; font-size: 13px !important; width: 20px !important; text-align: center !important; margin: 0 !important; }

.dropdown-contents a.button:hover { background: #f1f5f9 !important; color: #d41142 !important; }
.dropdown-contents a.button:hover i, .dropdown-contents a.button:hover .icon { color: #d41142 !important; }

/* Force l'affichage du texte manquant via l'infobulle */
.dropdown-contents a.button span { display: none !important; }
.dropdown-contents a.button::after { content: attr(title); display: inline-block !important; margin-left: 12px; }

/* Mobile Viewtopic */
@media (max-width: 768px) {
    .post .inner { flex-direction: column !important; align-items: stretch !important; gap: 0; }
    .postprofile { width: 100% !important; min-width: auto !important; height: auto !important; flex-direction: column !important; align-items: flex-start !important; padding: 15px !important; border-radius: 8px 8px 0 0 !important; border-bottom: none !important; }
    .postprofile dt { display: flex !important; align-items: center !important; gap: 15px !important; text-align: left !important; margin: 0; white-space: nowrap !important; font-size: 16px; }
    .postprofile .avatar-container { margin-bottom: 0 !important; flex-shrink: 0; }
    .postprofile .avatar img { max-width: 45px !important; border-width: 2px; }
    .postprofile .profile-rank { text-align: left !important; margin: 5px 0 10px 0; }
    .postprofile dd:not(.profile-rank) { display: flex !important; justify-content: space-between; align-items: center; padding: 6px 0 !important; }
    .postprofile dd strong { margin-bottom: 0 !important; }
    .postbody { width: 100% !important; height: auto !important; border-radius: 0 0 8px 8px !important; border-top: 1px solid #dce6f0 !important; padding: 15px !important; }
    .postbody h3 { padding-right: 50px !important; clear: both; }
    .post-buttons { top: 15px !important; right: 15px !important; }
}

/* ==========================================================================
   5. PROFIL (MEMBERLIST VIEW)
   ========================================================================== */

h2.memberlist-title { display: none; }

.modern-profile-header {
    background: linear-gradient(135deg, #11304a 0%, #071929 100%);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}
.modern-profile-header::after {
    content: ''; position: absolute; right: 0; top: 0; height: 100%; width: 40%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M10 0 L100 90 V100 H0 Z' fill='rgba(255,255,255,0.02)'/%3E%3C/svg%3E") no-repeat right center;
    background-size: cover; pointer-events: none;
}

.profile-avatar-box { position: relative; flex-shrink: 0; }
.profile-avatar-box img, .profile-avatar-box .avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,0.15); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.online-badge { position: absolute; bottom: 5px; right: 5px; color: #10b981; background: #ffffff; border-radius: 50%; padding: 2px 4px; font-size: 13px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

.profile-main-info { flex-grow: 1; z-index: 1; }
.profile-username { margin: 0 0 5px 0; font-size: 26px !important; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.profile-rank { color: #94a3b8; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 15px; }

.profile-inactive-reason { margin-top: 15px; color: #fca5a5; background: rgba(239, 68, 68, 0.1); padding: 10px 15px; border-radius: 6px; border: 1px solid rgba(239, 68, 68, 0.2); display: inline-flex; align-items: center; gap: 10px; }
.badge-inactive { background: #ef4444; color: white; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.badge-inactive .icon, .badge-inactive i { margin: 0; }
.inactive-text { font-size: 13px; line-height: 1.4; }

.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-profile { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #ffffff !important; text-decoration: none !important; transition: background-color 0.2s ease; }
.btn-pm { background-color: #3b82f6; border: 1px solid #2563eb; }
.btn-pm:hover { background-color: #1d4ed8; }
.btn-edit { background-color: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); }
.btn-edit:hover { background-color: rgba(255,255,255,0.25); }

.profile-admin-actions { display: flex; gap: 8px; margin-left: auto; }
.btn-admin-small { font-size: 11px; color: #fca5a5; background: rgba(239, 68, 68, 0.15); padding: 4px 8px; border-radius: 4px; text-decoration: none; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-admin-small:hover { background: rgba(239, 68, 68, 0.3); color: #ffffff; }

/* Grille Profil */
.modern-profile-grid { display: flex; gap: 20px; align-items: flex-start; }
.modern-profile-col { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.modern-profile-card { background-color: #ffffff; border-radius: 10px; padding: 25px; box-shadow: 0 4px 15px rgba(17, 48, 74, 0.05); border: 1px solid #e2e8f0; }
.modern-profile-card h3 { color: #11304a; font-size: 15px; font-weight: 800; text-transform: uppercase; margin: 0 0 20px 0; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9; display: flex; align-items: center; gap: 10px; }
.modern-profile-card h3 .icon { color: #3b82f6; }

.profile-details-list { list-style: none; padding: 0; margin: 0; }
.profile-details-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed #e2e8f0; font-size: 14px; align-items: center; }
.profile-details-list li:last-child { border-bottom: none; padding-bottom: 0; }
.profile-details-list strong { color: #64748b; font-weight: 600; width: 45%; }
.profile-details-list span { color: #0f172a; font-weight: 600; text-align: right; width: 55%; word-break: break-word;}

.contact-link { display: inline-flex; align-items: center; gap: 6px; background: #f8fafc; padding: 6px 12px; border-radius: 20px; color: #3b82f6 !important; font-weight: 600; text-decoration: none !important; border: 1px solid #e2e8f0; transition: background-color 0.2s ease, color 0.2s ease; }
.contact-link:hover { background: #3b82f6; color: #ffffff !important; }

/* Stats Mini Grid */
.stats-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; transition: background-color 0.2s ease; }
.stat-box:hover { background-color: #f1f5f9; }
.stat-icon { font-size: 20px; color: #3b82f6; margin-bottom: 8px; }
.stat-label { font-size: 11px; color: #64748b; text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 0; }
.stat-sub { font-size: 11px; color: #94a3b8; margin-top: 5px; }

.profile-actions-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; }
.btn-profile-light { background: #ffffff; border: 1px solid #cbd5e1; color: #475569 !important; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; }
.btn-profile-light:hover { background: #f1f5f9; color: #0f172a !important; }

.profile-activity { margin-top: 15px; }
.sub-title { font-size: 13px; color: #94a3b8; text-transform: uppercase; font-weight: 800; margin-bottom: 15px; display: flex; align-items: center; gap: 8px;}
.activity-blocks { display: flex; flex-direction: column; gap: 12px; }
.activity-item { background: #f8fafc; border: 1px solid #e2e8f0; padding: 12px 15px; border-radius: 6px; display: flex; flex-direction: column; gap: 4px; }
.activity-label { font-size: 11px; color: #64748b; text-transform: uppercase; font-weight: 700; }
.activity-link { font-size: 14px; font-weight: 700; color: #11304a; text-decoration: none; }
.activity-link:hover { color: #3b82f6; text-decoration: underline; }
.activity-stats { font-size: 12px; color: #94a3b8; }
.activity-none { color: #cbd5e1; }

/* Avertissements */
.profile-warnings { margin-top: 25px; background: #fef2f2; border: 1px solid #fecaca; border-left: 4px solid #ef4444; padding: 15px; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 15px; justify-content: space-between; align-items: center; }
.warning-title { color: #991b1b; font-size: 14px; font-weight: bold; display: flex; align-items: center; }
.warning-badge { background: #ef4444; color: #ffffff; min-width: 24px; height: 24px; border-radius: 12px; font-size: 13px; font-weight: bold; margin-left: 8px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 0 6px; }
.warning-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-warning-small { background: #fee2e2; color: #b91c1c !important; padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; text-decoration: none !important; border: 1px solid #fca5a5; }
.btn-warning-small:hover { background: #fca5a5; color: #7f1d1d !important; }

/* Boutons Zebra (Amis/Ignorés) */
.btn-friend-active { background-color: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399 !important; }
.btn-friend-active:hover { background-color: rgba(16, 185, 129, 0.25); color: #ffffff !important; }
.btn-foe-active { background-color: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24 !important; }
.btn-foe-active:hover { background-color: rgba(245, 158, 11, 0.25); color: #ffffff !important; }
.btn-zebra-add, .btn-zebra-foe { background-color: transparent; border: 1px dashed rgba(255,255,255,0.3); padding: 8px 12px; }
.btn-zebra-add:hover { background-color: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #10b981 !important; }
.btn-zebra-foe:hover { background-color: rgba(239, 68, 68, 0.2); border-color: #ef4444; color: #ef4444 !important; }

@media (max-width: 768px) {
    .modern-profile-grid { flex-direction: column; }
    .modern-profile-header { flex-direction: column; text-align: center; }
    .profile-actions { justify-content: center; }
    .profile-admin-actions { margin-left: 0; width: 100%; justify-content: center; margin-top: 10px; }
    .profile-details-list li { flex-direction: column; align-items: flex-start; gap: 5px; }
    .profile-details-list strong, .profile-details-list span { width: 100%; text-align: left; }
    .stats-mini-grid { grid-template-columns: 1fr; }
    .profile-warnings { justify-content: center; text-align: center; }
    .warning-actions { justify-content: center; width: 100%; }
}

/* ==========================================================================
   6. FOOTER & STATISTIQUES DU BAS
   ========================================================================== */

/* Wrapper du bas de page (Copyright et Liens) */
.modern-footer-wrapper {
    background: linear-gradient(135deg, #11304a 0%, #071929 100%) !important;
    color: #f1f5f9 !important;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.modern-copyright { text-align: center; }

/* Liens du Footer (Confidentialité, etc.) */
.footer-row-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.footer-row-links .footer-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
    text-decoration: none !important;
}
.footer-row-links .footer-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}
.footer-row-links .footer-link .icon { color: #ffffff !important; }

/* Lien Panneau d'Administration */
.footer-row-links .acp-link {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #fca5a5 !important;
}
.footer-row-links .acp-link:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    color: #ffffff !important;
}

/* Crédits phpBB */
.footer-credits {
    font-size: 12px !important;
    color: #94a3b8 !important;
    line-height: 1.6;
    margin-top: 15px;
}
.footer-credits a {
    color: #60a5fa !important;
    font-weight: 600;
    transition: color 0.2s ease;
}
.footer-credits a:hover {
    color: #93c5fd !important;
    text-decoration: underline !important;
}

/* Navbar Inférieure (Lien Équipe, Supprimer Cookies...) */
#page-footer .navbar {
    background-color: #ffffff !important;
    border-radius: 8px !important;
    padding: 14px 25px !important;
    margin-bottom: 35px !important;
    box-shadow: 0 4px 15px rgba(17, 48, 74, 0.06) !important;
    border: 1px solid #cbd5e1 !important;
}
#page-footer .navbar a,
#page-footer .navbar .nav-link {
    color: #11304a !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    transition: color 0.2s ease;
}
#page-footer .navbar a:hover {
    color: #225682 !important;
    text-decoration: none !important;
}
#page-footer .navbar .icon {
    color: #64748b !important;
    margin-right: 4px;
}

/* Blocs Statistiques (Qui est en ligne) */
.stat-block {
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.stat-block.online-list {
    margin-top: 50px !important;
    background-color: #e2e8f0;
}
.stat-block.birthday-list {
    background-color: #a2c4e7;
}
.stat-block.statistics {
    background-color: #3928384d;
}

.stat-block h3, .stat-block h3 a {
    color: #11304a !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    margin-top: 0;
    text-decoration: none;
}
.stat-block p {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}


/* ==========================================================================
   8. SECURITE PHPBB / COMPATIBILITE LEGERE
   ========================================================================== */

/* Les couleurs de groupes phpBB doivent rester prioritaires. */
.username-coloured,
a.username-coloured,
.postprofile .username-coloured,
.postprofile a.username-coloured {
    font-weight: 800;
}

/* Les médias dans les messages ne doivent pas dépasser du bloc. */
.postbody .content img,
.postbody .content video,
.postbody .content iframe {
    max-width: 100%;
    height: auto;
}

/* Focus clavier visible, sans modifier le rendu normal. */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d41142;
    outline-offset: 2px;
}

/* ==========================================================================
   9. CORRECTION ET HARMONISATION DES MENUS VIEWTOPIC
   ========================================================================== */

/*
   Correction V10 :
   - toutes les petites flèches / pointes des menus déroulants sont supprimées ;
   - pas de double flèche possible ;
   - comportement PC conservé ;
   - corrections mobiles anti-débordement conservées ;
   - padding compact conservé.
*/

.action-bar {
    overflow: visible !important;
}

.action-bar .dropdown {
    z-index: 1000 !important;
}

.action-bar .dropdown-contents {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    box-shadow: 0 8px 22px rgba(17, 48, 74, 0.14) !important;
    padding: 4px 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
	margin-left: 0 !important;
}

/* Suppression volontaire de toutes les pointes/flèches des menus */
.action-bar .dropdown .pointer,
.action-bar .dropdown .pointer-inner,
.action-bar .dropdown::before,
.action-bar .dropdown::after,
.jumpbox .dropdown .pointer,
.jumpbox .dropdown .pointer-inner,
.jumpbox .dropdown::before,
.jumpbox .dropdown::after,
.dropdown .pointer,
.dropdown .pointer-inner {
    display: none !important;
    visibility: hidden !important;
    content: none !important;
    border: 0 !important;
}

/* Menu "Outils du sujet" : largeur maîtrisée + léger décalage à droite */
.dropdown-container.topic-tools {
    position: relative !important;
}

.dropdown-container.topic-tools > .dropdown,
.dropdown-container.topic-tools .dropdown {
    transform: translateX(42px) !important;
    margin-top: 8px !important;
}

.dropdown-container.topic-tools .dropdown-contents {
    width: 330px !important;
    min-width: 330px !important;
    max-width: calc(100vw - 24px) !important;
}

/* Liens compacts */
.action-bar .dropdown-contents li > a,
.action-bar .dropdown-contents a.button {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 35px !important;
    padding: 7px 12px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #004b8d !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    white-space: nowrap;
}

.action-bar .dropdown-contents li > a:hover,
.action-bar .dropdown-contents a.button:hover {
    background: #f1f5f9 !important;
    color: #d41142 !important;
    text-decoration: none !important;
}

.action-bar .dropdown-contents li > a .icon,
.action-bar .dropdown-contents li > a i,
.action-bar .dropdown-contents a.button .icon,
.action-bar .dropdown-contents a.button i {
    width: 22px !important;
    min-width: 22px !important;
    text-align: center !important;
    color: inherit !important;
    font-size: 15px !important;
    margin: 0 !important;
}

/* Texte des boutons icônes via title */
.action-bar .dropdown-contents a.button span {
    display: none !important;
}

.action-bar .dropdown-contents a.button::after {
    content: attr(title);
    display: inline-block !important;
    margin-left: 0 !important;
}

.action-bar .dropdown-contents li {
    border-bottom: 1px solid #e2e8f0 !important;
}

.action-bar .dropdown-contents li:last-child {
    border-bottom: 0 !important;
}

/* Menu Afficher / Trier / Ordre : compact, sans repositionnement PC */
.action-bar .dropdown-contents fieldset,
.action-bar .dropdown-contents .display-options,
.action-bar .dropdown-contents form {
    padding: 10px 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.action-bar .dropdown-contents label {
    display: inline-block !important;
    margin: 0 6px 6px 0 !important;
    color: #11304a !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.action-bar .dropdown-contents select,
.action-bar .dropdown-contents input.inputbox {
    min-height: 30px !important;
    padding: 3px 6px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
}

.action-bar .dropdown-contents input.button1,
.action-bar .dropdown-contents input.button2,
.action-bar .dropdown-contents .button1,
.action-bar .dropdown-contents .button2 {
    margin-top: 6px !important;
    padding: 6px 12px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
}

/* Quickmod */
.quickmod .dropdown-contents {
    min-width: 310px !important;
    max-width: calc(100vw - 24px) !important;
}

.quickmod .dropdown-contents li > a {
    min-height: 34px !important;
}

/* ==========================================================================
   MOBILE : anti-débordement uniquement
   ========================================================================== */
@media (max-width: 768px) {
    .action-bar {
        position: relative !important;
        overflow: visible !important;
    }

    .action-bar .dropdown-container {
        position: static !important;
    }

    .action-bar .dropdown-container > .dropdown,
    .action-bar .dropdown-container .dropdown {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: calc(100% + 6px) !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .action-bar .dropdown-container.dropdown-up > .dropdown,
    .action-bar .dropdown-up.dropdown-container > .dropdown {
        top: calc(100% + 6px) !important;
        bottom: auto !important;
    }

    .action-bar .dropdown-contents,
    .action-bar .dropdown-container.topic-tools .dropdown-contents,
    .quickmod .dropdown-contents {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
    }

    .action-bar .dropdown-contents li > a,
    .action-bar .dropdown-contents a.button {
        white-space: normal !important;
        font-size: 13px !important;
        min-height: 33px !important;
        padding: 7px 10px !important;
    }

    /* Jumpbox / "Aller à" : ancré à droite et déployé vers la gauche */
    .jumpbox.dropdown-container,
    .jumpbox .dropdown-container {
        position: relative !important;
        overflow: visible !important;
    }

    .jumpbox.dropdown-container > .dropdown,
    .jumpbox .dropdown-container > .dropdown {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        width: min(360px, calc(100vw - 24px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
        transform: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        z-index: 1000 !important;
    }

    .jumpbox .dropdown-contents,
    .jumpbox.dropdown-container .dropdown-contents {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
    }

    .jumpbox .dropdown-contents li > a,
    .jumpbox.dropdown-container .dropdown-contents li > a {
        white-space: normal !important;
        min-height: 33px !important;
        padding: 7px 10px !important;
        box-sizing: border-box !important;
    }
}


/* ==========================================================================
   10. CORRECTION PROFIL MEMBRE - LARGEUR DES CARTES INFO / CONTACT
   ========================================================================== */

/*
   Correction :
   - Les cartes "Informations" et "Contacter" prenaient une largeur réduite
     sur certains affichages, surtout quand la grille passe en colonne.
   - Cause : .modern-profile-grid gardait align-items:flex-start.
     En flex-direction:column, cela empêche les colonnes de s'étirer sur toute
     la largeur disponible.
   - Cette correction force la grille, les colonnes et les cartes à occuper
     100% de la largeur disponible, sans casser le mode PC.
*/

.modern-profile-grid,
.modern-profile-col,
.modern-profile-card {
    box-sizing: border-box !important;
}

.modern-profile-grid {
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
}

.modern-profile-col {
    min-width: 0 !important;
}

.modern-profile-card {
    width: 100% !important;
    max-width: none !important;
}

/* Sécurité anti-débordement dans les blocs Informations / Contact */
.profile-details-list,
.profile-details-list li,
.profile-details-list strong,
.profile-details-list span {
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.profile-details-list span {
    overflow-wrap: anywhere !important;
}

/* Le sélecteur de groupe ne doit pas élargir ou casser la carte */
.profile-details-list select {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Mode tablette/mobile : chaque bloc prend toute la largeur, comme les stats */
@media (max-width: 768px) {
    .modern-profile-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .modern-profile-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .modern-profile-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .profile-details-list li {
        width: 100% !important;
    }
}

/* Petit mobile : champs plus propres */
@media (max-width: 520px) {
    .modern-profile-card {
        padding: 18px !important;
    }

    .profile-details-list li {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .profile-details-list strong,
    .profile-details-list span {
        width: 100% !important;
        text-align: left !important;
    }

    .profile-details-list select {
        width: 100% !important;
        margin-bottom: 6px !important;
    }

    .profile-details-list input.button2,
    .profile-details-list .button2 {
        width: auto !important;
    }
}


/* ==========================================================================
   11. STATISTIQUES GLOBALES DETAILLEES - BAS DE PAGE
   ========================================================================== */

/*
   Améliore le bloc natif phpBB "Statistiques" sans changer sa couleur.
   Le JS ajouté dans overall_footer transforme la ligne native en cartes.
*/

.stat-block.statistics {
    background-color: #3928384d !important;
    border-color: rgba(57, 40, 56, .18) !important;
    overflow: hidden !important;
}

.stat-block.statistics .mmfr-native-statline {
    display: none !important;
}

.mmfr-global-stats-enhanced,
.mmfr-global-stats-enhanced * {
    box-sizing: border-box;
}

.mmfr-global-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.mmfr-global-stat-card {
    min-width: 0;
    padding: 14px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(255, 255, 255, .38);
    box-shadow: 0 3px 10px rgba(17, 48, 74, .05);
}

.mmfr-global-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: rgba(17, 48, 74, .10);
    color: #11304a;
    font-size: 16px;
}

.mmfr-global-stat-card strong {
    display: block;
    color: #11304a;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.mmfr-global-stat-card strong a {
    color: #000034 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

.mmfr-global-stat-card strong a:hover {
    color: #d41142 !important;
    text-decoration: underline !important;
}

.mmfr-global-stat-card span {
    display: block;
    margin-top: 4px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.mmfr-global-stat-card em {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11.5px;
    font-style: normal;
    font-weight: 600;
}

.mmfr-global-stats-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mmfr-global-stats-details span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.mmfr-global-stats-details strong {
    color: #11304a;
    font-weight: 900;
}

@media (max-width: 900px) {
    .mmfr-global-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .stat-block.statistics {
        padding: 18px !important;
    }

    .mmfr-global-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mmfr-global-stat-card {
        padding: 12px;
    }

    .mmfr-global-stat-card strong {
        font-size: 20px;
    }

    .mmfr-global-stats-details {
        flex-direction: column;
        align-items: stretch;
    }

    .mmfr-global-stats-details span {
        justify-content: space-between;
        border-radius: 8px;
    }
}


/* ==========================================================================
   11.b AJUSTEMENT ICÔNES DES CARTES STATISTIQUES
   ========================================================================== */

/* Icônes plus grandes et parfaitement centrées dans leur cercle */
.mmfr-global-stat-card .mmfr-global-stat-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    margin: 0 0 10px 0 !important;
    border-radius: 999px !important;
    font-size: 24px !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.mmfr-global-stat-card .mmfr-global-stat-icon > * {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

@media (max-width: 520px) {
    .mmfr-global-stat-card .mmfr-global-stat-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
    }
}


/* ==========================================================================
   12. BLOC QUI EST EN LIGNE + ANNIVERSAIRES ENHANCES
   ========================================================================== */

.mmfr-panel-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.mmfr-panel-stat-card {
    min-width: 0;
    padding: 14px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(255, 255, 255, .38);
    box-shadow: 0 3px 10px rgba(17, 48, 74, .05);
}

.mmfr-panel-stat-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    margin: 0 0 10px 0 !important;
    border-radius: 999px !important;
    background: rgba(17, 48, 74, .10);
    color: #11304a;
    font-size: 24px !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.mmfr-panel-stat-card strong {
    display: block;
    color: #11304a;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.mmfr-panel-stat-card strong a {
    color: #000034 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

.mmfr-panel-stat-card span {
    display: block;
    margin-top: 4px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mmfr-panel-stat-card em {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11.5px;
    font-style: normal;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.mmfr-panel-detail-card {
    margin-top: 12px;
    padding: 14px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .30);
    border: 1px solid rgba(255, 255, 255, .32);
}

.mmfr-panel-detail-card h4 {
    margin: 0 0 8px;
    color: #11304a;
    font-size: 15px;
    font-weight: 900;
}

.mmfr-panel-detail-content {
    color: #334155;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.mmfr-panel-detail-content a {
    font-weight: 700;
}

.mmfr-birthday-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .30);
    border: 1px solid rgba(255, 255, 255, .32);
}

.mmfr-birthday-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 999px;
    background: rgba(17, 48, 74, .10);
    color: #11304a;
    font-size: 24px;
    line-height: 1;
}

.mmfr-birthday-empty strong {
    display: block;
    color: #11304a;
    font-size: 18px;
    line-height: 1.2;
}

.mmfr-birthday-empty span {
    display: block;
    margin-top: 4px;
    color: #4b5563;
}

@media (max-width: 900px) {
    .mmfr-panel-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .mmfr-panel-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mmfr-panel-stat-card,
    .mmfr-panel-detail-card,
    .mmfr-birthday-empty {
        padding: 12px;
    }

    .mmfr-panel-stat-icon,
    .mmfr-birthday-empty-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
    }

    .mmfr-panel-stat-card strong {
        font-size: 20px;
    }

    .mmfr-birthday-empty {
        align-items: flex-start;
    }
}


/* ==========================================================================
   13. AJUSTEMENTS COMPACTS BLOCS FOOTER - V4
   ========================================================================== */

/* Typo plus proche du reste du forum + cartes moins imposantes */
.mmfr-panel-stats-grid,
.mmfr-global-stats-grid {
    gap: 10px !important;
    margin-top: 12px !important;
}

.mmfr-panel-stat-card,
.mmfr-global-stat-card {
    padding: 12px 13px !important;
    border-radius: 9px !important;
}

.mmfr-panel-stat-icon,
.mmfr-global-stat-icon,
.mmfr-birthday-empty-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    margin: 0 0 8px 0 !important;
    border-radius: 999px !important;
    font-size: 19px !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 !important;
    overflow: visible !important;
}

.mmfr-panel-stat-card strong,
.mmfr-global-stat-card strong {
    font-size: 18px !important;
    line-height: 1.15 !important;
}

.mmfr-panel-stat-card span,
.mmfr-global-stat-card span {
    font-size: 12.5px !important;
    line-height: 1.25 !important;
}

.mmfr-panel-stat-card em,
.mmfr-global-stat-card em {
    font-size: 11px !important;
    line-height: 1.25 !important;
}

.mmfr-panel-detail-card {
    padding: 11px 13px !important;
    border-radius: 9px !important;
}

.mmfr-panel-detail-card h4 {
    font-size: 13px !important;
    margin-bottom: 6px !important;
}

.mmfr-panel-detail-content {
    font-size: 13px !important;
}

.mmfr-birthday-empty {
    padding: 12px 13px !important;
    border-radius: 9px !important;
    gap: 10px !important;
}

.mmfr-birthday-empty strong {
    font-size: 15px !important;
    line-height: 1.2 !important;
}

.mmfr-birthday-empty span {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
}

/* Mobile : on garde compact et propre */
@media (max-width: 900px) {
    .mmfr-panel-stats-grid,
    .mmfr-global-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .mmfr-panel-stats-grid,
    .mmfr-global-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .mmfr-panel-stat-card,
    .mmfr-global-stat-card,
    .mmfr-panel-detail-card,
    .mmfr-birthday-empty {
        padding: 10px 11px !important;
    }

    .mmfr-panel-stat-icon,
    .mmfr-global-stat-icon,
    .mmfr-birthday-empty-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        font-size: 17px !important;
        margin-bottom: 7px !important;
    }

    .mmfr-panel-stat-card strong,
    .mmfr-global-stat-card strong {
        font-size: 17px !important;
    }

    .mmfr-panel-stat-card span,
    .mmfr-global-stat-card span,
    .mmfr-birthday-empty span {
        font-size: 12px !important;
    }

    .mmfr-birthday-empty {
        align-items: flex-start !important;
    }
}

/* V5 : centrage emoji anniversaires / panneaux */
.mmfr-birthday-empty-icon,
.mmfr-panel-stat-icon,
.mmfr-global-stat-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}


/* V6 : affichage date record complète */
.mmfr-panel-stat-card em {
    overflow-wrap: anywhere !important;
}


/* V7 : sur les pages internes, on masque le record et on équilibre les 3 cartes */
.mmfr-panel-stats-grid.mmfr-panel-stats-grid-three {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
}

@media (max-width: 900px) {
    .mmfr-panel-stats-grid.mmfr-panel-stats-grid-three {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .mmfr-panel-stats-grid.mmfr-panel-stats-grid-three {
        grid-template-columns: 1fr !important;
    }
}


/* ==========================================================================
   14. FOOTER PANELS V8 - ANTI DOUBLON + LEGENDES EN BULLES
   ========================================================================== */

.mmfr-connected-members {
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.mmfr-group-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mmfr-group-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    border: 1px solid rgba(255, 255, 255, .45);
    color: #11304a;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.2;
}

.mmfr-group-pill a {
    font-weight: 900 !important;
    text-decoration: none !important;
}

.mmfr-group-pill a:hover {
    text-decoration: underline !important;
}

@media (max-width: 520px) {
    .mmfr-group-pills {
        gap: 6px;
    }

    .mmfr-group-pill {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
        font-size: 12px;
    }
}


/* ==========================================================================
   15. FOOTER PANELS V10 - RETOUR V8 + LEGENDE INDEX
   ========================================================================== */

.mmfr-connected-members {
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.mmfr-group-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mmfr-group-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    border: 1px solid rgba(255, 255, 255, .45);
    color: #11304a;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.2;
}

.mmfr-group-pill a {
    font-weight: 900 !important;
    text-decoration: none !important;
}

.mmfr-group-pill a:hover {
    text-decoration: underline !important;
}

@media (max-width: 520px) {
    .mmfr-group-pills {
        gap: 6px;
    }

    .mmfr-group-pill {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
        font-size: 12px;
    }
}
/* ==========================================================================
   16. ACCUEIL / NAVBAR - RACCOURCIS + ACTIVITE FINAL PROPRE
   ========================================================================== */

/*
   Version finale nettoyée :
   - un seul bloc Activity final ;
   - Activity = icône seule sur PC et mobile ;
   - fond bleu très foncé ;
   - pas de border ;
   - pas de zoom, pas d'animation ;
   - sur mobile, PCM/PCA passent en icônes seules pour garder une seule ligne ;
   - les deux raccourcis d'accueil gardent leur sous-texte.
*/

/* Raccourcis principaux de l'accueil */
.visual-nav-item .v-nav-content {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon sub";
    align-items: center !important;
    justify-content: center !important;
    column-gap: 12px !important;
    row-gap: 3px !important;
    text-align: left !important;
    padding: 13px 18px !important;
    min-height: 54px !important;
    box-sizing: border-box !important;
}

.visual-nav-item .v-nav-icon {
    grid-area: icon;
    align-self: center !important;
}

.visual-nav-item .v-nav-text {
    grid-area: title;
    white-space: normal !important;
    line-height: 1.15 !important;
}

.visual-nav-item .v-nav-subtext {
    grid-area: sub;
    display: block;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: 0;
    max-width: 520px;
}

/* Bouton Activity dans la navbar */
#nav-main .mmfr-nav-activity-right {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 30px !important;
    line-height: 30px !important;
    margin: 0 3px !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

#nav-main .mmfr-nav-activity-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: #071929 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    cursor: pointer;
}

#nav-main .mmfr-nav-activity-btn:hover,
#nav-main .mmfr-nav-activity-btn:focus {
    background: #11304a !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

#nav-main .mmfr-nav-activity-label {
    display: none !important;
}

#nav-main .mmfr-nav-activity-btn .icon,
#nav-main .mmfr-nav-activity-btn i,
#nav-main .mmfr-nav-activity-btn svg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    color: #ffffff !important;
    fill: #ffffff !important;
    font-size: 15px !important;
    line-height: 15px !important;
}

/* Badge notification Activity */
#nav-main .mmfr-nav-activity-btn .activity-badge {
    display: none;
    position: absolute;
    top: 0px !important;
    right: 0px !important;
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    padding: 0;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-sizing: content-box;
    box-shadow: 0 2px 4px rgba(0,0,0,.22);
}

/* Mobile : une seule ligne en masquant les textes PCM / PCA */
@media (max-width: 700px) {
    .visual-nav-inner {
        gap: 10px;
    }

    .visual-nav-item {
        min-width: 0;
    }

    .visual-nav-item .v-nav-content {
        padding: 12px 14px !important;
        min-height: 58px !important;
        column-gap: 10px !important;
    }

    .visual-nav-item .v-nav-subtext {
        font-size: 11.5px;
    }

    #nav-main .mmfr-admin-shortcut > a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    #nav-main .mmfr-admin-shortcut > a span,
    #nav-main .mmfr-admin-shortcut > a .responsive-hide,
    #nav-main .mmfr-admin-shortcut > a .nav-text {
        display: none !important;
    }

    #nav-main .mmfr-admin-shortcut > a .icon,
    #nav-main .mmfr-admin-shortcut > a i,
    #nav-main .mmfr-admin-shortcut > a svg {
        margin: 0 !important;
        font-size: 15px !important;
    }

    #nav-main .mmfr-nav-activity-right {
        margin: 0 2px !important;
    }

    #nav-main > li.rightside {
        margin-left: 2px !important;
        margin-right: 2px !important;
    }

    #nav-main #username_logged_in {
        margin-left: 3px !important;
    }
}

/* Très petit mobile : gain léger de place sans réduire trop la zone tactile */
@media (max-width: 430px) {
    #nav-main .mmfr-admin-shortcut > a,
    #nav-main .mmfr-nav-activity-btn {
        width: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }

    #nav-main > li.rightside {
        margin-left: 1px !important;
        margin-right: 1px !important;
    }
}

/* ==========================================================================
   17. PROFIL - STATISTIQUES FUSIONNEES
   ========================================================================== */

/*
   Fusion des statistiques natives phpBB + MMFR UserStats.
   Objectif : un seul bloc complet, moderne, sans doublon visuel.
*/

.mmfr-merged-stats-card {
    background: #e8eff5 !important;
    border: 1px solid #d1dce8 !important;
    box-shadow: 0 4px 15px rgba(17, 48, 74, .06) !important;
}

.mmfr-merged-stats-card h3 {
    color: #11304a !important;
}

.mmfr-merged-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mmfr-merged-stat {
    min-width: 0;
    padding: 14px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(203, 213, 225, .85);
    box-shadow: 0 2px 8px rgba(17, 48, 74, .035);
    text-align: center;
    overflow-wrap: anywhere;
}

.mmfr-merged-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    border-radius: 999px;
    background: #11304a;
    color: #ffffff;
}

.mmfr-merged-icon .icon,
.mmfr-merged-icon i,
.mmfr-merged-icon svg {
    color: #ffffff !important;
    fill: #ffffff !important;
    margin: 0 !important;
}

.mmfr-merged-stat span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.mmfr-merged-stat strong {
    display: block;
    margin-top: 5px;
    color: #071929;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}

.mmfr-merged-stat em {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.25;
}

.mmfr-merged-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.mmfr-merged-activity {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, .28);
}

.mmfr-merged-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}

.mmfr-merged-row span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.mmfr-merged-row strong,
.mmfr-merged-row a {
    min-width: 0;
    color: #11304a !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.mmfr-merged-row a:hover {
    color: #d41142 !important;
    text-decoration: underline;
}

.mmfr-merged-row em {
    color: #94a3b8;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.mmfr-merged-private {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .28);
}

.mmfr-merged-private-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(17, 48, 74, .10), rgba(70, 136, 206, .10));
    border: 1px solid rgba(17, 48, 74, .14);
}

.mmfr-merged-private-head > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #11304a;
    color: #ffffff;
}

.mmfr-merged-private-head strong {
    display: block;
    color: #11304a;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.mmfr-merged-private-head em {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.mmfr-merged-note {
    margin: 12px 0;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
}

.mmfr-merged-private-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mmfr-merged-warnings {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
}

@media (max-width: 900px) {
    .mmfr-merged-stats-grid,
    .mmfr-merged-private-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mmfr-merged-row {
        grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    .mmfr-merged-stats-grid,
    .mmfr-merged-private-grid {
        grid-template-columns: 1fr;
    }

    .mmfr-merged-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .mmfr-merged-actions {
        flex-direction: column;
    }

    .mmfr-merged-actions .btn-profile-light {
        width: 100%;
        justify-content: center;
    }

    .mmfr-merged-private-head {
        align-items: flex-start;
    }
}


   ========================================================================== */

/*
   Ajout d'un bloc badges dans la colonne gauche pour équilibrer la page profil
   après la fusion des statistiques.
*/

.mmfr-profile-badges-card {
    background: #ffffff !important;
}

.mmfr-profile-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.mmfr-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #dbe4ee;
    color: #11304a;
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1.15;
    white-space: nowrap;
}

.mmfr-profile-badge .icon,
.mmfr-profile-badge i,
.mmfr-profile-badge svg {
    color: #225682 !important;
    fill: #225682 !important;
    margin: 0 !important;
    font-size: 13px !important;
}

.mmfr-badge-online {
    background: rgba(16, 185, 129, .10);
    border-color: rgba(16, 185, 129, .30);
    color: #047857;
}

.mmfr-badge-online .icon,
.mmfr-badge-online i,
.mmfr-badge-online svg {
    color: #10b981 !important;
    fill: #10b981 !important;
}

.mmfr-badge-map {
    background: rgba(70, 136, 206, .10);
    border-color: rgba(70, 136, 206, .25);
}

.mmfr-badge-gpx {
    background: rgba(34, 86, 130, .10);
    border-color: rgba(34, 86, 130, .25);
}

.mmfr-badge-warning {
    background: rgba(239, 68, 68, .10);
    border-color: rgba(239, 68, 68, .30);
    color: #b91c1c;
}

.mmfr-badge-warning .icon,
.mmfr-badge-warning i,
.mmfr-badge-warning svg {
    color: #ef4444 !important;
    fill: #ef4444 !important;
}

.mmfr-profile-badges-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px dashed #dbe4ee;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .mmfr-profile-badges-grid {
        gap: 8px;
    }

    .mmfr-profile-badge {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        text-align: center;
        white-space: normal;
    }
}

@media (max-width: 460px) {
    .mmfr-profile-badge {
        flex-basis: 100%;
    }
}

/* ==========================================================================
   18. PROFIL - BADGES DE PALIERS A GAUCHE
   ========================================================================== */

/*
   Vrais badges de paliers, inspirés du rendu viewtopic :
   Garage, Messages, Présence, Cartographe, Traceur.
*/

.mmfr-profile-badges-card {
    background: #e8eff5 !important;
    border: 1px solid #d1dce8 !important;
}

.mmfr-tier-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.mmfr-tier-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(17, 48, 74, .10);
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(17, 48, 74, .045);
}

.mmfr-tier-badge:hover {
    text-decoration: none !important;
    filter: brightness(.98);
}

.mmfr-tier-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
}

.mmfr-tier-icon .icon,
.mmfr-tier-icon i,
.mmfr-tier-icon svg {
    margin: 0 !important;
    color: #ffffff !important;
    fill: #ffffff !important;
    font-size: 18px !important;
}

.mmfr-tier-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mmfr-tier-text strong {
    color: #11304a;
    font-size: 13.5px;
    font-weight: 950;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.mmfr-tier-text em {
    margin-top: 4px;
    color: #071929;
    font-size: 14px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.2;
}

/* Couleurs de badges */
.mmfr-tier-garage {
    background: #e8eff5;
}
.mmfr-tier-garage .mmfr-tier-icon {
    background: #071929;
}

.mmfr-tier-messages {
    background: #efe4ff;
}
.mmfr-tier-messages .mmfr-tier-icon {
    background: #6d28d9;
}
.mmfr-tier-messages .mmfr-tier-text strong {
    color: #5b21b6;
}

.mmfr-tier-presence {
    background: #ffe3ee;
}
.mmfr-tier-presence .mmfr-tier-icon {
    background: #be185d;
}
.mmfr-tier-presence .mmfr-tier-text strong {
    color: #be185d;
}

.mmfr-tier-map {
    background: #e0fbff;
}
.mmfr-tier-map .mmfr-tier-icon {
    background: #0891b2;
}
.mmfr-tier-map .mmfr-tier-text strong {
    color: #0e7490;
}

.mmfr-tier-gpx {
    background: #e7f9ef;
}
.mmfr-tier-gpx .mmfr-tier-icon {
    background: #16a34a;
}
.mmfr-tier-gpx .mmfr-tier-text strong {
    color: #15803d;
}

.mmfr-profile-badges-note {
    margin: 14px auto 0;
    max-width: 360px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .mmfr-tier-badges,
    .mmfr-profile-badges-note {
        max-width: none;
    }
}

/* ==========================================================================
   MMFR - Dernier message carte forum V6
   Statut intelligent : 0-7 jours Actif, 8-30 jours Récent, +30 jours Calme.
   ========================================================================== */

.mf-lastpost.mmfr-lastpost-card-v6 {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 136px !important;
    max-height: none !important;
    padding: 18px 22px 40px 22px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border-top: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}

.mmfr-lastpost-card-v6 .mmfr-lp-main,
.mmfr-lastpost-card-v6 .mmfr-lp-readmore,
.mmfr-lastpost-card-v6 .mmfr-lp-unapproved {
    position: relative;
    z-index: 1;
}

.mmfr-lastpost-card-v6 .mmfr-lp-main {
    min-width: 0;
    width: 100%;
    padding-right: 0;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start;
}

.mmfr-lastpost-card-v6 .mmfr-lp-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
    margin-bottom: 14px;
}

.mmfr-lastpost-card-v6 .mmfr-lp-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e8eff5;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 22px;
    text-transform: uppercase;
    letter-spacing: .35px;
    white-space: nowrap;
}

.mmfr-lastpost-card-v6 .mmfr-lp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    padding: 0 11px;
    border-radius: 999px;
    background: #eef2f6;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 22px;
    text-transform: uppercase;
    letter-spacing: .2px;
    white-space: nowrap;
}

.mmfr-lastpost-card-v6 .mmfr-lp-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 7px;
}

/* 0 à 7 jours */
.mmfr-lastpost-card-v6.status-active .mmfr-lp-status {
    background: #ecfdf5;
    color: #047857;
}

/* 8 à 30 jours */
.mmfr-lastpost-card-v6.status-recent .mmfr-lp-status {
    background: #eff6ff;
    color: #225682;
}

/* + de 30 jours */
.mmfr-lastpost-card-v6.status-calm .mmfr-lp-status {
    background: #eef2f6;
    color: #64748b;
}

.mmfr-lastpost-card-v6 .mmfr-lp-status.is-empty {
    background: #eef2f6;
    color: #94a3b8;
}

.mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 8px;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    color: #11304a !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.32 !important;
    text-decoration: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    -webkit-line-clamp: initial !important;
    -webkit-box-orient: initial !important;
}

.mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title span {
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
}

.mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title .icon,
.mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title i,
.mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title svg {
    flex: 0 0 auto;
    color: #11304a !important;
    fill: #11304a !important;
    margin: 2px 0 0 0 !important;
}

.mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title:hover {
    color: #d41142 !important;
    text-decoration: underline !important;
}

.mmfr-lastpost-card-v6 .mmfr-lp-title-empty {
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.mmfr-lastpost-card-v6 .mf-lp-author.mmfr-lp-authorline {
    display: flex !important;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    margin-top: 8px !important;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.3;
    overflow: visible;
    white-space: normal;
}

.mmfr-lastpost-card-v6 .mmfr-lp-by {
    color: #64748b;
    flex: 0 0 auto;
}

.mmfr-lastpost-card-v6 .mmfr-lp-author-name {
    min-width: 0;
    overflow: visible;
    text-overflow: initial;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mmfr-lastpost-card-v6 .mmfr-lp-author-name a,
.mmfr-lastpost-card-v6 .mmfr-lp-author-name strong {
    font-weight: 900 !important;
    text-decoration: none !important;
}

.mmfr-lastpost-card-v6 .mf-lp-time.mmfr-lp-time {
    display: block;
    color: #94a3b8 !important;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.35;
    margin: 6px 0 0 0 !important;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
}

.mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore {
    position: absolute !important;
    right: 22px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    min-width: 0;
    height: 24px;
    padding: 0 10px !important;
    border-radius: 999px;
    background: #e8eff5;
    border: 1px solid #d6e0ea;
    color: #11304a !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    letter-spacing: .2px;
    white-space: nowrap;
    box-shadow: none !important;
    opacity: .78;
}

.mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore span {
    display: inline-flex;
    align-items: center;
    height: 24px;
    line-height: 24px;
}

.mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore:hover {
    background: #dbe6ef;
    border-color: #c5d3df;
    color: #d41142 !important;
    text-decoration: none !important;
    opacity: 1;
}

.mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore .icon,
.mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore i,
.mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore svg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 10px !important;
    height: 10px !important;
    color: currentColor !important;
    fill: currentColor !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.mmfr-lastpost-card-v6 .mmfr-lp-unapproved {
    position: absolute !important;
    top: 10px;
    right: 12px;
    z-index: 3;
}

@media (max-width: 700px) {
    .mf-lastpost.mmfr-lastpost-card-v6 {
        min-height: 136px !important;
        padding: 14px 14px 38px 14px !important;
    }

    .mmfr-lastpost-card-v6 .mmfr-lp-head {
        gap: 6px;
        margin-bottom: 12px;
    }

    .mmfr-lastpost-card-v6 .mmfr-lp-label {
        min-height: 20px;
        padding: 0 7px;
        font-size: 10px;
        line-height: 20px;
    }

    .mmfr-lastpost-card-v6 .mmfr-lp-status {
        font-size: 11.5px;
    }

    .mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title {
        font-size: 13px !important;
    }

    .mmfr-lastpost-card-v6 .mf-lp-title.mmfr-lp-title span {
        -webkit-line-clamp: 3;
    }

    .mmfr-lastpost-card-v6 .mf-lp-author.mmfr-lp-authorline {
        margin-top: 7px !important;
        font-size: 12px;
    }

    .mmfr-lastpost-card-v6 .mf-lp-time.mmfr-lp-time {
        font-size: 11.5px !important;
    }

    .mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore {
        right: 14px;
        bottom: 10px;
        height: 23px;
        padding: 0 9px !important;
        font-size: 9.5px !important;
    }

    .mmfr-lastpost-card-v6 .mf-lp-readmore.mmfr-lp-readmore span {
        height: 23px;
        line-height: 23px;
    }
}

/* ==========================================================================
   MMFR - Cartes avec sous-forums plus larges
   Restaure le span desktop des forums contenant des sous-forums.
   ========================================================================== */

@media (min-width: 769px) {
    .modern-forum-grid > .modern-forum-card:has(.forum-subs) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .modern-forum-grid > .modern-forum-card:has(.forum-subs) {
        grid-column: span 1;
    }
}
