@charset "UTF-8";

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* --- COULEURS THÈME VIOLET --- */
:root {
    --primary-color: #7c3aed;
    --primary-color-light: #8b5cf6;
    --primary-color-dark: #6d28d9;
    --primary-color-shadow: rgba(124, 58, 237, 0.4);
    --primary-color-shadow-light: rgba(124, 58, 237, 0.2);
    --primary-color-border: rgba(124, 58, 237, 0.2);
    --primary-color-bg: rgba(124, 58, 237, 0.1);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.logo-container {
    text-align: center;
}

.logo-text {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light), #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-light), #c4b5fd);
    border-radius: 10px;
    animation: loading 1s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Company Screen */
.company-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.company-container {
    text-align: center;
}

.company-name {
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.company-loading-bar {
    width: 400px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

.company-loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-light), #c4b5fd);
    border-radius: 10px;
    animation: loading 1.2s ease-in-out forwards;
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    background: radial-gradient(circle at 35% 35%, #2a2a2a, #0a0a0a, #000);
    overflow: hidden;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.65);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fff;
}

.signup-btn {
    padding: 0.8rem 1.4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px var(--primary-color-shadow);
    transition: all 0.25s ease;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(124, 58, 237, 0.6);
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 3rem 4rem;
    gap: 3rem;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-subtitle {
    color: #b0b0b0;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.hero-features {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    position: relative; 
    margin: 0 auto 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

.feature-icon svg {
    stroke: var(--primary-color-light);
    width: 40px; 
    height: 40px;
}

.feature p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.cta-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--primary-color-shadow);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(109, 40, 217, 0.6);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- iPhone 17 Pro Mockup - VIOLET --- */
.iphone-mockup {
    width: 320px;
    height: 650px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9, #5b21aa);
    border-radius: 55px;
    padding: 12px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px var(--primary-color-shadow-light),
        inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    position: relative;
    border: 3px solid #5b21aa;
}

.iphone-mockup::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    border-radius: 45px;
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000);
    filter: blur(25px);
    opacity: 0.35;
}

.iphone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 12px;
}

.iphone-camera-module {
    position: absolute;
    top: 40px;
    right: 20px;
    width: 80px;
    height: 80px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 20px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.camera-lens {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 35% 35%, #2a2a2a, #0a0a0a, #000);
    border-radius: 50%;
    border: 2.5px solid #000;
    position: relative;
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.8),
        inset 0 1px 3px rgba(139, 92, 246, 0.3);
}

.camera-lens::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000);
    border-radius: 50%;
    border: 1px solid #0a0a0a;
}

.camera-lens::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.5), transparent);
    border-radius: 50%;
}

.camera-1 { grid-column: 1; grid-row: 1; }
.camera-2 { grid-column: 2; grid-row: 1; }
.camera-3 { grid-column: span 2; grid-row: 2; justify-self: center; width: 26px; height: 26px; }

.flash {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, #ddd6fe, #8b5cf6, #7c3aed);
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 10px;
    border: 2px solid #5b21aa;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 45px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.screen-content {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.5), transparent);
    border-radius: 35px;
    position: relative;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #0f0f0f;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
}

.modal h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.8rem;
}

.modal h2:hover {
    color: var(--primary-color-light);
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-group {
    display: block;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #a0a0a0;
}

#authForm input {
    padding: 1rem;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

#authForm input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color-shadow-light);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.auth-message {
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-color-light);
    min-height: 1.2em;
}

.submit-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-color-shadow);
}

/* Chat App */
.chat-app {
    display: flex;
    height: 100vh;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sidebar {
    width: 280px;
    background: #0a0a0a;
    border-right: 2px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--primary-color-border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.user-info {
    font-size: 0.9rem;
    color: #a0a0a0;
}

.logout-btn {
    margin-top: 0.4rem;
    padding: 0.65rem 0.9rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.45);
}

.logout-btn:active {
    transform: translateY(0);
}

/* User Search */
.user-search-container {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--primary-color-border);
}

#userSearchInput {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
}

#userSearchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#userSearchBtn {
    padding: 0.5rem;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channels-list {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

.dm-channel-btn {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.dm-channel-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px var(--primary-color-shadow);
}

.dm-channel-btn.active {
    background: var(--primary-color-bg);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px var(--primary-color-shadow-light);
}

.dm-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1f1f1f, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.dm-avatar-system {
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
}

.dm-meta {
    text-align: left;
}

.dm-name {
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.dm-sub {
    font-size: 0.85rem;
    color: #888;
}

/* Main Chat */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000);
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    background: #0a0a0a;
}

.chat-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.messages-container {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--primary-color-bg);
    border-left: 3px solid var(--primary-color);
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom:0.5rem;
}.message-username {
font-weight: 700;
color: var(--primary-color);
}.message-time {
font-size: 0.75rem;
color: #666;
}.message-text {
color: #e0e0e0;
line-height: 1.5;
}.message-input-container {
padding: 1.5rem;
background: #0a0a0a;
border-top: 2px solid var(--primary-color);
display: flex;
gap: 1rem;
}#messageInput {
flex: 1;
padding: 1rem;
background: #1a1a1a;
border: 2px solid #333;
border-radius: 25px;
color: #fff;
font-size: 1rem;
transition: all 0.3s ease;
}#messageInput:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 20px var(--primary-color-shadow-light);
}#messageInput:disabled {
background: #111;
cursor: not-allowed;
}.send-btn {
width: 50px;
height: 50px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
border: none;
color: #fff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
box-shadow: 0 4px 15px var(--primary-color-shadow);
}.send-btn:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(109, 40, 217, 0.6);
}.send-btn:active {
transform: scale(0.95);
}.send-btn:disabled {
background: #333;
cursor: not-allowed;
box-shadow: none;
transform: none;
}/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
}::-webkit-scrollbar-track {
background: #0a0a0a;
}::-webkit-scrollbar-thumb {
background: var(--primary-color);
border-radius: 10px;
}::-webkit-scrollbar-thumb:hover {
background: var(--primary-color-light);
}