@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
}

.container {
    max-width: 700px;
    margin: 18px auto 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px #b3c6e6;
    padding: 32px 24px;
}

.user-container {
    max-width: 700px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 32px;
}

.user-info {
    text-align: center;
    margin-bottom: 0;
    padding: 18px 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 1.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.online-indicator {
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.role-badge {
    margin-left: 8px;
    padding: 6px 15px;
    background: #6c757d;
    color: white;
    border-radius: 15px;
    font-size: 0.95em;
    font-weight: 600;
    display: inline-block;
}

.role-Entreprise, .role-entreprise { background: linear-gradient(135deg, #dc3545, #c82333); }
.role-Dirigeant, .role-dirigeant { background: linear-gradient(135deg, #fd7e14, #e55a00); }
.role-Lieutenant, .role-lieutenant { background: linear-gradient(135deg, #6f42c1, #5a2d91); }
.role-Responsable, .role-responsable { background: linear-gradient(135deg, #20c997, #198754); }
.role-Vendeur, .role-vendeur { background: linear-gradient(135deg, #0d6efd, #0b5ed7); }
.role-Livreur, .role-livreur { background: linear-gradient(135deg, #198754, #146c43); }
.role-Guetteur, .role-guetteur { background: linear-gradient(135deg, #ffc107, #ffca2c); color: #000; }
.role-Préparateur, .role-préparateur, .role-Preparateur, .role-preparateur { background: linear-gradient(135deg, #6610f2, #520dc2); }
.role-Ravitailleur, .role-ravitailleur { background: linear-gradient(135deg, #d63384, #b02a5b); }
.role-Standartdiste, .role-standartdiste, .role-Standardiste, .role-standardiste { background: linear-gradient(135deg, #495057, #343a40); }
.role-none { background: #6c757d; }

.user-info a {
    color: #d32f2f;
    font-weight: bold;
    margin-left: 10px;
    text-decoration: none;
}

.param-btn {
    display: block;
    width: 100%;
    margin: 18px 0;
    padding: 12px;
    font-size: 1.1em;
    border-radius: 8px;
    border: none;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.param-btn:hover {
    background: #217dbb;
}

.modal {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background:rgba(44,62,80,0.18);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background:#fff;
    border-radius:12px;
    padding:24px 18px;
    box-shadow:0 4px 24px #b3c6e6;
    min-width:220px;
    max-width:90vw;
    max-height:60vh;
    overflow-y:auto;
    text-align:center;
    position:relative;
    transform: translateY(8px) scale(0.985);
    transition: transform 0.18s ease;
}

.modal.is-open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-body {
    margin-top: 16px;
}

.roles-modal-content {
    max-width: 640px;
    width: min(92vw, 640px);
    text-align: left;
}

.roles-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.roles-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f5d75;
    background: #eef3fb;
    border: 1px solid #d9e4f5;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.roles-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.roles-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e6edf7;
    border-radius: 10px;
    background: #fafcff;
}

.roles-username {
    font-weight: 600;
    color: #2f3b52;
    word-break: break-word;
}

.roles-item .role-badge {
    margin-left: 0;
}

.rules-modal-content {
    max-width: 720px;
    width: min(92vw, 720px);
    text-align: left;
}

.rules-content {
    display: grid;
    gap: 12px;
}

.rules-intro {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #2f3b52;
}

.rule-block {
    background: #fafcff;
    border: 1px solid #e6edf7;
    border-radius: 10px;
    padding: 10px 12px;
}

.rule-block h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    color: #2f3b52;
}

.rule-block p {
    margin: 0;
    font-size: 0.92rem;
    color: #495464;
}

.rule-block p + p {
    margin-top: 4px;
}

.modal-close {
    position:absolute;
    top:8px;
    right:12px;
    font-size:1.6em;
    color:#e74c3c;
    cursor:pointer;
    font-weight:bold;
    border: none;
    background: transparent;
    line-height: 1;
}

.modal-open {
    overflow: hidden;
}