/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Content Styles */
.content {
    text-align: center;
    padding: 40px 25px;
    margin: 25px auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    border: 1px solid #e0e0e0;
    position: relative;
    animation: slideInUp 0.6s ease-out;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 20px;
    text-decoration: none;
}

p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* User Info Section */
.user-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.online-indicator {
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    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; }
}

.user-info strong {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.role-badge {
    margin-left: 12px;
    padding: 6px 15px;
    background: #6c757d;
    color: white;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Role background gradients (support both capitalized and lowercase class names) */
.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 { background: linear-gradient(135deg, #495057, #343a40); }

.logout-link {
    color: #dc3545;
    text-decoration: none;
    margin-left: 15px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
}

/* Back Button */
.back-btn {
    display: inline-block;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    margin: 20px auto;
    margin-bottom: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
}

.back-btn:hover {
    background: linear-gradient(135deg, #5a6268, #343a40);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Button Styles */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2575fc, #1a5ed8);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.button:hover {
    background: linear-gradient(135deg, #1a5ed8, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Highlighted Section */
.highlight {
    background: #f0f8ff;
    border-left: 5px solid #2575fc;
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
    text-align: left;
}

.center-text {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 20px;
    color: #666;
}

/* Welcome Animation */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 30px 20px;
        margin: 15px;
        border-radius: 8px;
    }

    h1 {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

    h2 {
        font-size: 1.3rem;
    }

    p {
        font-size: 1rem;
        margin-top: 15px;
    }

    .user-info {
        padding: 15px;
        margin-bottom: 25px;
    }

    .online-indicator {
        width: 10px;
        height: 10px;
        margin-right: 8px;
    }

    .role-badge {
        margin-left: 8px;
        padding: 4px 12px;
        font-size: 0.8em;
    }

    .back-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .button-container {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 25px 15px;
        margin: 10px;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    h2 {
        font-size: 1.1rem;
    }

    p {
        font-size: 0.95rem;
    }

    .user-info {
        padding: 12px;
        text-align: center;
    }

    .user-info strong {
        font-size: 1rem;
        display: block;
        margin-bottom: 8px;
    }

    .role-badge {
        margin-left: 0;
        margin-top: 8px;
        display: inline-block;
    }

    .logout-link {
        margin-left: 0;
        margin-top: 10px;
        display: block;
    }

    .back-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .button {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .highlight {
        padding: 15px 20px;
        margin: 20px 0;
    }
}

@media (max-width: 320px) {
    .content {
        padding: 20px 12px;
        margin: 8px;
    }

    h1 {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }

    h2 {
        font-size: 1rem;
    }

    p {
        font-size: 0.9rem;
    }

    .button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .content,
    .online-indicator {
        animation: none;
    }

    .button,
    .back-btn {
        transition: none;
    }
}

/* Focus States for Accessibility */
.button:focus,
.back-btn:focus,
.logout-link:focus {
    outline: 2px solid #2575fc;
    outline-offset: 2px;
}