/* === POPPINS LOCAL === */
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins/poppins-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins/poppins-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins/poppins-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins/poppins-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* === BACKGROUND AGORA === */
:root { --cpd-color-theme-bg: #F5F2EE !important; }

/* Police Poppins via token Compound */
:root {
    --cpd-font-family-sans: 'Poppins', sans-serif !important;
    --font-family: 'Poppins', sans-serif !important;
}
.mx_MatrixChat {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* Fond #F5F2EE sur toute la zone droite (parent de mx_HomePage) */
.mx_MatrixChat > :not(.mx_LeftPanel):not(.mx_SpacePanel):not(.mx_ResizeHandle):not(.mx_LeftPanel_outerWrapper) {
    background-color: #F5F2EE !important;
}

.mx_WelcomePage_footer, .mx_AuthFooter, [class="footer"] {
    display: none !important;
}
.mx_CompleteSecurityBody, .mx_SetupEncryptionBody {
    display: none !important;
}
.mx_SpacePanel, .mx_SpacePanel.newUi {
    background-color: #4A0050 !important;
    border-right: 1px solid #4A0050 !important;
}
.mx_SpacePanel svg, .mx_SpacePanel .mx_SpaceButton_icon svg,
.mx_SpacePanel .mx_SpacePanel_toggleCollapse svg,
.mx_ThreadsActivityCentreButton svg, .mx_QuickSettingsButton svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}
.mx_ThreadsActivityCentreButton, .mx_QuickSettingsButton {
    color: #ffffff !important;
}
.mx_SpacePanel .mx_UserMenu {
    background-color: #4A0050 !important;
    border-bottom-color: rgba(255,255,255,0.15) !important;
}
.mx_SpacePanel .mx_SpaceButton_icon {
    background-color: rgba(255,255,255,0.15) !important;
}
.mx_SpacePanel .mx_SpaceButton_icon svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}
/* Roomlist */
.mx_LeftPanel,
.mx_LeftPanel_wrapper,
.mx_LeftPanel_outerWrapper {
    background-color: #DDD7EF !important;
}
.mx_LeftPanel .mx_RoomTile_title {
    color: #3a4560 !important;
}

/* Timeline fond */
.mx_RoomView,
.mx_RoomView_body,
.mx_RoomView_messagePanel {
    background-color: #F0EEE8 !important;
}

/* Bulles — largeur 60% pour confort visuel (WCAG/Baymard) */
.mx_EventTile[data-layout="bubble"] {
    --maxWidth: 60% !important;
}

/* Bulles envoyées — mauve clair + liseré orange */
.mx_EventTile[data-self="true"] .mx_EventTile_line {
    background-color: #DDD7EF !important;
    border-left: 2px solid #F17E18 !important;
    border-radius: 12px !important;
}

/* Bulles reçues — blanc avec bordure légère */
.mx_EventTile:not([data-self="true"]) .mx_EventTile_line {
    background-color: #ffffff !important;
    border: 0.5px solid #E0DDD8 !important;
    border-radius: 12px !important;
}

/* Composer — bulle blanche avec lisere subtil */
.mx_MessageComposer_wrapper {
    background-color: #ffffff !important;
    border: 1.2px solid #E0DDD8 !important;
    border-radius: 16px !important;
    margin: 8px 16px 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}
.mx_BasicMessageComposer_input {
    color: #1A1A1A !important;
    min-height: 100px !important;
}
.mx_WysiwygComposer, .mx_SendWysiwygComposer {
    color: #1A1A1A !important;
    min-height: 100px !important;
}

.mx_HomePage {
    min-height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #F5F2EE !important;
}
.mx_HomePage iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border: none !important;
}
.mx_EventTile.mx_EventTile_info,
.mx_EventTile[data-layout="group"].mx_EventTile_info {
    display: none !important;
}
.mx_EventTile_info + .mx_DateSeparator,
.mx_DateSeparator:first-child {
    display: none !important;
}
.mx_EventTile_e2eIcon, .mx_E2EIcon,
[class*="e2eIcon"], [class*="E2EIcon"],
.mx_KeyBackupPanel, .mx_DevicesPanel {
    display: none !important;
}

/* Masquer l'option Jitsi du menu d'appel vidéo */
button.mx_RoomHeader_videoCallOption[aria-label="Conférence Jitsi"] {
  display: none !important;
}

/* Largeur zone messages + composer centrée */
.mx_RoomView_body {
    max-width: 860px !important;
    margin: 0 auto !important;
}
.mx_MessageComposer {
    max-width: 860px !important;
    margin: 0 auto !important;
}

/* Masquer onglets Paramètres non essentiels */
.mx_TabbedView_tabLabel[data-testid*="APPEARANCE"],
.mx_TabbedView_tabLabel[data-testid*="PREFERENCE"],
.mx_TabbedView_tabLabel[data-testid*="SIDEBAR"],
.mx_TabbedView_tabLabel[data-testid*="SECURITY"],
.mx_TabbedView_tabLabel[data-testid*="SESSION"],
.mx_TabbedView_tabLabel[data-testid*="LABS"],
.mx_TabbedView_tabLabel[data-testid*="HELP"],
.mx_TabbedView_tabLabel[data-testid*="ENCRYPTION"],
.mx_AppearanceUserSettingsTab_checkboxControlledField,
.mx_EncryptionUserSettingsTab,
.mx_SecurityUserSettingsTab_bulkOptions,
.mx_SidebarUserSettingsTab_checkbox,
.mx_MjolnirUserSettingsTab_listItem,
.mx_HelpUserSettingsTab_accessTokenDetails {
    display: none !important;
}

/* Texte bulles envoyées — prune */
.mx_EventTile_bubble.mx_EventTile_self .mx_EventTile_body,
.mx_EventTile[data-layout=bubble].mx_EventTile_self .mx_EventTile_body {
  color: #4A0050 !important;
}
/* Texte bulles reçues — noir */
.mx_EventTile_bubble:not(.mx_EventTile_self) .mx_EventTile_body,
.mx_EventTile[data-layout=bubble]:not(.mx_EventTile_self) .mx_EventTile_body {
  color: #1A1A1A !important;
}

/* === RESPONSIVE MOBILE — 22/03/2026 === */
@media (max-width: 768px) {
  .mx_SpacePanel { display: none !important; }
  .mx_RightPanel { display: none !important; }

  .mx_LeftPanel {
    min-width: 0 !important;
    width: 160px !important;
    font-size: 11px !important;
  }

  .mx_RoomView {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .mx_EventTile_body {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
  }

  .mx_MessageComposer {
    min-height: 50px !important;
  }
}
