/* Guild Manager – Frontend CSS
   Thème : sombre/fantasy, compatible OceanWP
   ============================================ */

:root {
    --gm-bg:          #0f1117;
    --gm-bg2:         #181c27;
    --gm-bg3:         #1e2333;
    --gm-border:      #2e3450;
    --gm-gold:        #c9a84c;
    --gm-gold-light:  #e8c97a;
    --gm-blue:        #4a7fc1;
    --gm-blue-light:  #6b9fd8;
    --gm-red:         #c14a4a;
    --gm-green:       #4a8c5c;
    --gm-text:        #d4d8e8;
    --gm-text-muted:  #7a829a;
    --gm-radius:      10px;
    --gm-shadow:      0 4px 24px rgba(0,0,0,.45);
    --gm-font:        'Cinzel', 'Georgia', serif;
    --gm-font-body:   'Nunito', 'Segoe UI', sans-serif;
    --gm-transition:  .2s ease;
}

/* Google fonts import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Nunito:wght@300;400;600;700&display=swap');

/* Base wrapper */
.gm-wrap {
    font-family: var(--gm-font-body);
    color: var(--gm-text);
    line-height: 1.6;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ---- CARDS ---- */
.gm-card {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    box-shadow: var(--gm-shadow);
    padding: 36px 40px;
    max-width: 480px;
    margin: 40px auto;
}
.gm-card-wide { max-width: 760px; }

.gm-card-header {
    text-align: center;
    margin-bottom: 28px;
}
.gm-card-header h2 {
    font-family: var(--gm-font);
    font-size: 1.7rem;
    color: var(--gm-gold);
    margin: 8px 0 0;
    letter-spacing: .04em;
}
.gm-logo-icon { font-size: 2.5rem; display: block; margin-bottom: 4px; }

.gm-card-footer {
    text-align: center;
    margin-top: 20px;
    font-size: .9rem;
    color: var(--gm-text-muted);
}
.gm-sep { margin: 0 8px; opacity: .4; }
.gm-desc {
    color: var(--gm-text-muted);
    text-align: center;
    margin-bottom: 20px;
    font-size: .95rem;
}

/* ---- FORM ELEMENTS ---- */
.gm-form { display: flex; flex-direction: column; gap: 18px; }

.gm-field { display: flex; flex-direction: column; gap: 6px; }
.gm-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--gm-gold);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.gm-field input,
.gm-field select,
.gm-field textarea {
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 6px;
    color: var(--gm-text);
    padding: 10px 14px;
    font-family: var(--gm-font-body);
    font-size: 1rem;
    transition: border-color var(--gm-transition), box-shadow var(--gm-transition);
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.gm-field select {
    padding: 10px 36px 10px 14px;
    height: auto;
    min-height: 44px;
    line-height: 1.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a829a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    overflow: visible;
    white-space: normal;
    text-overflow: ellipsis;
}
.gm-field input:focus,
.gm-field select:focus,
.gm-field textarea:focus {
    outline: none;
    border-color: var(--gm-gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.18);
}
.gm-field select option { background: var(--gm-bg3) !important; color: var(--gm-text) !important; }
.gm-wrap select { color: var(--gm-text) !important; }
.gm-wrap select option { background: var(--gm-bg3) !important; color: var(--gm-text) !important; }
.gm-hint { font-size: .8rem; color: var(--gm-text-muted); }

.gm-password-wrap { position: relative; }
.gm-password-wrap input { padding-right: 44px; }
.gm-toggle-pw {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: 0;
    color: var(--gm-text-muted); transition: color var(--gm-transition);
}
.gm-toggle-pw:hover { color: var(--gm-gold); }

.gm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
.gm-field-full { grid-column: 1 / -1; }

/* ---- BUTTONS ---- */
.gm-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 6px;
    font-family: var(--gm-font-body);
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    border: none;
    text-decoration: none !important;
    transition: all var(--gm-transition);
    white-space: nowrap;
}
.gm-btn-primary {
    background: linear-gradient(135deg, #c9a84c, #a87c30);
    color: #0f1117;
}
.gm-btn-primary:hover { background: linear-gradient(135deg, #e8c97a, #c9a84c); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(201,168,76,.4); }
.gm-btn-secondary {
    background: var(--gm-bg3); color: var(--gm-text);
    border: 1px solid var(--gm-border);
}
.gm-btn-secondary:hover { border-color: var(--gm-gold); color: var(--gm-gold); }
.gm-btn-danger { background: var(--gm-red); color: #fff; }
.gm-btn-danger:hover { background: #d45c5c; }
.gm-btn-full { width: 100%; }
.gm-btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.gm-btn-sm { padding: 6px 14px; font-size: .85rem; }
.gm-btn-xs { padding: 3px 10px; font-size: .78rem; }
.gm-btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.gm-link { color: var(--gm-link, var(--gm-blue-light)); text-decoration: none; transition: color var(--gm-transition); }
.gm-link:hover { color: var(--gm-gold); }
/* Tous les liens dans le wrapper héritent de la couleur de lien */
.gm-wrap a:not(.gm-btn) { color: var(--gm-link, var(--gm-blue-light)); text-decoration: none; transition: color var(--gm-transition); }
.gm-wrap a:not(.gm-btn):hover { color: var(--gm-gold); text-decoration: underline; }

/* ---- ALERTS ---- */
.gm-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    border-left: 4px solid;
}
.gm-alert-success { background: rgba(74,140,92,.15); color: #6ecf8e; border-color: var(--gm-green); }
.gm-alert-error   { background: rgba(193,74,74,.15);  color: #e07a7a; border-color: var(--gm-red); }
.gm-notice {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 16px 20px;
    color: var(--gm-text-muted);
}
.gm-notice a {
    color: var(--gm-link, var(--gm-blue-light)) !important;
    text-decoration: underline;
    font-weight: 700;
}

/* ---- DASHBOARD ---- */
.gm-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 18px 28px;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.gm-dashboard-user { display: flex; align-items: center; gap: 16px; }
.gm-avatar {
    font-size: 2rem;
    width: 52px; height: 52px;
    background: rgba(201,168,76,.1);
    border: 2px solid rgba(201,168,76,.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.gm-dashboard-user strong {
    font-family: var(--gm-font);
    font-size: 1.2rem;
    color: var(--gm-gold);
    display: block;
    letter-spacing: .03em;
    margin-bottom: 4px;
}
.gm-dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Info cards row */
.gm-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.gm-info-card {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 20px 22px;
    text-align: center;
    transition: border-color var(--gm-transition), transform var(--gm-transition);
}
.gm-info-card:hover { border-color: rgba(201,168,76,.5); transform: translateY(-1px); }
.gm-info-card-highlight {
    border-color: rgba(201,168,76,.35);
    background: rgba(201,168,76,.06);
}
.gm-info-icon { font-size: 1.7rem; margin-bottom: 8px; }
.gm-info-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gm-text-muted);
    margin-bottom: 6px;
}
.gm-info-value { font-size: 1.05rem; font-weight: 700; color: var(--gm-text); line-height: 1.3; }
.gm-invite-code {
    font-family: monospace;
    font-size: .95rem;
    color: var(--gm-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: .05em;
    flex-wrap: wrap;
    word-break: break-all;
}
.gm-copy-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; transition: transform var(--gm-transition);
    padding: 2px;
}
.gm-copy-btn:hover { transform: scale(1.25); }

/* Panels */
.gm-dashboard-body { display: flex; flex-direction: column; gap: 20px; }
.gm-panel {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    overflow: hidden;
}
.gm-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--gm-border);
    background: rgba(255,255,255,.025);
}
.gm-panel-header h3 {
    font-family: var(--gm-font);
    color: var(--gm-gold);
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: .03em;
}
.gm-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gm-border);
    background: rgba(255,255,255,.01);
}
.gm-guild-desc { padding: 18px 24px; color: var(--gm-text-muted); line-height: 1.9; font-size: .95rem; }

/* Table */
.gm-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
/* Table columns — with actions */
.gm-table col.col-pseudo  { width: 24%; }
.gm-table col.col-role    { width: 22%; }
.gm-table col.col-login   { width: 18%; }
.gm-table col.col-actions { width: 36%; }

/* Table columns — without actions (members who can't manage) */
.gm-table:not(:has(col.col-actions)) col.col-pseudo { width: 35%; }
.gm-table:not(:has(col.col-actions)) col.col-role   { width: 30%; }
.gm-table:not(:has(col.col-actions)) col.col-login  { width: 35%; }
.gm-table th {
    padding: 11px 20px;
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gm-text-muted);
    border-bottom: 1px solid var(--gm-border);
    background: rgba(255,255,255,.025);
    white-space: nowrap;
}
.gm-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(46,52,80,.5);
    font-size: 1rem;
    vertical-align: middle;
    overflow: hidden;
}
.gm-table tr:last-child td { border-bottom: none; }
.gm-table tr:hover td { background: rgba(201,168,76,.05); }
.gm-you {
    font-size: .72rem;
    color: var(--gm-text-muted);
    margin-left: 8px;
    font-style: italic;
}
.gm-muted { color: var(--gm-text-muted); font-size: .85rem; }

/* Actions cell: role select + kick button, stacked cleanly */
.gm-member-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.gm-role-select {
    width: 100%;
    background: var(--gm-bg3) !important;
    border: 1px solid var(--gm-border);
    color: var(--gm-text) !important;
    border-radius: 6px;
    padding: 10px 36px 10px 12px;
    min-height: 42px;
    height: auto;
    line-height: 1.4;
    font-family: var(--gm-font-body);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a829a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    transition: border-color var(--gm-transition), box-shadow var(--gm-transition);
    overflow: visible;
    white-space: normal;
    text-overflow: ellipsis;
    box-sizing: border-box;
}
.gm-role-select:hover { border-color: var(--gm-gold); }
.gm-role-select:focus  { border-color: var(--gm-gold); outline: none; box-shadow: 0 0 0 3px rgba(201,168,76,.18); }
.gm-role-select option { background: var(--gm-bg3) !important; color: var(--gm-text) !important; }
.gm-role-select option[disabled] { color: var(--gm-text-muted) !important; font-style: italic; }

/* Role badges */
.gm-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
}
.gm-role-chef    { background: rgba(201,168,76,.18); color: var(--gm-gold-light); border: 1px solid rgba(201,168,76,.45); }
.gm-role-adjoint { background: rgba(74,127,193,.18); color: #8ab8e8; border: 1px solid rgba(74,127,193,.45); }
.gm-role-membre  { background: rgba(122,130,154,.13); color: #9aa2b8; border: 1px solid rgba(122,130,154,.35); }
.gm-role-sans_guilde { background: rgba(160,120,80,.13); color: #b8a080; border: 1px solid rgba(160,120,80,.35); }

/* Button size overrides */
.gm-btn-xs {
    padding: 5px 12px;
    font-size: .82rem;
    border-radius: 5px;
    font-weight: 700;
}

/* No guild panel */
.gm-panel-noguild .gm-noguild-content {
    text-align: center;
    padding: 48px 32px;
}
.gm-noguild-icon { font-size: 3rem; display: block; margin-bottom: 12px; opacity: .5; }
.gm-noguild-content h3 { font-family: var(--gm-font); color: var(--gm-gold); margin-bottom: 8px; }
.gm-noguild-content p { color: var(--gm-text-muted); margin-bottom: 24px; }
.gm-noguild-actions .gm-field { flex-direction: row; align-items: stretch; max-width: 380px; margin: 0 auto; }
.gm-noguild-actions .gm-field input { border-radius: 6px 0 0 6px; flex: 1; }
.gm-noguild-actions .gm-btn { border-radius: 0 6px 6px 0; }

/* Guild list */
.gm-guild-list-header { text-align: center; margin-bottom: 32px; }
.gm-guild-list-header h2 { font-family: var(--gm-font); color: var(--gm-gold); font-size: 2rem; }
.gm-subtitle { color: var(--gm-text-muted); font-size: .95rem; }
.gm-guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gm-guild-card {
    background: var(--gm-bg2); border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius); padding: 24px;
    transition: border-color var(--gm-transition), transform var(--gm-transition), box-shadow var(--gm-transition);
}
.gm-guild-card:hover { border-color: var(--gm-gold); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.4); }
.gm-guild-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.gm-guild-icon { font-size: 2rem; }
.gm-guild-card-header h3 { font-family: var(--gm-font); color: var(--gm-gold); margin: 0 0 4px; font-size: 1.05rem; }
.gm-server-tag { font-size: .78rem; color: var(--gm-text-muted); }
.gm-guild-desc { color: var(--gm-text-muted); font-size: .88rem; margin-bottom: 16px; }
.gm-guild-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; border-top: 1px solid var(--gm-border); padding-top: 14px; }
.gm-member-count { font-size: .85rem; color: var(--gm-text-muted); }
.gm-empty { text-align: center; padding: 60px 20px; }
.gm-empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; opacity: .4; }

/* Register guild section */
.gm-guild-section { border: 1px solid var(--gm-border); border-radius: var(--gm-radius); padding: 20px; background: rgba(0,0,0,.2); }
.gm-section-title { font-family: var(--gm-font); color: var(--gm-gold); font-size: 1rem; margin: 0 0 16px; }
.gm-guild-choice { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.gm-choice-card {
    flex: 1; min-width: 120px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 10px;
    background: var(--gm-bg3); border: 2px solid var(--gm-border);
    border-radius: var(--gm-radius); cursor: pointer;
    transition: all var(--gm-transition);
}
.gm-choice-card input[type=radio] { display: none; }
.gm-choice-card:hover { border-color: var(--gm-gold); }
.gm-choice-active { border-color: var(--gm-gold) !important; background: rgba(201,168,76,.08); }
.gm-choice-icon { font-size: 1.6rem; }
.gm-choice-label { font-size: .82rem; font-weight: 700; color: var(--gm-text-muted); text-align: center; }
.gm-choice-active .gm-choice-label { color: var(--gm-gold); }
.gm-guild-panel { animation: gm-fade .2s ease; }

/* Modals */
.gm-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 9998; backdrop-filter: blur(3px);
}
.gm-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    box-shadow: var(--gm-shadow);
    z-index: 9999;
    padding: 36px 40px;
    width: 90%; max-width: 460px;
    max-height: 90vh; overflow-y: auto;
}
.gm-modal h3 { font-family: var(--gm-font); color: var(--gm-gold); margin-bottom: 20px; font-size: 1.15rem; }
.gm-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; color: var(--gm-text-muted);
    font-size: 1rem; cursor: pointer; transition: color var(--gm-transition);
}
.gm-modal-close:hover { color: var(--gm-text); }
.gm-textarea {
    resize: vertical; min-height: 100px;
    background: var(--gm-bg3); border: 1px solid var(--gm-border);
    border-radius: 6px; color: var(--gm-text); padding: 10px 14px;
    font-family: var(--gm-font-body); font-size: .95rem; width: 100%;
    box-sizing: border-box;
}
.gm-textarea:focus { outline: none; border-color: var(--gm-gold); box-shadow: 0 0 0 3px rgba(201,168,76,.18); }

/* Animations */
@keyframes gm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 640px) {
    .gm-card, .gm-modal { padding: 24px 18px; }
    .gm-form-grid { grid-template-columns: 1fr; }
    .gm-dashboard-header { flex-direction: column; align-items: flex-start; }
    .gm-guild-choice { flex-direction: column; }
    .gm-noguild-actions .gm-field { flex-direction: column; }
    .gm-noguild-actions .gm-field input,
    .gm-noguild-actions .gm-btn { border-radius: 6px; }
    .gm-table th:last-child, .gm-table td:last-child { display: none; }
}

/* ---- Guild join separator ---- */
.gm-join-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: var(--gm-text-muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.gm-join-separator::before,
.gm-join-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gm-border);
}

/* ---- No-guild tabs ---- */
.gm-panel-noguild .gm-panel-header {
    border-bottom: 1px solid var(--gm-border);
}
.gm-noguild-content {
    padding: 32px 28px 28px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}
.gm-noguild-content h3 {
    font-family: var(--gm-font);
    color: var(--gm-gold);
    margin-bottom: 8px;
}
.gm-noguild-content > p {
    color: var(--gm-text-muted);
    margin-bottom: 24px;
}
.gm-noguild-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--gm-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}
.gm-tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--gm-bg3);
    border: none;
    color: var(--gm-text-muted);
    font-family: var(--gm-font-body);
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: all var(--gm-transition);
    border-right: 1px solid var(--gm-border);
}
.gm-tab-btn:last-child { border-right: none; }
.gm-tab-btn:hover { background: var(--gm-bg2); color: var(--gm-text); }
.gm-tab-active {
    background: rgba(201,168,76,.12) !important;
    color: var(--gm-gold) !important;
    border-bottom: 2px solid var(--gm-gold);
}
.gm-tab-panel {
    text-align: left;
}
.gm-tab-panel .gm-field { margin-bottom: 14px; }
.gm-tab-panel .gm-btn-full { margin-top: 6px; }

/* ---- PANEL HEADER ACTIONS ---- */
.gm-panel-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- BADGE COUNT ---- */
.gm-badge-count {
    background: rgba(201,168,76,.15);
    color: var(--gm-gold);
    border: 1px solid rgba(201,168,76,.3);
    border-radius: 20px;
    padding: 2px 12px;
    font-size: .78rem;
    font-weight: 700;
}

/* ---- GUILD ITEMS DISPLAY PANEL ---- */
.gm-items-display { padding: 20px 24px; }
.gm-items-group { margin-bottom: 20px; }
.gm-items-group:last-child { margin-bottom: 0; }
.gm-items-group-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gm-text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gm-border);
}
.gm-items-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: .88rem;
    transition: border-color var(--gm-transition);
}
.gm-item-chip:hover { border-color: var(--gm-gold); }
.gm-item-icon { width: 22px; height: 22px; object-fit: contain; border-radius: 3px; }
.gm-item-icon-text { font-size: .9rem; opacity: .7; }
.gm-item-emoji { font-size: 1rem; }
.gm-item-name { color: var(--gm-text); font-weight: 600; }

/* ---- WIDE MODAL ---- */
.gm-modal-wide {
    max-width: 820px;
    width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.gm-modal-wide .gm-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 88vh;
    overflow-y: auto;
}
.gm-modal-wide .gm-modal-content > h3 { flex-shrink: 0; }

/* Params tabs */
.gm-params-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gm-border); margin: 0 -40px 20px; padding: 0 40px; flex-shrink: 0; }
.gm-params-tab {
    background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--gm-text-muted); padding: 10px 18px; cursor: pointer;
    font-family: var(--gm-font-body); font-weight: 700; font-size: .9rem;
    margin-bottom: -1px; transition: all var(--gm-transition);
}
.gm-params-tab:hover { color: var(--gm-text); }
.gm-params-tab-active { color: var(--gm-gold); border-bottom-color: var(--gm-gold); }

/* Params panel scroll */
.gm-params-panel { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.gm-params-desc { color: var(--gm-text-muted); font-size: .88rem; margin-bottom: 16px; flex-shrink: 0; }

/* Items toolbar */
.gm-items-toolbar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 12px; flex-shrink: 0;
}
.gm-items-search-input {
    flex: 1; min-width: 180px;
    background: var(--gm-bg3); border: 1px solid var(--gm-border);
    border-radius: 6px; color: var(--gm-text); padding: 8px 14px;
    font-family: var(--gm-font-body); font-size: .9rem;
}
.gm-items-search-input:focus { border-color: var(--gm-gold); outline: none; box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
#gm-items-type-filter {
    background: var(--gm-bg3); border: 1px solid var(--gm-border);
    border-radius: 6px; color: var(--gm-text); padding: 8px 12px;
    font-family: var(--gm-font-body); font-size: .88rem; cursor: pointer;
}
.gm-items-count-label { font-size: .8rem; color: var(--gm-text-muted); white-space: nowrap; }

/* Items browser area */
.gm-items-browser { flex: 1; overflow-y: auto; min-height: 200px; max-height: 340px; border: 1px solid var(--gm-border); border-radius: 8px; }
.gm-items-loading, .gm-items-empty, .gm-items-error { padding: 32px; text-align: center; color: var(--gm-text-muted); font-size: .9rem; }
.gm-items-error { color: #e07a7a; }

/* Items table inside browser */
.gm-items-table { width: 100%; border-collapse: collapse; }
.gm-items-table th {
    position: sticky; top: 0;
    background: var(--gm-bg3); border-bottom: 1px solid var(--gm-border);
    padding: 9px 12px; text-align: left;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gm-text-muted);
    z-index: 2;
}
.gm-th-check { width: 36px; }
.gm-items-table td { padding: 9px 12px; border-bottom: 1px solid rgba(46,52,80,.4); font-size: .88rem; vertical-align: middle; }
.gm-items-table tr:last-child td { border-bottom: none; }
.gm-item-row { cursor: pointer; transition: background var(--gm-transition); }
.gm-item-row:hover td { background: rgba(201,168,76,.05); }
.gm-item-selected td { background: rgba(201,168,76,.08) !important; }
.gm-item-thumb { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; vertical-align: middle; }
input.gm-item-check { accent-color: var(--gm-gold); width: 16px; height: 16px; cursor: pointer; }

/* Pagination */
.gm-items-pagination { display: flex; gap: 4px; justify-content: center; padding: 12px 0; flex-shrink: 0; flex-wrap: wrap; }
.gm-page-btn {
    background: var(--gm-bg3); border: 1px solid var(--gm-border);
    color: var(--gm-text-muted); border-radius: 5px; padding: 5px 10px;
    font-size: .82rem; cursor: pointer; transition: all var(--gm-transition);
}
.gm-page-btn:hover { border-color: var(--gm-gold); color: var(--gm-gold); }
.gm-page-active { background: rgba(201,168,76,.15); border-color: var(--gm-gold); color: var(--gm-gold); font-weight: 700; }
.gm-page-ellipsis { padding: 5px 4px; color: var(--gm-text-muted); font-size: .82rem; }

/* Save bar */
.gm-items-save-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0 0;
    border-top: 1px solid var(--gm-border);
    margin-top: 4px; flex-shrink: 0;
}
#gm-selected-count { font-size: .88rem; font-weight: 700; color: var(--gm-gold); }

/* Toggle switch for adjoint params */
.gm-toggle-label {
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; font-size: .9rem; color: var(--gm-text);
}
.gm-toggle-label input[type=checkbox] { display: none; }
.gm-toggle-slider {
    position: relative;
    width: 44px; height: 24px;
    background: var(--gm-border);
    border-radius: 12px;
    transition: background var(--gm-transition);
    flex-shrink: 0;
}
.gm-toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform var(--gm-transition);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.gm-toggle-label input:checked ~ .gm-toggle-slider { background: var(--gm-gold); }
.gm-toggle-label input:checked ~ .gm-toggle-slider::after { transform: translateX(20px); }

/* Mobile */
@media (max-width:640px) {
    .gm-modal-wide { max-height: 96vh; width: 100vw; border-radius: 12px 12px 0 0; top:auto; bottom:0; transform:translateX(-50%); }
    .gm-items-browser { max-height: 240px; }
    .gm-params-tabs { margin: 0 -18px 16px; padding: 0 18px; }
}

/* ---- PARAMS ACCESS NOTICE (adjoint) ---- */
.gm-params-access-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(74,127,193,.1);
    border: 1px solid rgba(74,127,193,.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .9rem;
    color: var(--gm-text);
    flex-shrink: 0;
}
.gm-params-access-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.gm-params-access-notice em.gm-text-muted {
    color: var(--gm-text-muted);
    font-style: normal;
    display: block;
    margin-top: 2px;
    font-size: .82rem;
}

/* ===== GUILD MESSAGE MODAL ===== */
.gm-modal-message { max-width: 560px; }

.gm-message-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gm-border);
}
.gm-message-icon { font-size: 2.2rem; flex-shrink: 0; }
.gm-message-header h3 {
    font-family: var(--gm-font);
    color: var(--gm-gold);
    margin: 0 0 4px;
    font-size: 1.15rem;
}
.gm-message-guild {
    font-size: .8rem;
    color: var(--gm-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.gm-message-body {
    background: rgba(0,0,0,.2);
    border: 1px solid var(--gm-border);
    border-radius: 8px;
    padding: 20px 22px;
    color: var(--gm-text);
    font-size: 1.12rem;
    line-height: 1.9;
    min-height: 60px;
    margin-bottom: 18px;
    white-space: pre-wrap;
    word-break: break-word;
}
.gm-message-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gm-text-muted);
    font-style: italic;
}
.gm-message-placeholder { font-size: .9rem; }

.gm-message-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.gm-message-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}

/* 📢 Button pulse on auto-open */
#gm-btn-show-message {
    animation: gm-pulse-btn 2s ease 1s 2;
}
@keyframes gm-pulse-btn {
    0%,100% { box-shadow: none; }
    50%      { box-shadow: 0 0 0 4px rgba(201,168,76,.35); border-color: var(--gm-gold); color: var(--gm-gold); }
}

/* ---- ONLINE / LAST LOGIN ---- */
.gm-table col.col-login { width: 18%; }
.gm-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #5ddb8a;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.gm-last-login {
    font-size: .82rem;
    color: var(--gm-text-muted);
    font-style: italic;
}

/* ===== PENDING MEMBER VIEW ===== */
.gm-panel-pending .gm-pending-content {
    padding: 40px 32px;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}
.gm-pending-icon { font-size: 3rem; margin-bottom: 12px; animation: gm-spin 4s linear infinite; }
@keyframes gm-spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }
.gm-pending-content h3 { font-family: var(--gm-font); color: var(--gm-gold); margin-bottom: 10px; }
.gm-pending-content > p { color: var(--gm-text-muted); margin-bottom: 24px; }
.gm-pending-desc {
    background: rgba(0,0,0,.2);
    border: 1px solid var(--gm-border);
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
    margin-bottom: 24px;
    font-size: .92rem;
    color: var(--gm-text-muted);
    line-height: 1.7;
}
.gm-pending-desc strong { color: var(--gm-text); display: block; margin-bottom: 6px; }

/* ===== BLINKING BUTTON ===== */
.gm-btn-warning {
    background: rgba(201,168,76,.2);
    color: var(--gm-gold);
    border: 1px solid rgba(201,168,76,.5);
}
.gm-btn-warning:hover { background: rgba(201,168,76,.35); }
.gm-btn-blink { animation: gm-blink 1.4s ease-in-out infinite; }
@keyframes gm-blink {
    0%,100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
    50%      { box-shadow: 0 0 0 5px rgba(201,168,76,.4); }
}

/* ===== VALIDATION MODAL ===== */
.gm-modal-validate { max-width: 540px; }
.gm-pending-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 8px;
    margin-bottom: 10px;
    gap: 12px;
    flex-wrap: wrap;
    transition: opacity .3s;
}
.gm-pending-card:last-child { margin-bottom: 0; }
.gm-pending-card-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.gm-pending-avatar { font-size: 1.6rem; flex-shrink: 0; }
.gm-pending-card-info strong { display: block; color: var(--gm-text); font-size: .95rem; }
.gm-pending-since { font-size: .75rem; color: var(--gm-text-muted); }
.gm-pending-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== CHARACTER SELECTION SCREEN ===== */
.gm-charselect-wrap .gm-panel { margin-bottom: 20px; }
.gm-char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.gm-char-card {
    background: var(--gm-bg2);
    border: 2px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: border-color var(--gm-transition), transform var(--gm-transition), box-shadow var(--gm-transition);
    cursor: default;
}
.gm-char-card:hover { border-color: var(--gm-gold); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.gm-char-card-icon { font-size: 2.5rem; }
.gm-char-card-name {
    font-family: var(--gm-font);
    color: var(--gm-gold);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .03em;
}
.gm-char-card-guild { font-size: .82rem; color: var(--gm-text-muted); margin-bottom: 6px; }
.gm-char-card-add {
    border-style: dashed;
    border-color: var(--gm-border);
    background: rgba(255,255,255,.02);
}
.gm-char-card-add:hover { border-color: var(--gm-gold); background: rgba(201,168,76,.04); }
@media (max-width: 640px) {
    .gm-char-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gm-char-card { padding: 18px 14px; }
}

/* ── Discord OAuth ──────────────────────────────────── */
.gm-btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #5865F2;
    color: #fff !important;
    border: none;
    font-weight: 600;
    transition: background .2s, transform .1s;
    text-decoration: none;
}
.gm-btn-discord:hover {
    background: #4752C4;
    color: #fff !important;
    transform: translateY(-1px);
}
.gm-btn-discord:active {
    transform: translateY(0);
}
.gm-discord-section {
    margin-bottom: 4px;
}
.gm-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--gm-text-muted, #888);
    font-size: .85rem;
}
.gm-divider::before,
.gm-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gm-border, #ddd);
}
/* Discord banner (register page — setup mode) */
.gm-discord-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(88,101,242,.1);
    border: 1px solid rgba(88,101,242,.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.gm-discord-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.gm-discord-avatar-placeholder {
    font-size: 2rem;
    line-height: 1;
}
.gm-discord-banner strong {
    display: block;
    font-size: 1rem;
    color: var(--gm-gold, #c0a050);
}
.gm-discord-banner .gm-hint {
    color: var(--gm-text-muted, #888);
    font-size: .82rem;
}
.gm-discord-setup-intro {
    font-size: .9rem;
    color: var(--gm-text-muted, #888);
    margin-bottom: 16px;
    text-align: center;
}

/* ── Discord-only login page ────────────────────────── */
.gm-discord-login-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px 0 16px;
}
.gm-discord-login-intro {
    text-align: center;
    color: var(--gm-text-muted, #888);
    font-size: .95rem;
    margin: 0;
    max-width: 320px;
}
.gm-btn-lg {
    padding: 14px 24px;
    font-size: 1.05rem;
}

/* ── Quicknav ───────────────────────────────────────── */
.gm-quicknav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0 4px;
    margin-bottom: 8px;
}
.gm-quicknav .gm-btn {
    text-decoration: none;
}

/* ── Wishlist items ─────────────────────────────────── */
.gm-item-chip-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gm-item-rarity {
    font-size: .72rem;
    opacity: .75;
}
.gm-rarity-epic3  { border-left: 3px solid #a855f7; padding-left: 8px; }
.gm-rarity-epic2  { border-left: 3px solid #8b5cf6; padding-left: 8px; }
.gm-rarity-epic1  { border-left: 3px solid #6d28d9; padding-left: 8px; }
.gm-rarity-heroic { border-left: 3px solid #f59e0b; padding-left: 8px; }
.gm-rarity-rare   { border-left: 3px solid #3b82f6; padding-left: 8px; }

/* ── Taille de police wishlist (réglable via settings) ── */
#gm-panel-wishlist .gm-item-name {
    font-size: var(--gm-fs-wishlist-item, 0.875rem);
}

/* ── Member Card Modal ──────────────────────────────── */
.gm-card-section {
    margin-bottom: 20px;
}
.gm-card-section-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gm-gold);
    border-bottom: 1px solid var(--gm-border);
    padding-bottom: 6px;
    margin-bottom: 10px;
}
.gm-card-count {
    font-weight: 400;
    color: var(--gm-text-muted);
    font-size: .85em;
}
.gm-card-weapons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.gm-card-weapon-tag {
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: var(--gm-fs-member-card, 0.94rem);
    color: var(--gm-text);
}
.gm-card-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gm-card-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gm-bg3);
    border-radius: 6px;
    padding: 6px 10px;
}
.gm-card-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}
.gm-card-item-icon-ph {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.gm-card-item-name {
    flex: 1;
    font-size: var(--gm-fs-member-card, 0.94rem);
    color: var(--gm-text);
}
.gm-card-item-rar {
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Dashboard (consolidé)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Info cards : 2 colonnes */
    .gm-info-cards { grid-template-columns: 1fr 1fr; gap: 10px; }

    /* Panel header : boutons en dessous du titre */
    .gm-panel-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .gm-panel-header-actions { flex-wrap: wrap; width: 100%; }

    /* Quicknav : défile horizontalement */
    .gm-quicknav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .gm-quicknav .gm-btn { flex-shrink: 0; }

    /* Dashboard header */
    .gm-dashboard-header { flex-direction: column; gap: 12px; }
    .gm-dashboard-actions { flex-wrap: wrap; }

    /* Table membres : scroll horizontal */
    .gm-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .gm-table { min-width: 520px; }
    .gm-table col.col-actions { width: 34%; }
    .gm-role-select { font-size: .8rem; padding: 7px 28px 7px 8px; min-height: 36px; }
    .gm-kick-btn { font-size: .78rem; padding: 5px 8px; }

    /* Member card modal : plein écran sur mobile */
    #gm-modal-member-card .gm-modal-content {
        max-height: 92vh;
        padding: 16px;
    }
    .gm-card-section-title { font-size: .75rem; }
    .gm-card-item { padding: 5px 8px; gap: 8px; }
    .gm-card-item-icon { width: 26px; height: 26px; }
}

@media (max-width: 480px) {
    /* Info cards : 1 colonne */
    .gm-info-cards { grid-template-columns: 1fr; }

    /* Header user */
    .gm-dashboard-user { gap: 8px; }
    .gm-avatar { width: 38px; height: 38px; font-size: 14px; }

    /* Boutons actions : pleine largeur */
    .gm-dashboard-actions .gm-btn { font-size: .8rem; padding: 6px 10px; }

    /* Table : masquer connexion sur très petit écran */
    .gm-table col.col-login,
    .gm-table td:nth-child(3),
    .gm-table th:nth-child(3) { display: none; }

    /* Avec col-login masquée, col-actions est la 3e colonne visible → plus de place */
    .gm-table { min-width: unset; width: 100%; }
    .gm-table col.col-pseudo  { width: 30%; }
    .gm-table col.col-role    { width: 25%; }
    .gm-table col.col-actions { width: 45%; }
    .gm-member-actions { gap: 5px; }
    .gm-role-select { font-size: .75rem; padding: 6px 24px 6px 6px; min-height: 32px; }
    .gm-kick-btn { font-size: .75rem; padding: 4px 7px; }

    /* Modal wide : bottom sheet */
    .gm-modal-wide {
        width: 100vw !important;
        max-height: 94vh !important;
        border-radius: 16px 16px 0 0 !important;
        bottom: 0 !important;
        top: auto !important;
        transform: translateX(-50%) !important;
    }

    /* Weapon tags : retour à la ligne */
    .gm-card-weapons { gap: 6px; }
    .gm-card-weapon-tag { padding: 3px 10px; font-size: .8rem; }
}

/* ═══════════════════════════════════════════════════
   BANDEAU D'ALERTE DÉFILANT
   ═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════
   BANDEAU D'ALERTE DÉFILANT — v2
   ═══════════════════════════════════════════════════ */
.gm-alert-banner {
    display: flex;
    align-items: stretch;
    height: 52px;
    max-height: 52px;
    overflow: hidden;
    position: relative;
    z-index: 200;
    box-shadow: 0 3px 12px rgba(180, 20, 20, .5);
    /* Fond sombre strié animé */
    background: repeating-linear-gradient(
        -45deg,
        #1a0000 0px,
        #1a0000 8px,
        #220000 8px,
        #220000 16px
    );
    background-size: 200% 200%;
    animation: gm-banner-stripes 6s linear infinite;
}

@keyframes gm-banner-stripes {
    0%   { background-position: 0 0; }
    100% { background-position: 200px 0; }
}

/* Étiquette "ALERTE" à gauche */
.gm-alert-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 18px;
    background: #c0392b;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    padding-right: 24px;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
    position: relative;
}

.gm-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: gm-dot-blink 1s step-start infinite;
    box-shadow: 0 0 6px #fff;
}

@keyframes gm-dot-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Zone défilante */
.gm-alert-ticker-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.gm-alert-ticker {
    display: inline-flex;
    align-items: center;
    gap: 80px;
    white-space: nowrap;
    color: #ff8a80;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-shadow: 0 0 12px rgba(255, 80, 60, .6), 0 1px 2px rgba(0,0,0,.6);
    will-change: transform;
}

/* Séparateur entre répétitions */
.gm-alert-ticker span::before {
    content: '⚠';
    margin-right: 60px;
    color: #ff5252;
    font-size: .85em;
    opacity: .8;
}

.gm-alert-ticker span:first-child::before {
    display: none;
}

/* Ligne lumineuse en bas du bandeau */
.gm-alert-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff5252, #ff8a80, #ff5252, transparent);
    background-size: 200% 100%;
    animation: gm-banner-glow 2s linear infinite;
}

@keyframes gm-banner-glow {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════
   BANDEAU D'ALERTE DE GUILDE (orange)
   ═══════════════════════════════════════════════════ */
.gm-guild-alert-banner {
    display: flex;
    align-items: stretch;
    height: 44px;
    max-height: 44px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(200, 100, 0, .4);
    background: repeating-linear-gradient(
        -45deg,
        #1a0e00 0px, #1a0e00 8px,
        #221200 8px, #221200 16px
    );
    background-size: 200% 200%;
    animation: gm-banner-stripes 6s linear infinite;
}

.gm-guild-alert-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #f39c12, #f5c15e, #f39c12, transparent);
    background-size: 200% 100%;
    animation: gm-guild-glow 2s linear infinite;
}

@keyframes gm-guild-glow {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gm-guild-alert-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 22px 0 14px;
    background: #d4830a;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gm-guild-alert-ticker-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.gm-guild-alert-ticker {
    display: inline-flex;
    align-items: center;
    gap: 80px;
    white-space: nowrap;
    color: #f5c15e;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-shadow: 0 0 10px rgba(243, 156, 18, .5), 0 1px 2px rgba(0,0,0,.6);
    will-change: transform;
}

/* Toggle orange pour le bandeau guilde */
.gm-toggle-orange + .gm-toggle-slider,
input:checked + .gm-toggle-orange {
    background: #d4830a !important;
}

/* ── Input nom de guilde dans le modal modifier ── */
#gm-edit-guild-name {
    color: var(--gm-gold) !important;
    font-weight: 700;
}

/* ── Bouton Vote Boss scintillant ── */
@keyframes gm-vote-blink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); border-color: var(--gm-border); }
    50%       { box-shadow: 0 0 10px 3px rgba(201,168,76,.6); border-color: var(--gm-gold); color: var(--gm-gold); }
}
.gm-btn-vote-blink {
    animation: gm-vote-blink 1.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════
   POPUP CHANGEMENT DE RÔLE
   ═══════════════════════════════════════════════════ */
#gm-role-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-role-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
}

.gm-role-popup-card {
    position: relative;
    z-index: 1;
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: 14px;
    padding: 22px 24px;
    width: min(340px, 92vw);
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    animation: gm-popup-in .15s ease;
}

@keyframes gm-popup-in {
    from { transform: scale(.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.gm-role-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.gm-role-popup-pseudo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gm-gold);
}

.gm-role-popup-close {
    background: none;
    border: none;
    color: var(--gm-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s;
}
.gm-role-popup-close:hover { color: var(--gm-text); }

.gm-role-popup-current {
    font-size: .8rem;
    color: var(--gm-text-muted);
    margin: 0 0 16px;
}

.gm-role-popup-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gm-role-choice-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 10px;
    color: var(--gm-text);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    text-align: left;
    width: 100%;
}
.gm-role-choice-btn:hover {
    border-color: var(--gm-gold);
    background: rgba(201,168,76,.08);
    transform: translateX(2px);
}
.gm-role-choice-btn:disabled { opacity: .5; cursor: default; transform: none; }

.gm-role-choice-active {
    border-color: var(--gm-gold) !important;
    background: rgba(201,168,76,.12) !important;
}

.gm-role-choice-chef {
    border-color: rgba(201,168,76,.4);
    background: rgba(201,168,76,.06);
}
.gm-role-choice-chef:hover { border-color: var(--gm-gold); }

.gm-role-choice-icon { font-size: 1.2rem; flex-shrink: 0; }

.gm-role-popup-status {
    margin-top: 12px;
    font-size: .85rem;
    color: var(--gm-text-muted);
    text-align: center;
    min-height: 20px;
}

/* ── Pending status reload notification ───────────────── */
.gm-pending-reload-notif {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gm-bg2);
    border: 1px solid var(--gm-gold);
    color: var(--gm-text);
    padding: 14px 28px;
    border-radius: 8px;
    font-family: var(--gm-font-body);
    font-size: var(--gm-fs-base);
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
    z-index: 9999;
    animation: gm-notif-in .3s ease;
}

@keyframes gm-notif-in {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   BAN SYSTEM
═══════════════════════════════════════════════════════════ */

/* Badge "Banni X j." dans la liste des membres */
.gm-ban-badge {
    display: inline-block;
    background: rgba(198, 40, 40, .15);
    color: var(--gm-red);
    border: 1px solid rgba(198, 40, 40, .4);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    margin-right: 4px;
    vertical-align: middle;
}

/* Modal ban */
.gm-modal-ban {
    max-width: 540px;
    width: 90%;
}

.gm-ban-member-info {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.gm-ban-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid var(--gm-border);
    font-size: var(--gm-fs-sm);
}
.gm-ban-row:last-child { border-bottom: none; }

.gm-ban-label {
    color: var(--gm-text-muted);
    min-width: 90px;
    font-size: 12px;
    flex-shrink: 0;
}
.gm-ban-val {
    color: var(--gm-text);
    font-weight: 600;
    word-break: break-all;
}

/* Section radio dans la modal */
.gm-ban-section {
    margin: 14px 0;
    padding: 12px 14px;
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: 6px;
}

.gm-ban-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: var(--gm-fs-sm);
    color: var(--gm-text);
    transition: color .15s;
}
.gm-ban-radio-label:hover { color: var(--gm-gold); }
.gm-ban-radio-label input[type="radio"] {
    accent-color: var(--gm-gold);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Avertissement ban définitif */
.gm-warn-box {
    background: rgba(198, 40, 40, .08);
    border-left: 3px solid var(--gm-red);
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
    font-size: var(--gm-fs-sm);
    color: var(--gm-red);
    margin-top: 10px;
    line-height: 1.5;
}

/* Tags personnages dans la modal */
.gm-ban-char-tag {
    display: inline-block;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--gm-text);
    margin: 2px 4px 2px 0;
}

/* Loading inline */
.gm-loading-inline {
    color: var(--gm-text-muted);
    font-size: var(--gm-fs-sm);
    padding: 20px 0;
    text-align: center;
    font-style: italic;
}

/* Bouton ban dans la liste */
.gm-btn.gm-ban-btn,
.gm-btn.gm-unban-btn {
    min-width: 62px;
}

/* La modal ban utilise le même overlay #gm-overlay que les autres modals */

/* Message banni sur la page guilde */
.gm-banned-page {
    text-align: center;
    padding: 60px 20px;
}
.gm-banned-page .gm-banned-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}
.gm-banned-page h2 {
    font-family: var(--gm-font);
    color: var(--gm-gold);
    margin-bottom: 10px;
}
.gm-banned-page p {
    color: var(--gm-text-muted);
    font-size: var(--gm-fs-base);
}

/* Alert info dans la modal */
.gm-alert-info {
    background: rgba(21, 101, 192, .12);
    border-left: 3px solid var(--gm-blue);
    color: var(--gm-blue-light);
    display: block;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    font-size: var(--gm-fs-sm);
    margin-bottom: 10px;
}

@media (max-width: 560px) {
    .gm-modal-ban { width: 98%; padding: 20px 14px; }
    .gm-ban-radio-label { font-size: 13px; }
}
