/**
 * TMngO - Base Styles
 * Version: 1.0
 * Date: 11 février 2026
 * 
 * Styles de base : layout, containers, dropdown, footer
 * Les boutons sont maintenant dans buttons.css
 */

/* ========================================
   RESET & BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, Oxygen, Cantarell, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   MAIN CONTENT & LAYOUT
   ======================================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Container */
.container {
    width: calc(100% - 1rem);
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.content-zone {
    width: 100%;
}

.content-section {
    width: 100%;
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 400px;
    margin: 2rem auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-container.compact {
    padding: 1.5rem;
}

/* ========================================
   FOOTER
   ======================================== */

.tm-footer {
    background: linear-gradient(135deg, #4c7cedff 0%, #84b3edff 100%);
    color: white;
    text-align: center;
    padding: 0.5rem;
    margin-top: auto;
}

.tm-footer-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   HEADER MENU LAYOUT
   ======================================== */

.tm-center-menu {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.tm-user-menu {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

/* ========================================
   DROPDOWN MENU
   ======================================== */

.tm-dropdown-container {
    position: relative;
}

.tm-dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 0.2rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.tm-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.25rem;
}

.tm-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tm-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.75rem;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    margin: 0.25rem;
}

.tm-dropdown-item:hover {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
}

.tm-dropdown-item:first-child {
    margin-top: 0.5rem;
}

.tm-dropdown-item:last-child {
    margin-bottom: 0.5rem;
}

.tm-dropdown-username {
    display: block;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.25rem;
    cursor: default;
    user-select: none;
    background: rgba(74, 144, 226, 0.05);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 768px) {
    .tm-center-menu {
        gap: 0.3rem;
    }

    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .login-container.compact {
        padding: 1rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem 0.25rem;
    }

    .login-container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .login-container.compact {
        padding: 0.75rem;
    }

    .login-logo img {
        width: 60px;
    }

    .login-header h2 {
        font-size: 1.25rem;
    }
}
