@charset "UTF-8";

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* --- DÉFINITION DES THÈMES DE COULEUR --- */

/* Thème Bleu (Défaut) - Amélioré */
:root,
[data-color-theme="blue"] {
    --primary-color: #0ea5e9;
    --primary-color-light: #38bdf8;
    --primary-color-dark: #0284c7;
    --primary-color-shadow: rgba(14, 165, 233, 0.4);
    --primary-color-shadow-light: rgba(14, 165, 233, 0.2);
    --primary-color-border: rgba(14, 165, 233, 0.15);
    --primary-color-bg: rgba(14, 165, 233, 0.1);
}
[data-theme="dark"][data-color-theme="blue"] {
    --primary-color: #38bdf8;
    --primary-color-light: #7dd3fc;
    --primary-color-dark: #0ea5e9;
    --primary-color-shadow: rgba(56, 189, 248, 0.5);
    --primary-color-shadow-light: rgba(56, 189, 248, 0.3);
    --primary-color-border: rgba(56, 189, 248, 0.2);
    --primary-color-bg: rgba(56, 189, 248, 0.15);
}

/* Thème Violet */
[data-color-theme="purple"] {
    --primary-color: #8b5cf6;
    --primary-color-light: #a78bfa;
    --primary-color-dark: #7c3aed;
    --primary-color-shadow: rgba(139, 92, 246, 0.32);
    --primary-color-shadow-light: rgba(139, 92, 246, 0.16);
    --primary-color-border: rgba(139, 92, 246, 0.1);
    --primary-color-bg: rgba(139, 92, 246, 0.08);
}
[data-theme="dark"][data-color-theme="purple"] {
    --primary-color: #a78bfa;
    --primary-color-light: #c4b5fd;
    --primary-color-dark: #8b5cf6;
    --primary-color-shadow: rgba(139, 92, 246, 0.45);
    --primary-color-shadow-light: rgba(139, 92, 246, 0.24);
    --primary-color-border: rgba(139, 92, 246, 0.12);
    --primary-color-bg: rgba(139, 92, 246, 0.16);
}

/* Thème Vert */
[data-color-theme="green"] {
    --primary-color: #10b981;
    --primary-color-light: #34d399;
    --primary-color-dark: #059669;
    --primary-color-shadow: rgba(16, 185, 129, 0.32);
    --primary-color-shadow-light: rgba(16, 185, 129, 0.16);
    --primary-color-border: rgba(16, 185, 129, 0.1);
    --primary-color-bg: rgba(16, 185, 129, 0.08);
}
[data-theme="dark"][data-color-theme="green"] {
    --primary-color: #34d399;
    --primary-color-light: #6ee7b7;
    --primary-color-dark: #10b981;
    --primary-color-shadow: rgba(16, 185, 129, 0.45);
    --primary-color-shadow-light: rgba(16, 185, 129, 0.24);
    --primary-color-border: rgba(16, 185, 129, 0.12);
    --primary-color-bg: rgba(16, 185, 129, 0.16);
}

/* Thème Rose */
[data-color-theme="pink"] {
    --primary-color: #ec4899;
    --primary-color-light: #f472b6;
    --primary-color-dark: #db2777;
    --primary-color-shadow: rgba(236, 72, 153, 0.32);
    --primary-color-shadow-light: rgba(236, 72, 153, 0.16);
    --primary-color-border: rgba(236, 72, 153, 0.1);
    --primary-color-bg: rgba(236, 72, 153, 0.08);
}
[data-theme="dark"][data-color-theme="pink"] {
    --primary-color: #f472b6;
    --primary-color-light: #f9a8d4;
    --primary-color-dark: #ec4899;
    --primary-color-shadow: rgba(236, 72, 153, 0.45);
    --primary-color-shadow-light: rgba(236, 72, 153, 0.24);
    --primary-color-border: rgba(236, 72, 153, 0.12);
    --primary-color-bg: rgba(236, 72, 153, 0.16);
}


/* --- COULEURS DE BASE (Clair) --- */
:root {
    --bg-main: #f5f7fb;
    --bg-sidebar: #f6f7f8;
    --bg-surface: #ffffff;
    --bg-input: #ffffff;
    --border-subtle: #d1d7db;
    --text-primary: #111827;
    --text-secondary: #55626a;
    --chat-bg: radial-gradient(circle at 18% 18%, var(--primary-color-shadow-light), transparent 32%),
                radial-gradient(circle at 82% 12%, rgba(255, 234, 243, 0.2), transparent 30%),
                linear-gradient(135deg, #fdfcfb 0%, #e8f1ff 45%, #ffeaf3 100%);
    --message-theirs-bg: #ffffff;
    --message-theirs-border: #e0e7ef;
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* --- COULEURS DE BASE (Sombre) --- */
[data-theme="dark"] {
    --bg-main: #0b0f14;
    --bg-sidebar: #0f172a;
    --bg-surface: #0b1220;
    --bg-input: #111827;
    --border-subtle: #1f2937;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --chat-bg: radial-gradient(circle at 18% 18%, var(--primary-color-shadow-light), transparent 32%),
                radial-gradient(circle at 82% 12%, rgba(255, 234, 243, 0.08), transparent 30%),
                linear-gradient(135deg, #0b0f14 0%, #0d1522 45%, #111827 100%);
    --message-theirs-bg: #0f172a;
    --message-theirs-border: #1f2937;
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.28);
}

/* 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 var(--primary-color-shadow);
}

.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 var(--primary-color-shadow);
}

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

/* --- iPhone Mockup - Thème dynamique --- */
.iphone-mockup {
    width: 320px;
    height: 650px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    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 var(--primary-color-dark);
}

.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 var(--primary-color-shadow-light);
}

.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%, var(--primary-color-shadow-light), 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%, var(--primary-color-light), var(--primary-color));
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 10px;
    border: 2px solid var(--primary-color-dark);
    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%, var(--primary-color-shadow-light), 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,
#groupForm 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,
#groupForm 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,
.group-message {
text-align: center;
font-size: 0.9rem;
color: var(--primary-color-light);
min-height: 1.2em;
}
.auth-message.error,
.group-message.error {
color: #ef4444;
}
.auth-message.success,
.group-message.success {
color: #10b981;
}
.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;
background: var(--chat-bg);
color: var(--text-primary);
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.sidebar {
width: 320px;
background: var(--bg-sidebar);
border-right: 1px solid var(--border-subtle);
display: flex;
flex-direction: column;
overflow-y: auto;
}
.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.6rem;
color: var(--primary-color-dark);
margin-bottom: 0.5rem;
}
.user-info {
font-size: 0.9rem;
color: var(--text-secondary);
}
.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(--border-subtle);
}
#userSearchInput {
flex: 1;
padding: 0.5rem 0.75rem;
background: var(--bg-input);
border: 1px solid var(--border-subtle);
border-radius: 10px;
color: var(--text-primary);
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-light), var(--primary-color));
border: none;
border-radius: 10px;
color: #fff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
/* Sidebar Sections */
.sidebar-section {
display: flex;
flex-direction: column;
border-bottom: 1px solid var(--border-subtle);
padding-bottom: 1rem;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1rem 0.5rem;
}
.section-header h3 {
font-size: 0.85rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-secondary);
}
.create-group-btn {
width: 24px;
height: 24px;
border-radius: 6px;
background: var(--primary-color);
color: white;
border: none;
font-size: 1.2rem;
font-weight: bold;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
}
.create-group-btn:hover {
background: var(--primary-color-light);
transform: scale(1.1);
}
.channels-list {
padding: 0 1rem 1rem;
display: flex;
flex-direction: column;
}
.dm-channel-btn,
.group-channel-btn {
width: 100%;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 14px;
padding: 0.75rem 0.9rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.65rem;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: var(--shadow-soft);
}
.dm-channel-btn:hover,
.group-channel-btn:hover {
transform: translateY(-2px);
border-color: var(--primary-color-border);
box-shadow: 0 12px 24px var(--primary-color-shadow-light);
}
.dm-channel-btn.active,
.group-channel-btn.active {
background: var(--primary-color-bg);
border-color: var(--primary-color);
box-shadow: 0 8px 24px var(--primary-color-shadow);
}
/* --- NOUVEAU STYLE AVATAR (Générique) --- */
.dm-avatar {
width: 38px;
height: 38px;
border-radius: 10px;
background-color: var(--border-subtle);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355626a' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
flex-shrink: 0;
}
[data-theme="dark"] .dm-avatar {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.dm-avatar-system {
background: linear-gradient(135deg, var(--primary-color-dark), var(--primary-color));
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33h.09A1.65 1.65 0 0 0 9 4.09V4a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51h.09a1.65 1.65 0 0 0 1.82-.33l.06.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82v.09a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
}
.group-avatar {
background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.dm-meta {
text-align: left;
flex: 1;
}
.dm-name {
font-weight: 700;
margin-bottom: 0.15rem;
}
.dm-sub {
font-size: 0.85rem;
color: var(--text-secondary);
}
/* Main Chat */
.main-chat {
flex: 1;
display: flex;
flex-direction: column;
background: var(--chat-bg);
}
.chat-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border-subtle);
background: var(--bg-sidebar);
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.chat-header h3 {
font-size: 1.5rem;
color: var(--primary-color-dark);
}
.chat-actions {
position: relative;
display: flex;
align-items: center;
}
.icon-btn {
width: 40px;
height: 40px;
border-radius: 10px;
border: 1px solid var(--border-subtle);
background: var(--bg-surface);
color: var(--text-primary);
display: grid;
place-items: center;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 6px 14px var(--shadow-soft);
}
.icon-btn:hover {
transform: translateY(-1px);
border-color: var(--primary-color);
box-shadow: 0 10px 20px var(--primary-color-shadow-light);
}
.messages-container {
flex: 1;
padding: 2rem 2.5rem;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 0.75rem;
background: transparent;
}
.message {
display: flex;
gap: 1rem;
padding: 0.75rem 1rem;
border-radius: 12px;
background: var(--message-theirs-bg);
border: 1px solid var(--message-theirs-border);
animation: messageSlide 0.3s ease-out;
max-width: min(75%, 720px);
}
@keyframes messageSlide {
from { opacity: 0; transform: translateX(-20px); }
to { opacity: 1; transform: translateX(0); }
}
/* --- NOUVEAU STYLE AVATAR (Message) --- */
.message-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
flex-shrink: 0;
background-color: var(--border-subtle);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355626a' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
[data-theme="dark"] .message-avatar {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.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: var(--text-secondary);
}
.message-text {
color: var(--text-primary);
line-height: 1.5;
}
.message--mine {
align-self: flex-end;
flex-direction: row-reverse;
background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
border-color: transparent;
box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .message--mine {
background: linear-gradient(135deg, var(--primary-color-dark), var(--primary-color));
}
.message--mine .message-username {
color: #f8fafc;
}
.message--mine .message-time {
color: #e0f2fe;
}
.message--mine .message-text {
color: #f8fafc;
}
.message--theirs {
align-self: flex-start;
background: var(--message-theirs-bg);
border-color: var(--message-theirs-border);
}
.message-input-container {
padding: 1.25rem 1.5rem;
background: var(--bg-sidebar);
border-top: 1px solid var(--border-subtle);
display: flex;
gap: 0.75rem;
align-items: center;
}
#messageInput {
flex: 1;
padding: 0.9rem 1rem;
background: var(--bg-input);
border: 1px solid var(--border-subtle);
border-radius: 24px;
color: var(--text-primary);
font-size: 1rem;
transition: all 0.3s ease;
}
#messageInput:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 16px var(--primary-color-shadow-light);
}
#messageInput:disabled {
background: var(--bg-sidebar);
cursor: not-allowed;
}
.send-btn {
width: 48px;
height: 48px;
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 14px var(--primary-color-shadow);
flex-shrink: 0;
}
.send-btn:hover {
transform: scale(1.05);
box-shadow: 0 6px 18px var(--primary-color-shadow);
}
.send-btn:active {
transform: scale(0.97);
}
.send-btn:disabled {
background: var(--border-subtle);
cursor: not-allowed;
box-shadow: none;
transform: none;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-sidebar);
}
::-webkit-scrollbar-thumb {
background: var(--primary-color);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--primary-color-light);
}
/* --- NOUVELLE PAGE PARAMÈTRES --- */
.settings-page {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: var(--bg-main);
z-index: 5000;
display: flex;
flex-direction: column;
animation: fadeIn 0.3s ease-out;
}
.settings-container {
width: 100%;
max-width: 800px;
margin: 0 auto;
display: flex;
flex-direction: column;
}
.settings-header {
display: flex;
align-items: center;
padding: 1.5rem;
border-bottom: 1px solid var(--border-subtle);
background: var(--bg-sidebar);
gap: 1rem;
}
.settings-header h1 {
color: var(--text-primary);
}
.back-btn {
display: flex;
align-items: center;
gap: 0.5rem;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
color: var(--text-primary);
padding: 0.6rem 1rem;
border-radius: 10px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.back-btn:hover {
border-color: var(--primary-color);
color: var(--primary-color);
}
.settings-content {
padding: 2rem;
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.settings-section {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.settings-section h2 {
font-size: 1.5rem;
color: var(--text-primary);
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--border-subtle);
}
.settings-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.settings-item label {
font-size: 1.1rem;
font-weight: 500;
color: var(--text-secondary);
}
#themeToggleBtn,
.settings-btn {
padding: 0.6rem 1.2rem;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
color: var(--text-primary);
font-weight: 600;
border-radius: 10px;
cursor: pointer;
transition: all 0.2s ease;
}
#themeToggleBtn:hover,
.settings-btn:hover {
border-color: var(--primary-color);
color: var(--primary-color);
}
.color-swatch-container {
display: flex;
gap: 1rem;
}
.color-swatch {
width: 40px;
height: 40px;
border-radius: 50%;
border: 3px solid var(--bg-surface);
cursor: pointer;
box-shadow: 0 0 0 2px var(--border-subtle);
transition: all 0.2s ease;
}
.color-swatch:hover {
transform: scale(1.1);
}
.color-swatch.active {
box-shadow: 0 0 0 3px var(--primary-color);
}
.avatar-upload-container {
display: flex;
align-items: center;
gap: 1.5rem;
}
.avatar-preview {
width: 100px;
height: 100px;
border-radius: 50%;
background-color: var(--border-subtle);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355626a' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border: 2px solid var(--border-subtle);
}
[data-theme="dark"] .avatar-preview {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
background-size: 60%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.avatar-upload-actions {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.avatar-upload-label {
padding: 0.6rem 1.2rem;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
color: var(--text-primary);
font-weight: 600;
border-radius: 10px;
cursor: pointer;
text-align: center;
}
.avatar-upload-label:hover {
border-color: var(--primary-color);
}
.save-avatar-btn {
padding: 0.6rem 1.2rem;
background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
border: none;
color: #fff;
font-weight: 600;
border-radius: 10px;
cursor: pointer;
}