/* ========================================
   Rebird - Style Twitter-like
   ======================================== */

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

:root {
    --t2-primary: #1da1f2;
    --t2-secondary: #14171a;
    --t2-bg: #000;
    --t2-bg-secondary: #16181c;
    --t2-bg-hover: #1d1f23;
    --t2-border: #2f3336;
    --t2-text: #e7e9ea;
    --t2-text-secondary: #71767b;
    --t2-danger: #f4212e;
    --t2-success: #00ba7c;
    --t2-link: var(--t2-primary);
}

body.t2-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--t2-app-bg, var(--t2-bg));
    color: var(--t2-text);
    line-height: 1.4;
    min-height: 100vh;
}

a {
    color: var(--t2-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

[hidden] {
    display: none !important;
}

/* Variables de forme par défaut (surchargées par le CSS du thème) */
:root {
    --t2-radius-pill: 9999px;
    --t2-radius-card: 16px;
    --t2-radius-md: 12px;
    --t2-radius-sm: 8px;
    --t2-radius-avatar: 50%;
    --t2-border-width: 1px;
    --t2-icon-stroke: 1.6;
    --t2-on-primary: #ffffff;
    --t2-like: #f91880;
    --t2-shadow-card: none;
    --t2-shadow-btn: none;
}

/* Icônes : jeux pleins et jeux en trait */
svg.t2-ico {
    fill: currentColor;
}

svg.t2-ico-stroke,
svg.t2-ico-stroke * {
    fill: none !important;
    stroke: currentColor;
    stroke-width: var(--t2-icon-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.t2-emoji-icon {
    font-size: 17px;
    line-height: 1;
    filter: grayscale(1) opacity(0.7);
    transition: filter 0.15s, transform 0.15s;
}

.t2-emoji-icon.on,
.t2-tweet-action.like:hover .t2-emoji-icon {
    filter: none;
    transform: scale(1.1);
}

.t2-settings-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========================================
   Layout principal
   ======================================== */

#t2-root {
    display: flex;
    max-width: 1265px;
    margin: 0 auto;
    min-height: 100vh;
}

.t2-sidebar {
    width: 275px;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
}

.t2-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 12px;
}

.t2-main {
    flex: 1;
    max-width: 600px;
    min-width: 0;
    border-left: var(--t2-border-width) solid var(--t2-border);
    border-right: var(--t2-border-width) solid var(--t2-border);
    min-height: 100vh;
}

.t2-sidebar-right {
    width: 350px;
    flex-shrink: 0;
    padding: 0 16px;
}

/* ========================================
   Logo et Navigation
   ======================================== */

.t2-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 4px 0;
    transition: background 0.2s;
}

.t2-logo:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-logo img {
    max-width: 120px;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.t2-nav {
    margin-top: 4px;
}

.t2-nav-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: var(--t2-radius-pill);
    font-size: 20px;
    font-weight: 400;
    color: var(--t2-text);
    transition: background 0.2s;
    margin: 4px 0;
}

.t2-nav-item:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-nav-item.active {
    font-weight: 700;
}

.t2-nav-item svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    margin-right: 20px;
}

/* ========================================
   Boutons
   ======================================== */

/* Les titres et paragraphes du front héritent toujours de la couleur du thème du plugin,
   même si une feuille de style externe (thème WordPress) cible h1/h2/h3/p. */
.t2-app h1,
.t2-app h2,
.t2-app h3,
.t2-app h4 {
    color: inherit;
    font-family: inherit;
}

.t2-btn > svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-right: 6px;
}

.t2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 44px;
    border-radius: var(--t2-radius-pill);
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.t2-btn-primary {
    background: var(--t2-btn-bg, var(--t2-primary));
    color: var(--t2-on-primary);
    box-shadow: var(--t2-shadow-btn);
}

.t2-btn-primary:hover {
    filter: brightness(0.92);
}

.t2-btn-secondary {
    background: transparent;
    color: var(--t2-text);
    border: var(--t2-border-width) solid var(--t2-border);
}

.t2-btn-secondary:hover {
    background: var(--t2-bg-hover);
}

.t2-btn-danger {
    background: var(--t2-danger);
    color: var(--t2-on-primary);
}

.t2-btn-tweet {
    width: 90%;
    margin-top: 16px;
}

.t2-btn-icon {
    display: none;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.t2-btn-small {
    height: 32px;
    padding: 0 16px;
    font-size: 14px;
}

/* ========================================
   User Menu (sidebar)
   ======================================== */

.t2-user-menu {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: var(--t2-radius-pill);
    margin-top: auto;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.t2-user-menu:hover {
    background: var(--t2-bg-hover);
}

.t2-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: var(--t2-radius-avatar);
}

.t2-user-info {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
    flex: 1;
    overflow: hidden;
}

.t2-user-name {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2-user-handle {
    color: var(--t2-text-secondary);
    font-size: 15px;
}

.t2-logout {
    padding: 8px;
    border-radius: 50%;
    color: var(--t2-text-secondary);
    transition: all 0.2s;
}

.t2-logout:hover {
    background: rgba(244, 33, 46, 0.1);
    color: var(--t2-danger);
}

.t2-logout svg {
    fill: currentColor;
}

/* ========================================
   Header page
   ======================================== */

.t2-header {
    position: sticky;
    top: 0;
    background: var(--t2-header-glass, rgba(0, 0, 0, 0.65));
    backdrop-filter: blur(12px);
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    padding: 0 16px;
    z-index: 100;
}

.t2-header-inner {
    display: flex;
    align-items: center;
    height: 53px;
}

.t2-header h1 {
    font-size: 20px;
    font-weight: 700;
}

.t2-header-back {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 16px;
    color: var(--t2-text);
    transition: background 0.2s;
}

.t2-header-back:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-header-back svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========================================
   Composer (formulaire tweet)
   ======================================== */

.t2-composer {
    display: flex;
    padding: 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-composer-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--t2-radius-avatar);
    margin-right: 12px;
}

.t2-composer-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.t2-composer-input {
    font-family: inherit;
    width: 100%;
    min-height: 52px;
    background: transparent;
    border: none;
    color: var(--t2-text);
    font-size: 20px;
    resize: none;
    outline: none;
    padding: 12px 0;
}

.t2-composer-input::placeholder {
    color: var(--t2-text-secondary);
}

.t2-composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: var(--t2-border-width) solid var(--t2-border);
    margin-top: 12px;
}

.t2-composer-tools {
    display: flex;
    gap: 4px;
}

.t2-composer-tool {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--t2-primary);
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: transparent;
}

.t2-composer-tool:hover {
    background: color-mix(in srgb, var(--t2-primary) 10%, transparent);
}

.t2-composer-tool svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.t2-composer-tool input[type="file"] {
    display: none;
}

.t2-composer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t2-char-count {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-char-count.warning {
    color: #ffd400;
}

.t2-char-count.danger {
    color: var(--t2-danger);
}

.t2-composer-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.t2-media-preview-item {
    position: relative;
    border-radius: var(--t2-radius-card);
    overflow: hidden;
}

.t2-media-preview-item img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
}

.t2-media-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.t2-media-preview-remove svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ========================================
   Tweet
   ======================================== */

.t2-tweet {
    display: block;
    padding: 12px 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    transition: background 0.2s;
    cursor: pointer;
}

.t2-tweet-row {
    display: flex;
}

.t2-tweet:hover {
    background: var(--t2-bg-hover);
}

.t2-tweet-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--t2-radius-avatar);
    margin-right: 12px;
    flex-shrink: 0;
}

.t2-tweet-content {
    flex: 1;
    min-width: 0;
}

.t2-tweet-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.t2-tweet-name {
    font-weight: 700;
    color: var(--t2-text);
}

.t2-tweet-name:hover {
    text-decoration: underline;
}

.t2-tweet-handle {
    color: var(--t2-text-secondary);
}

.t2-tweet-time {
    color: var(--t2-text-secondary);
}

.t2-tweet-time {
    white-space: nowrap;
}

.t2-tweet-text {
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
}

.t2-tweet-text a {
    color: var(--t2-link);
}

.t2-tweet-text .t2-mention,
.t2-tweet-text .t2-hashtag {
    color: var(--t2-link);
}

.t2-tweet-text .t2-mention:hover,
.t2-tweet-text .t2-hashtag:hover {
    text-decoration: underline;
}

.t2-tweet-media {
    margin-top: 12px;
    border-radius: var(--t2-radius-card);
    overflow: hidden;
    border: var(--t2-border-width) solid var(--t2-border);
}

.t2-tweet-media img {
    width: 100%;
    height: auto; /* les attributs width/height ne servent qu'au ratio (pas de saut de mise en page) */
    max-height: 500px;
    object-fit: cover;
    display: block;
    background: var(--t2-bg-secondary);
}

.t2-tweet-actions {
    display: flex;
    margin-top: 12px;
    max-width: 425px;
    justify-content: space-between;
}

.t2-tweet-action {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--t2-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: var(--t2-radius-pill);
    transition: all 0.2s;
    font-size: 13px;
}

.t2-tweet-action svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.t2-tweet-action:hover {
    color: var(--t2-primary);
    background: color-mix(in srgb, var(--t2-primary) 10%, transparent);
}

.t2-tweet-action.reply:hover {
    color: var(--t2-primary);
    background: color-mix(in srgb, var(--t2-primary) 10%, transparent);
}

.t2-tweet-action.like:hover {
    color: var(--t2-like);
    background: color-mix(in srgb, var(--t2-like) 10%, transparent);
}

.t2-tweet-action.like.liked {
    color: var(--t2-like);
}

.t2-tweet-action.like.liked svg {
    fill: var(--t2-like);
}

.t2-tweet-action.delete:hover {
    color: var(--t2-danger);
    background: rgba(244, 33, 46, 0.1);
}

/* ========================================
   Tweet detail (page single)
   ======================================== */

.t2-tweet.t2-tweet-detail {
    padding: 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    cursor: default;
}

.t2-tweet.t2-tweet-detail:hover {
    background: transparent;
}

.t2-tweet-header-detail {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t2-tweet-header-detail .t2-tweet-avatar {
    margin-right: 0;
}

.t2-tweet-header-names {
    flex: 1;
    min-width: 0;
}

.t2-tweet-header-names .t2-tweet-name {
    display: inline;
}

.t2-tweet-detail .t2-tweet-header {
    margin-bottom: 12px;
}

.t2-tweet-detail .t2-tweet-avatar {
    width: 48px;
    height: 48px;
}

.t2-tweet-detail .t2-tweet-text {
    font-size: 23px;
    margin-top: 12px;
}

.t2-tweet-detail .t2-tweet-time {
    display: block;
    margin-top: 16px;
    padding-top: 16px;
    border-top: var(--t2-border-width) solid var(--t2-border);
    color: var(--t2-text-secondary);
}

.t2-tweet-detail .t2-tweet-stats {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-tweet-stat {
    font-size: 14px;
    color: var(--t2-text-secondary);
}

.t2-tweet-stat strong {
    color: var(--t2-text);
}

.t2-tweet-detail .t2-tweet-actions {
    padding: 12px 0;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    max-width: none;
    justify-content: space-around;
}

/* ========================================
   Thread / Replies
   ======================================== */

.t2-thread-line {
    position: relative;
}

.t2-thread-line::before {
    content: "";
    position: absolute;
    left: 39px;
    top: 64px;
    bottom: 0;
    width: 2px;
    background: var(--t2-border);
}

.t2-reply-to {
    padding: 12px 16px;
    color: var(--t2-text-secondary);
    font-size: 14px;
}

.t2-reply-to a {
    color: var(--t2-primary);
}

/* ========================================
   Profile
   ======================================== */

.t2-profile-banner {
    height: 200px;
    background: var(--t2-banner-default, var(--t2-bg-secondary));
    background-size: cover;
    background-position: center;
}

.t2-profile-header {
    padding: 12px 16px;
    position: relative;
}

.t2-profile-avatar {
    width: 134px;
    height: 134px;
    border-radius: var(--t2-radius-avatar);
    border: 4px solid var(--t2-bg);
    margin-top: -67px;
    background: var(--t2-bg);
}

.t2-profile-actions {
    position: absolute;
    top: 12px;
    right: 16px;
}

.t2-profile-name {
    font-size: 20px;
    font-weight: 800;
    margin-top: 4px;
}

.t2-profile-handle {
    color: var(--t2-text-secondary);
}

.t2-profile-bio {
    margin-top: 12px;
    white-space: pre-wrap;
}

.t2-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    color: var(--t2-text-secondary);
    font-size: 15px;
}

.t2-profile-meta svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-right: 4px;
    vertical-align: middle;
}

.t2-profile-meta a {
    color: var(--t2-primary);
}

.t2-profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 15px;
}

.t2-profile-stats a {
    color: var(--t2-text-secondary);
}

.t2-profile-stats strong {
    color: var(--t2-text);
}

.t2-profile-tabs {
    display: flex;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    margin-top: 16px;
}

.t2-profile-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    color: var(--t2-text-secondary);
    font-weight: 500;
    position: relative;
    transition: background 0.2s;
}

.t2-profile-tab:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-profile-tab.active {
    color: var(--t2-text);
    font-weight: 700;
}

.t2-profile-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    background: var(--t2-primary);
    border-radius: var(--t2-radius-sm);
}

/* ========================================
   Recherche
   ======================================== */

.t2-search-box {
    position: relative;
    margin-top: 8px;
}

.t2-search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--t2-text-secondary);
}

.t2-search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: var(--t2-bg-secondary);
    border: 1px solid transparent;
    border-radius: var(--t2-radius-pill);
    color: var(--t2-text);
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.t2-search-box input:focus {
    background: transparent;
    border-color: var(--t2-primary);
}

.t2-search-box input::placeholder {
    color: var(--t2-text-secondary);
}

.t2-search-results {
    margin-top: 16px;
}

.t2-search-section {
    margin-bottom: 24px;
}

.t2-search-section h3 {
    padding: 12px 16px;
    font-size: 19px;
    font-weight: 800;
}

.t2-user-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    transition: background 0.2s;
}

.t2-user-item:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-user-item img {
    width: 48px;
    height: 48px;
    border-radius: var(--t2-radius-avatar);
    margin-right: 12px;
}

.t2-user-item-info {
    flex: 1;
}

.t2-user-item-name {
    font-weight: 700;
    color: var(--t2-text);
}

.t2-user-item-handle {
    color: var(--t2-text-secondary);
}

/* ========================================
   Settings
   ======================================== */

.t2-settings {
    max-width: 600px;
}

.t2-settings-banner {
    height: 200px;
    background: var(--t2-bg-secondary);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t2-settings-banner-edit {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.t2-settings-banner-edit:hover {
    background: rgba(0, 0, 0, 0.8);
}

.t2-settings-banner-edit svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.t2-settings-banner-edit input {
    display: none;
}

.t2-settings-avatar-wrapper {
    padding: 0 16px;
    margin-top: -50px;
    margin-bottom: 16px;
}

.t2-settings-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--t2-radius-avatar);
    background: var(--t2-bg-secondary);
    background-size: cover;
    background-position: center;
    border: 4px solid var(--t2-bg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t2-settings-avatar-edit {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.t2-settings-avatar-edit:hover {
    background: rgba(0, 0, 0, 0.8);
}

.t2-settings-avatar-edit svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.t2-settings-avatar-edit input {
    display: none;
}

.t2-settings-form {
    padding: 16px;
}

.t2-settings-section {
    margin-bottom: 24px;
}

.t2-settings-section h3 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 16px;
}

.t2-form-group {
    margin-bottom: 20px;
}

.t2-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--t2-text-secondary);
    font-size: 13px;
}

.t2-form-group input,
.t2-form-group textarea {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-sm);
    color: var(--t2-text);
    font-size: 17px;
    outline: none;
    transition: border-color 0.2s;
}

.t2-form-group input:focus,
.t2-form-group textarea:focus {
    border-color: var(--t2-primary);
}

.t2-form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.t2-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--t2-text-secondary);
    text-align: right;
}

/* Settings sections */
.t2-settings-section {
    padding: 16px;
    border-top: var(--t2-border-width) solid var(--t2-border);
    margin-top: 16px;
}

.t2-settings-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.t2-settings-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--t2-bg-secondary);
    border-radius: var(--t2-radius-sm);
    color: var(--t2-text-secondary);
    font-size: 14px;
}

.t2-settings-notice-error {
    background: rgba(244, 33, 46, 0.1);
    color: var(--t2-danger);
}

.t2-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.t2-settings-toggle-info {
    flex: 1;
}

.t2-settings-toggle-label {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.t2-settings-toggle-desc {
    display: block;
    font-size: 13px;
    color: var(--t2-text-secondary);
}

/* Switch toggle */
.t2-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.t2-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.t2-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--t2-border);
    transition: 0.3s;
    border-radius: var(--t2-radius-pill);
}

.t2-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.t2-switch input:checked + .t2-switch-slider {
    background-color: var(--t2-primary);
}

.t2-switch input:checked + .t2-switch-slider:before {
    transform: translateX(20px);
}

.t2-switch input:disabled + .t2-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Modal
   ======================================== */

.t2-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
}

.t2-modal.active {
    display: flex;
}

.t2-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(91, 112, 131, 0.4);
}

.t2-modal-content {
    position: relative;
    background: var(--t2-bg);
    border-radius: var(--t2-radius-card);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.t2-modal-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 53px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-modal-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--t2-text);
    cursor: pointer;
    transition: background 0.2s;
}

.t2-modal-close:hover {
    background: var(--t2-bg-hover);
}

.t2-modal-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========================================
   Toast notifications
   ======================================== */

.t2-toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t2-toast {
    background: var(--t2-primary);
    color: var(--t2-on-primary);
    padding: 12px 24px;
    border-radius: var(--t2-radius-sm);
    font-size: 15px;
    animation: t2-toast-in 0.3s ease;
}

.t2-toast.error {
    background: var(--t2-danger);
}

.t2-toast.success {
    background: var(--t2-success);
}

@keyframes t2-toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Loading / Empty states
   ======================================== */

.t2-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
    min-height: 200px;
}

.t2-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--t2-border);
    border-top-color: var(--t2-primary);
    border-radius: 50%;
    animation: t2-spin 0.8s linear infinite;
}

@keyframes t2-spin {
    to { transform: rotate(360deg); }
}

.t2-empty {
    padding: 32px;
    text-align: center;
    color: var(--t2-text-secondary);
}

.t2-empty h3 {
    font-size: 31px;
    font-weight: 800;
    color: var(--t2-text);
    margin-bottom: 8px;
}

/* ========================================
   Lightbox
   ======================================== */

.t2-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.t2-lightbox.active {
    display: flex;
}

.t2-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.t2-lightbox-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.t2-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.t2-lightbox-close svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.t2-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t2-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--t2-radius-sm);
    cursor: default;
    transition: filter 0.25s;
}

.t2-lightbox-content img:not(.is-full) {
    filter: brightness(0.96);
}

.t2-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.t2-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.t2-lightbox-nav svg {
    width: 26px;
    height: 26px;
}

.t2-lightbox-prev {
    left: 16px;
    transform: translateY(-50%) rotate(180deg);
}

.t2-lightbox-next {
    right: 16px;
}

.t2-lightbox-loading {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: t2-spin 0.8s linear infinite;
}

.t2-lightbox-counter {
    position: absolute;
    left: 50%;
    bottom: -32px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.t2-lightbox [hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .t2-lightbox-nav {
        display: none;
    }
}

.t2-tweet-media img.t2-lightbox-trigger {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.t2-tweet-media img.t2-lightbox-trigger:hover {
    opacity: 0.9;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1280px) {
    .t2-sidebar-right {
        width: 290px;
    }
}

@media (max-width: 1100px) {
    .t2-sidebar-right {
        display: none;
    }
}

@media (max-width: 1000px) {
    .t2-sidebar {
        width: 88px;
    }
    
    .t2-nav-item span {
        display: none;
    }
    
    .t2-nav-item svg {
        margin-right: 0;
    }
    
    .t2-btn-tweet .t2-btn-text {
        display: none;
    }
    
    .t2-btn-tweet .t2-btn-icon {
        display: block;
    }
    
    .t2-btn-tweet {
        width: 50px;
        padding: 0;
    }
    
    .t2-user-info {
        display: none;
    }
    
    .t2-logout {
        display: none;
    }
}

@media (max-width: 700px) {
    #t2-root {
        display: block !important;
        flex-direction: column;
    }
    
    .t2-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        height: 60px !important;
        border-top: var(--t2-border-width) solid var(--t2-border);
        border-left: none;
        background: var(--t2-bg);
        z-index: 1000;
    }
    
    .t2-sidebar-inner {
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
        height: 100%;
    }
    
    .t2-logo,
    .t2-btn-tweet,
    .t2-user-menu {
        display: none !important;
    }
    
    .t2-nav {
        display: flex !important;
        flex-direction: row !important;
        margin: 0;
        width: 100%;
        justify-content: space-around;
    }
    
    .t2-nav-item {
        margin: 0;
        padding: 12px;
    }
    
    .t2-nav-item span {
        display: none !important;
    }
    
    .t2-nav-item svg {
        width: 24px;
        height: 24px;
        margin-right: 0 !important;
    }
    
    .t2-main {
        width: 100% !important;
        max-width: 100% !important;
        border-left: none !important;
        border-right: none !important;
        padding-bottom: 70px;
        min-height: 100vh;
    }
    
    .t2-sidebar-right {
        display: none !important;
    }
    
    /* Composer mobile */
    .t2-composer {
        padding: 12px;
    }
    
    .t2-composer-avatar {
        width: 40px;
        height: 40px;
    }
    
    .t2-composer-input {
        font-size: 16px;
        min-height: 44px;
    }
    
    /* Tweet mobile */
    .t2-tweet {
        padding: 12px;
    }
    
    .t2-tweet-avatar {
        width: 40px;
        height: 40px;
    }
    
    .t2-tweet-text {
        font-size: 15px;
    }
    
    .t2-tweet-detail .t2-tweet-text {
        font-size: 18px;
    }
    
    /* Header mobile */
    .t2-header {
        position: sticky;
        top: 0;
    }
    
    /* Profile mobile */
    .t2-profile-banner {
        height: 150px;
    }
    
    .t2-profile-avatar {
        width: 80px;
        height: 80px;
        margin-top: -40px;
    }
    
    .t2-profile-name {
        font-size: 18px;
    }
    
    /* Modal mobile */
    .t2-modal-content {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .t2-modal {
        padding-top: 0;
    }
    
    /* Toast mobile */
    .t2-toast-container {
        bottom: 80px;
        left: 16px;
        right: 16px;
        transform: none;
    }
    
    .t2-toast {
        width: 100%;
    }
    
    /* Lightbox mobile */
    .t2-lightbox-close {
        top: 12px;
        left: 12px;
    }
    
    /* Search mobile */
    .t2-search-page {
        padding: 12px !important;
    }
    
    /* Settings mobile */
    .t2-settings-banner {
        height: 150px;
    }
    
    .t2-settings-avatar {
        width: 80px;
        height: 80px;
    }
    
    .t2-settings-avatar-wrapper {
        margin-top: -40px;
    }
    
    /* Bouton flottant composer */
    .t2-fab {
        display: flex;
    }
}

/* Bouton flottant (FAB) pour composer sur mobile */
.t2-fab {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--t2-btn-bg, var(--t2-primary));
    color: var(--t2-on-primary);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 999;
    transition: transform 0.2s, background 0.2s;
}

.t2-fab:hover {
    transform: scale(1.05);
    filter: brightness(0.92);
}

.t2-fab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ========================================
   v1.2 — Scroll infini
   ======================================== */

.t2-sentinel {
    display: flex;
    justify-content: center;
    padding: 24px;
    min-height: 80px;
}

.t2-sentinel .t2-spinner {
    visibility: hidden;
}

.t2-sentinel.active .t2-spinner {
    visibility: visible;
}

.t2-search-section-title h3 {
    padding: 12px 16px;
    font-size: 19px;
    font-weight: 800;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

/* ========================================
   v1.2 — Composer
   ======================================== */

.t2-char-count.hint {
    color: var(--t2-text-secondary);
    font-size: 13px;
}

.t2-modal .t2-composer {
    border-bottom: none;
}

.t2-btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ========================================
   v1.2 — Invitations (Paramètres)
   ======================================== */

.t2-invite-create {
    margin: 12px 0 16px;
}

.t2-invite-list {
    list-style: none;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    overflow: hidden;
    box-shadow: var(--t2-shadow-card);
}

.t2-invite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-invite-item:last-child {
    border-bottom: none;
}

.t2-invite-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.t2-invite-code {
    font-size: 12px;
    color: var(--t2-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t2-invite-meta {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-invite-status.used {
    color: var(--t2-success);
}

.t2-invite-status.pending {
    color: var(--t2-primary);
}

.t2-invite-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.t2-icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--t2-text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.t2-icon-btn:hover {
    background: var(--t2-bg-hover);
    color: var(--t2-primary);
}

.t2-icon-btn.danger:hover {
    color: var(--t2-danger);
}

.t2-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ========================================
   v1.2 — Pages d'authentification
   ======================================== */

body.t2-auth-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
    background: var(--t2-login-bg, var(--t2-bg));
}

.t2-auth {
    width: 100%;
    max-width: 420px;
}

.t2-auth-card {
    background: var(--t2-bg-secondary);
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    padding: 32px 28px;
    box-shadow: var(--t2-shadow-card);
}

.t2-auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.t2-auth-logo img {
    max-height: 56px;
    width: auto;
    border-radius: var(--t2-radius-card);
}

.t2-auth-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
}

.t2-auth-intro {
    color: var(--t2-text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.t2-auth-form .t2-form-group input {
    background: var(--t2-bg);
}

.t2-auth-form .t2-btn-block {
    margin-top: 8px;
    padding: 14px;
    font-size: 16px;
}

.t2-auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--t2-text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.t2-auth-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--t2-primary);
}

.t2-auth-alert {
    padding: 12px 16px;
    border-radius: var(--t2-radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.45;
}

.t2-auth-alert ul {
    list-style: none;
}

.t2-auth-alert li + li {
    margin-top: 6px;
}

.t2-auth-alert-error {
    background: rgba(244, 33, 46, 0.12);
    color: #ff6b74;
}

.t2-auth-alert-success {
    background: rgba(0, 186, 124, 0.12);
    color: var(--t2-success);
}

.t2-auth-alert-info {
    background: color-mix(in srgb, var(--t2-primary) 12%, transparent);
    color: var(--t2-text);
}

.t2-auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.t2-auth-muted {
    color: var(--t2-text-secondary);
    margin-top: 12px;
}

.t2-auth-footer {
    text-align: center;
    color: var(--t2-text-secondary);
    font-size: 13px;
    margin-top: 20px;
}

/* Honeypot anti-bot */
.t2-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 480px) {
    .t2-auth-card {
        padding: 24px 18px;
    }
}

/* Boutons désactivés (composer, invitations…) */
.t2-btn:disabled,
.t2-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.t2-btn:disabled:hover,
.t2-btn[disabled]:hover {
    filter: none;
}

/* ========================================
   v2.0 — Thème clair
   ======================================== */

:root[data-theme="light"] {
    --t2-bg: #ffffff;
    --t2-bg-secondary: #f7f9f9;
    --t2-bg-hover: #f2f4f5;
    --t2-border: #eff3f4;
    --t2-text: #0f1419;
    --t2-text-secondary: #536471;
}



:root[data-theme="light"] .t2-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}





/* ========================================
   v2.0 — Tweet : contexte, menu, badges, groupe
   ======================================== */

.t2-tweet-context {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 0 6px 48px;
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-tweet-detail .t2-tweet-context {
    padding-left: 0;
}

.t2-context {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.t2-context svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.t2-context a {
    color: inherit;
}

.t2-context-ann {
    color: var(--t2-primary);
}

.t2-context-scheduled {
    color: #e0a800;
}

.t2-tweet.is-new {
    background: color-mix(in srgb, var(--t2-primary) 6%, transparent);
}

.t2-tweet-announcement {
    border-left: 3px solid var(--t2-primary);
    background: color-mix(in srgb, var(--t2-primary) 5%, transparent);
}

.t2-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    font-size: 12px;
    color: var(--t2-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.t2-separator::before,
.t2-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--t2-border);
}

.t2-tweet-menu-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--t2-text-secondary);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.6;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.t2-tweet:hover .t2-tweet-menu-btn,
.t2-tweet-menu-btn:focus-visible {
    opacity: 1;
}

.t2-tweet-menu-btn:hover {
    background: color-mix(in srgb, var(--t2-primary) 10%, transparent);
    color: var(--t2-primary);
}

.t2-tweet-menu-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.t2-tweet-edited {
    color: var(--t2-text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.t2-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--t2-radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.t2-badge-admin {
    background: var(--t2-badge-admin, var(--t2-primary));
    color: var(--t2-on-badge-admin, var(--t2-on-primary));
}

.t2-badge-mod {
    background: var(--t2-badge-mod, var(--t2-success));
    color: var(--t2-on-badge-mod, var(--t2-on-primary));
}

.t2-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: var(--t2-radius-pill);
    background: var(--t2-bg-secondary);
    border: var(--t2-border-width) solid var(--t2-border);
    color: var(--t2-text-secondary);
    font-size: 12px;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2-group-chip:hover {
    color: var(--t2-primary);
    text-decoration: none;
    border-color: var(--t2-primary);
}

.t2-group-chip svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}

.t2-tweet-header {
    flex-wrap: wrap;
    row-gap: 2px;
}

.t2-tweet-action.retweet.active {
    color: var(--t2-success);
}

.t2-tweet-action.retweet:hover {
    color: var(--t2-success);
    background: rgba(0, 186, 124, 0.1);
}

.t2-tweet-action.react:hover {
    color: #e0a800;
    background: rgba(224, 168, 0, 0.12);
}

.t2-tweet-missing {
    cursor: default;
}

/* Médias multiples */
.t2-tweet-media.t2-media-2,
.t2-tweet-media.t2-media-3,
.t2-tweet-media.t2-media-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.t2-tweet-media.t2-media-3 img:first-child {
    grid-row: span 2;
}

.t2-tweet-media.t2-media-2 img,
.t2-tweet-media.t2-media-3 img,
.t2-tweet-media.t2-media-4 img {
    height: 180px;
    max-height: none;
}

.t2-tweet-media.t2-media-3 img:first-child {
    height: 362px;
}

/* ========================================
   v2.0 — Réactions
   ======================================== */

.t2-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.t2-reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--t2-radius-pill);
    border: var(--t2-border-width) solid var(--t2-border);
    background: var(--t2-bg-secondary);
    color: var(--t2-text);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.t2-reaction-chip:hover {
    border-color: var(--t2-primary);
}

.t2-reaction-chip.mine {
    border-color: var(--t2-primary);
    background: color-mix(in srgb, var(--t2-primary) 15%, transparent);
}

.t2-reaction-emoji {
    font-size: 15px;
    line-height: 1;
}

.t2-popover {
    position: absolute;
    z-index: 3000;
    background: var(--t2-bg);
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    box-shadow: var(--t2-shadow-pop, 0 4px 24px rgba(0, 0, 0, 0.35));
    padding: 6px;
    min-width: 40px;
    animation: t2-pop 0.12s ease;
}

@keyframes t2-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

.t2-picker {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    border-radius: var(--t2-radius-pill);
}

.t2-picker-item {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.12s, background 0.12s;
}

.t2-picker-item:hover {
    transform: scale(1.25);
    background: var(--t2-bg-hover);
}

.t2-menu {
    min-width: 230px;
    padding: 6px 0;
}

.t2-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 16px;
    border: none;
    background: transparent;
    color: var(--t2-text);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.t2-menu-item:hover {
    background: var(--t2-bg-hover);
}

.t2-menu-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.t2-menu-item.danger {
    color: var(--t2-danger);
}

/* ========================================
   v2.0 — Sondages
   ======================================== */

.t2-poll {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.t2-poll-choice {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--t2-primary);
    border-radius: var(--t2-radius-pill);
    background: transparent;
    color: var(--t2-primary);
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}

.t2-poll-choice:hover {
    background: color-mix(in srgb, var(--t2-primary) 12%, transparent);
}

.t2-poll-option {
    position: relative;
    border-radius: var(--t2-radius-sm);
    overflow: hidden;
    background: var(--t2-bg-secondary);
    min-height: 36px;
}

.t2-poll-option.votable {
    cursor: pointer;
}

.t2-poll-option.votable:hover .t2-poll-bar {
    opacity: 0.85;
}

.t2-poll-bar {
    position: absolute;
    inset: 0 auto 0 0;
    background: color-mix(in srgb, var(--t2-primary) 25%, transparent);
    transition: width 0.4s ease;
}

.t2-poll-option.mine .t2-poll-bar {
    background: color-mix(in srgb, var(--t2-primary) 50%, transparent);
}

.t2-poll-label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 15px;
}

.t2-poll-label svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: -3px;
}

.t2-poll-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.t2-poll-voters {
    display: flex;
    align-items: center;
}

.t2-poll-voters img {
    width: 22px;
    height: 22px;
    border-radius: var(--t2-radius-avatar);
    border: 2px solid var(--t2-bg);
    margin-left: -8px;
    object-fit: cover;
}

.t2-poll-voters img:first-child {
    margin-left: 0;
}

.t2-poll-more {
    font-size: 12px;
    color: var(--t2-text-secondary);
    margin-left: 4px;
}

.t2-poll-footer {
    font-size: 13px;
    color: var(--t2-text-secondary);
    margin-top: 4px;
}

.t2-poll-hint {
    font-style: italic;
}

/* Composeur : sondage et programmation */
.t2-composer-poll {
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    padding: 12px;
    margin-top: 10px;
    box-shadow: var(--t2-shadow-card);
}

.t2-poll-option-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.t2-poll-option-row input {
    flex: 1;
    padding: 10px 12px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-sm);
    background: transparent;
    color: var(--t2-text);
    font-size: 15px;
    outline: none;
}

.t2-poll-option-row input:focus {
    border-color: var(--t2-primary);
}

.t2-poll-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--t2-text-secondary);
}

.t2-poll-settings select {
    background: var(--t2-bg);
    color: var(--t2-text);
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-sm);
    padding: 4px 8px;
    font-size: 14px;
    margin-left: 4px;
}

.t2-link-btn {
    background: none;
    border: none;
    color: var(--t2-primary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.t2-link-btn:hover {
    text-decoration: underline;
}

.t2-link-btn.danger {
    color: var(--t2-danger);
}

.t2-composer-schedule {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px 12px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    font-size: 14px;
    color: var(--t2-text-secondary);
    box-shadow: var(--t2-shadow-card);
}

.t2-composer-schedule svg {
    width: 18px;
    height: 18px;
    fill: var(--t2-primary);
}

.t2-schedule-input {
    margin-left: 6px;
    padding: 6px 8px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-sm);
    background: transparent;
    color: var(--t2-text);
    font-size: 14px;
    color-scheme: dark;
}

:root[data-theme="light"] .t2-schedule-input {
    color-scheme: light;
}

.t2-composer-tool.active {
    color: var(--t2-primary);
    background: color-mix(in srgb, var(--t2-primary) 15%, transparent);
}

.t2-composer-top {
    margin-bottom: 8px;
}

/* Destination du tweet : pastille « Général ▾ » et menu */
.t2-audience {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px 4px 9px;
    border: 1px solid color-mix(in srgb, var(--t2-primary) 45%, transparent);
    border-radius: var(--t2-radius-pill);
    background: transparent;
    color: var(--t2-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.t2-audience:hover,
.t2-audience[aria-expanded="true"] {
    background: color-mix(in srgb, var(--t2-primary) 12%, transparent);
    border-color: var(--t2-primary);
}

.t2-audience:focus-visible {
    outline: 2px solid var(--t2-primary);
    outline-offset: 2px;
}

.t2-audience-fixed {
    cursor: default;
    background: color-mix(in srgb, var(--t2-primary) 10%, transparent);
    border-color: transparent;
}

.t2-audience-icon {
    display: inline-flex;
}

.t2-audience-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex-shrink: 0;
}

.t2-audience-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2-audience-chevron {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.15s;
}

.t2-audience[aria-expanded="true"] .t2-audience-chevron {
    transform: rotate(180deg);
}

.t2-audience-menu {
    min-width: 270px;
    max-width: min(360px, calc(100vw - 16px));
    max-height: 360px;
    overflow-y: auto;
    padding: 6px;
}

.t2-audience-title {
    padding: 8px 12px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--t2-text-secondary);
}

.t2-audience-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: var(--t2-radius-sm);
    background: transparent;
    color: var(--t2-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.t2-audience-item:hover,
.t2-audience-item:focus-visible {
    background: var(--t2-bg-hover);
    outline: none;
}

.t2-audience-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--t2-primary) 14%, transparent);
    color: var(--t2-primary);
    flex-shrink: 0;
}

.t2-audience-item-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.t2-audience-item-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.t2-audience-item-text strong {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2-audience-item-text small {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-audience-check {
    display: inline-flex;
    flex-shrink: 0;
    visibility: hidden;
}

.t2-audience-check svg {
    width: 20px;
    height: 20px;
    fill: var(--t2-primary);
}

.t2-audience-item.is-active .t2-audience-check {
    visibility: visible;
}

.t2-composer-input-wrap {
    position: relative;
}

.t2-composer-quote {
    margin-top: 8px;
}

.t2-composer-quote .t2-quoted {
    cursor: default;
}

/* Autocomplétion @mentions */
.t2-mention-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 50;
    background: var(--t2-bg);
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.t2-group-add {
    position: relative;
    padding: 12px 16px;
}

.t2-group-add input {
    width: 100%;
    padding: 10px 14px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-pill);
    background: var(--t2-bg-secondary);
    color: var(--t2-text);
    font-size: 15px;
    outline: none;
}

.t2-group-add .t2-mention-list {
    left: 16px;
    right: 16px;
}

.t2-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--t2-text);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.t2-mention-item.active,
.t2-mention-item:hover {
    background: var(--t2-bg-hover);
}

.t2-mention-item img {
    width: 32px;
    height: 32px;
    border-radius: var(--t2-radius-avatar);
    object-fit: cover;
}

.t2-mention-item small {
    color: var(--t2-text-secondary);
}

/* Édition inline */
.t2-inline-edit {
    margin-top: 6px;
}

.t2-inline-edit textarea {
    width: 100%;
    border: 1px solid var(--t2-primary);
    border-radius: var(--t2-radius-sm);
    padding: 8px 10px;
    font-size: 17px;
    min-height: 60px;
}

.t2-inline-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

/* ========================================
   v2.0 — Citation et aperçus de liens
   ======================================== */

.t2-quoted {
    display: block;
    margin-top: 10px;
    padding: 12px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    color: var(--t2-text);
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: var(--t2-shadow-card);
}

.t2-quoted:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-quoted-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 4px;
}

.t2-quoted-header span {
    color: var(--t2-text-secondary);
}

.t2-quoted-avatar {
    width: 20px;
    height: 20px;
    border-radius: var(--t2-radius-avatar);
    object-fit: cover;
}

.t2-quoted-text {
    font-size: 15px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.t2-quoted-text a {
    color: var(--t2-link);
}

.t2-quoted-media img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    border-radius: var(--t2-radius-md);
    margin-top: 8px;
}

.t2-quoted-missing {
    margin-top: 10px;
    padding: 12px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    color: var(--t2-text-secondary);
    font-size: 14px;
    background: var(--t2-bg-secondary);
}

.t2-link-card {
    display: block;
    margin-top: 12px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    overflow: hidden;
    color: var(--t2-text);
    transition: background 0.15s;
    box-shadow: var(--t2-shadow-card);
}

.t2-link-card:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-link-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--t2-bg-secondary);
}

.t2-link-card-body {
    padding: 12px;
}

.t2-link-card-site {
    font-size: 13px;
    color: var(--t2-text-secondary);
    margin-bottom: 2px;
}

.t2-link-card-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
}

.t2-link-card-desc {
    font-size: 14px;
    color: var(--t2-text-secondary);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.t2-yt {
    position: relative;
    margin-top: 12px;
    aspect-ratio: 16 / 9;
    border-radius: var(--t2-radius-card);
    overflow: hidden;
    background: #000 center / cover no-repeat;
    border: var(--t2-border-width) solid var(--t2-border);
    cursor: pointer;
}

.t2-yt-play {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.15s;
}

.t2-yt-play:hover {
    background: rgba(0, 0, 0, 0.05);
}

.t2-yt-play svg {
    width: 68px;
    height: 48px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.t2-yt-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.t2-yt-title span {
    font-weight: 400;
    opacity: 0.85;
}

.t2-yt iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
   v2.0 — Navigation : badges, widgets, tendances
   ======================================== */

.t2-nav-item {
    position: relative;
}

.t2-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--t2-radius-pill);
    background: var(--t2-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.t2-nav-badge[hidden] {
    display: none;
}

.t2-widget {
    margin-top: 16px;
    background: var(--t2-bg-secondary);
    border-radius: var(--t2-radius-card);
    overflow: hidden;
    box-shadow: var(--t2-shadow-card);
}

.t2-widget h3 {
    font-size: 19px;
    font-weight: 800;
    padding: 12px 16px;
}

.t2-trend-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--t2-text);
    transition: background 0.15s;
}

.t2-trend-item:hover {
    background: var(--t2-bg-hover);
    text-decoration: none;
}

.t2-trend-rank {
    color: var(--t2-text-secondary);
    font-size: 13px;
}

.t2-trend-tag {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t2-trend-count {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-search-page {
    padding: 12px 16px;
}

.t2-search-trends {
    padding: 4px 16px 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-search-trends h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--t2-text-secondary);
    margin-bottom: 10px;
}

.t2-trend-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.t2-trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--t2-radius-pill);
    border: var(--t2-border-width) solid var(--t2-border);
    background: var(--t2-bg-secondary);
    color: var(--t2-text);
    font-weight: 600;
    font-size: 14px;
}

.t2-trend-chip:hover {
    border-color: var(--t2-primary);
    color: var(--t2-primary);
    text-decoration: none;
}

.t2-trend-chip span {
    font-size: 12px;
    color: var(--t2-text-secondary);
    font-weight: 400;
}

.t2-empty-small {
    padding: 8px 0;
}

.t2-header-right {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

/* ========================================
   v2.0 — Onglets, formulaires, groupes
   ======================================== */

.t2-tabs {
    display: flex;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: var(--t2-text-secondary);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}

.t2-tab:hover {
    background: var(--t2-bg-hover);
}

.t2-tab.active {
    color: var(--t2-text);
}

.t2-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    border-radius: var(--t2-radius-sm);
    background: var(--t2-primary);
}

.t2-tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: var(--t2-radius-pill);
    background: var(--t2-bg-secondary);
    font-size: 12px;
}

.t2-form {
    padding: 8px 16px 16px;
}

.t2-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.t2-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
    cursor: pointer;
    color: var(--t2-text);
}

.t2-radio input {
    margin-top: 4px;
    accent-color: var(--t2-primary);
}

.t2-modal-title {
    font-weight: 700;
    font-size: 17px;
    margin-left: 12px;
}

.t2-groups-intro {
    padding: 12px 16px 4px;
}

.t2-group-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    transition: background 0.15s;
}

.t2-group-card:hover {
    background: var(--t2-bg-hover);
}

.t2-group-card-main {
    flex: 1;
    min-width: 0;
    color: var(--t2-text);
}

.t2-group-card-main:hover {
    text-decoration: none;
}

.t2-group-card-name {
    font-weight: 800;
    font-size: 17px;
}

.t2-group-card-meta {
    font-size: 13px;
    color: var(--t2-text-secondary);
    margin-top: 2px;
}

.t2-group-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.t2-group-card-meta svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.t2-group-card-desc {
    font-size: 14px;
    color: var(--t2-text-secondary);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.t2-group-card-action {
    flex-shrink: 0;
}

.t2-group-member-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--t2-success);
    font-weight: 600;
}

.t2-group-member-tag.muted {
    color: var(--t2-text-secondary);
    font-weight: 400;
}

.t2-group-member-tag svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.t2-group-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 16px;
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    position: relative;
}

.t2-group-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--t2-header-bg, transparent);
    opacity: 0.18;
    pointer-events: none;
}

.t2-group-header > * {
    position: relative;
}

.t2-group-header-main {
    flex: 1;
    min-width: 0;
}

.t2-group-header h2 {
    font-size: 22px;
    font-weight: 800;
}

.t2-group-desc {
    margin-top: 8px;
    color: var(--t2-text);
    white-space: pre-wrap;
}

.t2-group-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.t2-group-member {
    justify-content: space-between;
}

.t2-group-member .t2-user-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    color: inherit;
}

.t2-group-member .t2-user-item-link:hover {
    text-decoration: none;
}

.t2-group-member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ========================================
   v2.0 — Annuaire
   ======================================== */

.t2-members-count {
    padding: 0 16px 8px;
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 0 16px 16px;
}

.t2-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px 16px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    color: var(--t2-text);
    transition: background 0.15s, border-color 0.15s;
    box-shadow: var(--t2-shadow-card);
}

.t2-member-card:hover {
    background: var(--t2-bg-hover);
    border-color: var(--t2-text-secondary);
    text-decoration: none;
}

.t2-member-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--t2-radius-avatar);
    object-fit: cover;
    margin-bottom: 10px;
}

.t2-member-name {
    font-weight: 700;
    font-size: 15px;
}

.t2-member-handle {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-member-bio {
    font-size: 13px;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.t2-member-meta {
    font-size: 12px;
    color: var(--t2-text-secondary);
    margin-top: 8px;
}

.t2-user-item-bio {
    font-size: 13px;
    color: var(--t2-text-secondary);
    margin-top: 2px;
}

/* ========================================
   v2.0 — Modération
   ======================================== */

.t2-report {
    border-bottom: var(--t2-border-width) solid var(--t2-border);
    padding: 12px 0 16px;
}

.t2-report-head {
    display: flex;
    gap: 12px;
    padding: 4px 16px 12px;
    font-size: 14px;
    color: var(--t2-text-secondary);
}

.t2-report-head svg {
    width: 20px;
    height: 20px;
    fill: var(--t2-danger);
    flex-shrink: 0;
}

.t2-report-head strong {
    color: var(--t2-text);
}

.t2-report-comment {
    margin-top: 4px;
    color: var(--t2-text);
    font-style: italic;
}

.t2-report-tweet {
    margin: 0 16px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    overflow: hidden;
    box-shadow: var(--t2-shadow-card);
}

.t2-report-tweet .t2-tweet {
    border-bottom: none;
}

.t2-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px 0;
}

.t2-report-resolved {
    padding: 12px 16px 0;
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-btn-danger {
    background: var(--t2-danger);
    color: #fff;
    border: none;
}

.t2-btn-danger:hover {
    background: color-mix(in srgb, var(--t2-danger) 85%, #000);
}

/* ========================================
   v2.0 — Paramètres : thème, programmés
   ======================================== */

.t2-theme-choice {
    display: flex;
    gap: 12px;
}

.t2-theme-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.15s;
}

.t2-theme-option.active {
    border-color: var(--t2-primary);
}

.t2-theme-option input {
    display: none;
}

.t2-theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--t2-border);
}

.t2-theme-swatch.dark {
    background: #000;
}

.t2-theme-swatch.light {
    background: #fff;
}

.t2-scheduled-list {
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    overflow: hidden;
    box-shadow: var(--t2-shadow-card);
}

.t2-scheduled-list .t2-tweet:last-child {
    border-bottom: none;
}

body.t2-modal-open {
    overflow: hidden;
}

/* ========================================
   v2.0 — Responsive complémentaire
   ======================================== */

@media (max-width: 700px) {
    .t2-nav-desktop {
        display: none !important;
    }

    .t2-nav-badge {
        position: absolute;
        top: 6px;
        right: 4px;
        margin: 0;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .t2-tweet-context {
        padding-left: 40px;
    }

    .t2-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .t2-group-header {
        flex-direction: column;
    }

    .t2-theme-choice {
        flex-direction: column;
    }

    .t2-tweet-media.t2-media-2 img,
    .t2-tweet-media.t2-media-3 img,
    .t2-tweet-media.t2-media-4 img {
        height: 130px;
    }

    .t2-tweet-media.t2-media-3 img:first-child {
        height: 262px;
    }
}

/* ---- Langues (2.3) ---- */
.t2-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 12px 44px 12px 12px;
    background: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    color: var(--t2-text);
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-sm);
    font: inherit;
    font-size: 17px;
    line-height: 1.3;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.t2-select:focus {
    border-color: var(--t2-primary);
}

.t2-select-small {
    width: auto;
    padding: 6px 34px 6px 10px;
    font-size: 14px;
    background-position: right 10px center;
    background-size: 16px;
}

.t2-select option {
    color: var(--t2-text);
    background: var(--t2-bg);
}

.t2-invite-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-lang-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--t2-border);
}

.t2-lang-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--t2-text-secondary);
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: -1px;
}

.t2-lang-tab.active {
    color: var(--t2-text);
    border-bottom-color: var(--t2-primary);
    font-weight: 600;
}

.t2-form-hint {
    color: var(--t2-text-secondary);
    font-size: 13px;
    margin: -4px 0 12px;
}

.t2-auth-langs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    font-size: 13px;
}

.t2-auth-langs a {
    color: var(--t2-text-secondary);
    text-decoration: none;
}

.t2-auth-langs a:hover {
    color: var(--t2-text);
    text-decoration: underline;
}

.t2-auth-langs .active {
    color: var(--t2-text);
    font-weight: 600;
}


/* ---- Fichiers joints (PDF, 2.3.2) ---- */
.t2-tweet-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.t2-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    background: var(--t2-bg-secondary);
    color: var(--t2-text);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    min-width: 0;
}

.t2-file-card:hover {
    background: var(--t2-bg-hover);
    border-color: var(--t2-text-secondary);
    text-decoration: none;
}

.t2-file-card > svg {
    width: 28px;
    height: 28px;
    flex: none;
    color: var(--t2-danger);
}

.t2-file-card.compact {
    padding: 8px 12px;
}

.t2-file-card.compact > svg {
    width: 22px;
    height: 22px;
}

.t2-file-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.t2-file-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2-file-meta {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-media-preview-item.t2-media-preview-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    width: 100%;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-md);
    background: var(--t2-bg-secondary);
    min-width: 0;
    overflow: hidden;
}

.t2-media-preview-file > svg {
    width: 24px;
    height: 24px;
    flex: none;
    color: var(--t2-danger);
}

.t2-media-preview-file .t2-file-text {
    flex: 1;
}

.t2-media-preview-file .t2-media-preview-remove {
    position: static;
    flex: none;
}

/* ---- Fil en direct (2.4) ---- */
.t2-live-batch {
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease;
}

.t2-live-batch.is-open {
    opacity: 1;
}

.t2-tweet.t2-tweet-fresh {
    background-color: rgba(29, 161, 242, 0.12);
    background-color: color-mix(in srgb, var(--t2-primary) 12%, transparent);
    animation: t2-fresh-fade 2.6s ease-out forwards;
}

@keyframes t2-fresh-fade {
    0%, 35% { }
    100% { background-color: transparent; }
}

.t2-tweet.t2-tweet-fade-in {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.t2-tweet.t2-tweet-fade-in.is-visible {
    opacity: 1;
    transform: none;
}

.t2-live-pill {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translate(-50%, -16px);
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--t2-radius-pill);
    background: var(--t2-btn-bg, var(--t2-primary));
    color: var(--t2-on-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.t2-live-pill.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.t2-live-pill:hover {
    filter: brightness(0.94);
}

.t2-live-pill svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 1024px) {
    .t2-live-pill {
        top: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .t2-live-batch,
    .t2-live-pill,
    .t2-tweet.t2-tweet-fade-in {
        transition: none;
    }
    .t2-tweet.t2-tweet-fresh {
        animation: none;
        background-color: transparent;
    }
}

/* ==========================================================================
   Modération IA (2.7) : charte, lecture seule, tweet masqué, signalements IA
   ========================================================================== */

/* Charte : page publique et écran d'acceptation */
.t2-auth:has(.t2-auth-card-wide) {
    max-width: 720px;
}

.t2-charter {
    text-align: left;
    line-height: 1.55;
    font-size: 15px;
}

.t2-charter h2,
.t2-charter h3 {
    margin: 22px 0 8px;
    font-size: 17px;
    font-weight: 800;
}

.t2-charter h2:first-child,
.t2-charter h3:first-child {
    margin-top: 0;
}

.t2-charter p {
    margin: 0 0 12px;
}

.t2-charter ul,
.t2-charter ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.t2-charter li {
    margin-bottom: 6px;
}

.t2-charter strong {
    font-weight: 700;
}

.t2-auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 16px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.t2-auth-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--t2-primary);
}

.t2-auth-check a {
    color: var(--t2-link);
    text-decoration: underline;
}

.t2-charter-gate {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: color-mix(in srgb, var(--t2-bg) 80%, transparent);
    backdrop-filter: blur(6px);
}

body.t2-gated {
    overflow: hidden;
}

.t2-charter-card {
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: var(--t2-bg-secondary);
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-card);
    box-shadow: var(--t2-shadow-card);
    padding: 24px;
}

.t2-charter-card h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
}

.t2-charter-intro {
    margin: 0 0 14px;
    color: var(--t2-text-secondary);
}

.t2-charter-scroll {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    padding: 4px 14px 4px 0;
    border-top: var(--t2-border-width) solid var(--t2-border);
    border-bottom: var(--t2-border-width) solid var(--t2-border);
}

.t2-charter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
}

/* Bandeaux (lecture seule, publication masquée) */
.t2-guard-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 12px 16px;
    padding: 12px 14px;
    border-radius: var(--t2-radius-card);
    border: var(--t2-border-width) solid var(--t2-border);
    background: var(--t2-bg-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.t2-guard-banner > svg {
    width: 22px;
    height: 22px;
    fill: var(--t2-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.t2-guard-banner p {
    margin: 6px 0 0;
}

.t2-guard-banner-warning {
    border-color: color-mix(in srgb, var(--t2-danger) 45%, transparent);
    background: color-mix(in srgb, var(--t2-danger) 10%, var(--t2-bg-secondary));
}

.t2-guard-banner-warning > svg {
    fill: var(--t2-danger);
}

.t2-guard-muted {
    color: var(--t2-text-secondary);
}

.t2-contest-form {
    margin-top: 10px;
}

.t2-contest-form .t2-textarea {
    width: 100%;
    padding: 10px 12px;
    border: var(--t2-border-width) solid var(--t2-border);
    border-radius: var(--t2-radius-input, 8px);
    background: var(--t2-bg);
    color: var(--t2-text);
    font: inherit;
    font-size: 15px;
    resize: vertical;
}

.t2-contest-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.t2-link {
    color: var(--t2-link);
}

#t2-compose-btn.is-disabled,
#t2-fab-compose.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Tweet masqué */
.t2-tweet-hidden {
    opacity: 0.85;
    background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--t2-text) 4%, transparent) 14px 16px);
}

.t2-context-hidden {
    color: var(--t2-danger);
}

.t2-context-hidden svg {
    fill: var(--t2-danger);
}

/* Signalements IA */
.t2-report-system .t2-report-head > svg {
    fill: var(--t2-primary);
}

.t2-report-ai {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--t2-primary);
}

.t2-report-ai svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.t2-report-ai-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.t2-report-ai-trigger {
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--t2-radius-pill);
    background: color-mix(in srgb, var(--t2-text) 10%, transparent);
    font-size: 12px;
    font-weight: 600;
}

.t2-chip-suspect {
    background: color-mix(in srgb, #f5a623 22%, transparent);
    color: #f5a623;
}

.t2-chip-severe {
    background: color-mix(in srgb, var(--t2-danger) 18%, transparent);
    color: var(--t2-danger);
}

.t2-report-contested {
    border-left: 3px solid var(--t2-primary);
}

.t2-report-contest {
    margin: 8px 16px 0;
    padding: 10px 12px;
    border-radius: var(--t2-radius-card);
    background: color-mix(in srgb, var(--t2-primary) 10%, transparent);
    font-size: 14px;
}

.t2-report-actions {
    flex-wrap: wrap;
}

/* Menu de modération d'un profil */
.t2-mod-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.t2-mod-menu {
    min-width: 260px;
    padding: 6px;
}

.t2-mod-state {
    padding: 6px 12px 4px;
    font-size: 13px;
    color: var(--t2-text-secondary);
}

.t2-mod-menu .t2-menu-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.t2-menu-sep {
    height: 1px;
    margin: 6px 0;
    background: var(--t2-border);
}

@media (max-width: 600px) {
    .t2-charter-card {
        padding: 16px;
    }
}

.t2-settings-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
}

/* Avis « publication masquée » dans le fil (2.7.2) */
.t2-guard-banner-hidden {
    border-color: color-mix(in srgb, var(--t2-primary) 45%, transparent);
    background: color-mix(in srgb, var(--t2-primary) 8%, var(--t2-bg-secondary));
}

.t2-guard-banner-hidden .t2-contest-actions {
    justify-content: flex-start;
}

.t2-guard-banner + .t2-guard-banner {
    margin-top: 0;
}
