/* ============================================================
   Everglob — feuille de style principale
   Palette du logo : cyan #0093FD → bleu #1B57FE → violet #7705F6
   Texte : bleu nuit #040717 — Typo : Inter
   ============================================================ */

:root {
    --cyan:    #0093FD;
    --bleu:    #1B57FE;
    --violet:  #7705F6;
    --encre:   #040717;
    --gris:    #5A6474;
    --fond:    #F7F9FC;
    --blanc:   #FFFFFF;
    --bordure: #E6EBF2;
    --degrade: linear-gradient(135deg, var(--cyan) 0%, var(--bleu) 50%, var(--violet) 100%);
    --rayon:   18px;
    --verre:   255, 255, 255;
    --teinte:  13, 43, 82;
    --ambiance-fond: linear-gradient(180deg, #F2F6FC 0%, #F7F9FC 45%, #F3F0FB 100%);
    color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--encre);
    background: var(--blanc);
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- Texte dégradé ---------- */
.texte-degrade {
    background: var(--degrade);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Boutons ---------- */
.bouton {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.bouton-grand { padding: 16px 34px; font-size: 16px; }
.bouton-degrade {
    background: var(--degrade);
    color: #fff;
    box-shadow: 0 10px 30px rgba(27, 87, 254, .35);
}
.bouton-degrade:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(119, 5, 246, .4); }
.bouton-ghost {
    background: var(--blanc);
    color: var(--encre);
    border: 1px solid var(--bordure);
    box-shadow: 0 4px 14px rgba(4, 7, 23, .06);
}
.bouton-ghost:hover { transform: translateY(-2px); border-color: #c9d4e3; }
.bouton-secondaire {
    background: var(--fond);
    color: var(--encre);
    border: 1px solid var(--bordure);
    padding: 8px 18px;
    font-size: 14px;
}
.lien-discret { color: var(--encre); font-weight: 600; font-size: 15px; }
.lien-discret:hover { color: var(--bleu); }

/* ---------- Navigation verre dépoli ---------- */
.nav-verre {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px clamp(20px, 5vw, 64px);
    background: rgba(var(--verre), .72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(230, 235, 242, .8);
}
.nav-marque { display: flex; align-items: center; gap: 10px; }
.nav-marque img { height: 30px; }
.nav-marque span { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--encre); }
.nav-actions { display: flex; align-items: center; gap: 22px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(140px, 20vh, 190px) 20px 80px;
}
.halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .30;
    pointer-events: none;
    animation: derive 14s ease-in-out infinite alternate;
}
.halo-cyan   { width: 480px; height: 480px; background: var(--cyan);   top: -160px; left: -120px; }
.halo-violet { width: 520px; height: 520px; background: var(--violet); top: -80px;  right: -160px; animation-delay: -5s; }
.halo-bleu   { width: 420px; height: 420px; background: var(--bleu);   bottom: -220px; left: 38%;  animation-delay: -9s; }

.hero-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--fond);
    border: 1px solid var(--bordure);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 26px;
}
.hero h1 {
    font-size: clamp(42px, 7.2vw, 82px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.04;
    margin: 0 0 24px;
}
.hero-texte {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--gris);
    line-height: 1.65;
    max-width: 580px;
    margin: 0 auto 38px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Cartes d'aperçu flottantes ---------- */
.apercu {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 76px;
}
.carte {
    background: rgba(var(--verre), .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(230, 235, 242, .9);
    border-radius: var(--rayon);
    box-shadow: 0 24px 60px rgba(4, 7, 23, .10);
    padding: 18px;
    text-align: left;
    width: 290px;
}
.flotte { animation: flotte 7s ease-in-out infinite; }
.delai-f1 { animation-delay: -2.4s; }
.delai-f2 { animation-delay: -4.8s; }

.carte-entete { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.carte-entete strong { display: block; font-size: 14px; }
.carte-entete small { color: var(--gris); font-size: 12px; }
.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}
.avatar-a { background: linear-gradient(135deg, #FF8A65, #FF4081); }
.avatar-b { background: linear-gradient(135deg, var(--cyan), var(--violet)); }

.carte-post { transform: rotate(-2.5deg); }
.carte-post .post-photo {
    height: 140px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 20% 110%, rgba(255,255,255,.35), transparent 50%),
        linear-gradient(135deg, #0093FD 0%, #1B57FE 45%, #7705F6 100%);
}
.carte-pied { display: flex; gap: 18px; margin-top: 13px; font-size: 13px; color: var(--gris); }
.carte-pied span { display: inline-flex; align-items: center; gap: 6px; }

.carte-chat { transform: rotate(1.8deg); margin-top: 34px; }
.bulle {
    border-radius: 16px;
    padding: 9px 14px;
    font-size: 13.5px;
    line-height: 1.45;
    margin: 0 0 8px;
    max-width: 85%;
}
.bulle-recue { background: var(--fond); border: 1px solid var(--bordure); }
.bulle-envoyee { background: var(--degrade); color: #fff; margin-left: auto; }

.carte-notif {
    display: flex;
    align-items: center;
    gap: 12px;
    width: auto;
    margin-top: 72px;
    transform: rotate(-1.2deg);
}
.carte-notif p { margin: 0; font-size: 13.5px; }
.carte-capsule small { color: var(--gris); }
.delai-f3 { animation-delay: -6s; }
.notif-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--degrade);
    color: #fff;
    flex-shrink: 0;
}

/* ---------- Exclusivités ---------- */
.uniques {
    max-width: 1060px;
    margin: 0 auto;
    padding: 70px 24px 10px;
    text-align: center;
}
.uniques h2 {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 14px;
}
.uniques-intro {
    color: var(--gris);
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.6;
    margin: 0 0 44px;
}
.uniques-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    text-align: left;
}
.uniques-grille article {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 30px 26px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.uniques-grille article:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(4, 7, 23, .09);
}
.uniques-grille h3 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 10px; }
.uniques-grille p { color: var(--gris); line-height: 1.6; margin: 0; font-size: 14px; }

/* ---------- Atouts ---------- */
.atouts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
    max-width: 1060px;
    margin: 0 auto;
    padding: 50px 24px 90px;
}
.atouts article {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 34px 30px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.atouts article:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(4, 7, 23, .09);
}
.atout-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--degrade);
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(27, 87, 254, .28);
}
.atouts h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 10px; }
.atouts p { color: var(--gris); line-height: 1.65; margin: 0; }

/* ---------- Bandeau nuit ---------- */
.bandeau-nuit {
    background: #040717;
    color: #fff;
    text-align: center;
    padding: 90px 24px;
}
.bandeau-nuit h2 {
    font-size: clamp(30px, 4.5vw, 46px);
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 16px;
}
.bandeau-nuit > p {
    color: rgba(255, 255, 255, .72);
    max-width: 520px;
    margin: 0 auto 44px;
    line-height: 1.65;
}
.bandeau-points {
    display: flex;
    justify-content: center;
    gap: clamp(30px, 7vw, 90px);
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.bandeau-points strong {
    display: block;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    background: var(--degrade);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.bandeau-points span { color: rgba(255, 255, 255, .65); font-size: 14px; }

/* ---------- Pied de page ---------- */
.pied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    max-width: 1060px;
    margin: 0 auto;
    padding: 36px 24px;
    color: var(--gris);
    font-size: 14px;
}
.pied-logo { height: 22px; }

/* ---------- Animations ---------- */
@keyframes derive {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.12); }
}
@keyframes flotte {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -14px; }
}
@keyframes apparait {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.apparait { animation: apparait .7s cubic-bezier(.2, .7, .3, 1) both; }
.delai-1 { animation-delay: .1s; }
.delai-2 { animation-delay: .2s; }
.delai-3 { animation-delay: .3s; }
.delai-4 { animation-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
    .apparait, .flotte, .halo { animation: none !important; }
}

/* ---------- Authentification ---------- */
.page-auth { background: var(--fond); min-height: 100vh; }
.auth {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 64px 20px;
}
.auth::before, .auth::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .22;
    pointer-events: none;
}
.auth::before { width: 440px; height: 440px; background: var(--cyan); top: -140px; left: -120px; }
.auth::after  { width: 480px; height: 480px; background: var(--violet); bottom: -180px; right: -140px; }
.auth-logo img { height: 34px; margin-bottom: 36px; }
.auth-carte {
    position: relative;
    z-index: 1;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: 0 24px 60px rgba(4, 7, 23, .08);
    padding: 36px 32px;
    width: 100%;
    max-width: 430px;
}
.auth-carte h1 { margin: 0 0 24px; font-size: 24px; letter-spacing: -.02em; text-align: center; }
.auth-carte label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.auth-carte input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bordure);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-carte input:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(27, 87, 254, .15); }
.auth-carte .bouton-plein, .auth-carte button[type=submit] {
    width: 100%;
    margin-top: 24px;
    padding: 13px 26px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    background: var(--degrade);
    color: #fff;
    box-shadow: 0 10px 26px rgba(27, 87, 254, .3);
    transition: transform .2s ease, box-shadow .2s ease;
}
.auth-carte button[type=submit]:hover { transform: translateY(-1px); }
.auth-ligne { display: flex; gap: 14px; }
.auth-ligne > div { flex: 1; }
.auth-erreur {
    background: #fdecea;
    color: #b3261e;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    margin: 0 0 8px;
    list-style-position: inside;
}
.auth-lien { text-align: center; font-size: 14px; margin: 20px 0 0; color: var(--gris); }

/* ---------- Barre d'application (connecté) ---------- */
.barre-app {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(var(--verre), .85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bordure);
    padding: 10px clamp(14px, 4vw, 36px);
}
.barre-logo { display: flex; align-items: center; }
.barre-logo img { height: 32px; }
.barre-recherche { flex: 1; max-width: 420px; position: relative; }
.recherche-loupe {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris);
    pointer-events: none;
}
.barre-recherche input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border-radius: 999px;
    border: 1px solid var(--bordure);
    background: var(--fond);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.barre-recherche input:focus { border-color: var(--bleu); background: var(--blanc); }
.barre-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.barre-nav > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    color: var(--gris);
    transition: background .15s ease, color .15s ease;
}
.barre-nav > a:hover { background: var(--fond); color: var(--encre); }
.barre-avatar {
    overflow: hidden;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    transition: border-color .15s ease;
}
.barre-avatar:hover, .menu-conteneur.ouvert .barre-avatar { border-color: var(--bleu); }

/* ---------- Menus déroulants ---------- */
.menu-conteneur { position: relative; display: inline-flex; margin-left: 2px; }
.barre-explorer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    color: var(--gris);
    transition: background .15s ease, color .15s ease;
}
.barre-explorer:hover, .menu-conteneur.ouvert .barre-explorer { background: var(--fond); color: var(--encre); }
.menu-deroulant {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 250px;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(4, 7, 23, .14);
    padding: 8px;
    z-index: 30;
    animation: apparait .18s cubic-bezier(.2, .7, .3, 1) both;
}
.menu-identite {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 6px;
}
.menu-identite div { display: flex; flex-direction: column; min-width: 0; }
.menu-identite strong { font-size: 14.5px; }
.menu-identite small { color: var(--gris); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.menu-deroulant a, .menu-deroulant form button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--encre);
    border-radius: 10px;
    text-align: left;
}
.menu-deroulant a:hover, .menu-deroulant form button:hover { background: var(--fond); }
.menu-deroulant form button { color: #b3261e; }
.menu-deroulant .icone { color: var(--gris); }
.menu-deroulant form button .icone { color: inherit; }
.badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #FF3B5C;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}
/* ---------- Icônes ---------- */
.icone { flex-shrink: 0; vertical-align: -0.18em; }
.bouton-icone { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Avatars ---------- */
.avatar-reel { border-radius: 50%; object-fit: cover; display: inline-block; flex-shrink: 0; }
.avatar-initiales {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
}

/* ---------- Messages flash ---------- */
.flash {
    max-width: 640px;
    margin: 14px auto 0;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}
.flash-succes { background: #e7f6ec; color: #1c7c3c; }
.flash-erreur { background: #fdecea; color: #b3261e; }

/* ---------- Colonne applicative ---------- */
.app-colonne {
    max-width: 640px;
    margin: 22px auto 60px;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.app-etroite { max-width: 560px; }
.vide {
    background: var(--blanc);
    border: 1px dashed var(--bordure);
    border-radius: var(--rayon);
    text-align: center;
    padding: 36px 24px;
    color: var(--gris);
}
.carte-page {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 26px;
}
.carte-page h1 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 18px; }
.titre-compteur { color: var(--gris); font-weight: 500; }
.sous-titre { font-size: 16px; margin: 0 0 14px; }
.texte-doux { color: var(--gris); line-height: 1.6; }

/* ---------- Composeur ---------- */
.composeur {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 18px;
}
.composeur-haut { display: flex; gap: 12px; }
.composeur textarea, .carte-page textarea {
    flex: 1;
    width: 100%;
    border: none;
    resize: vertical;
    font: inherit;
    font-size: 15px;
    outline: none;
    padding: 9px 0;
    min-height: 44px;
}
.carte-page textarea {
    border: 1px solid var(--bordure);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 6px 0 18px;
}
.carte-page label { font-size: 14px; font-weight: 600; }
.composeur-bas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--bordure);
    padding-top: 12px;
    margin-top: 8px;
}
.composeur-photo {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--gris);
    display: flex;
    align-items: center;
    gap: 8px;
}
.composeur-photo:hover { color: var(--bleu); }
.nom-fichier { font-size: 12px; color: var(--bleu); font-weight: 500; }

/* ---------- Publications ---------- */
.post {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 18px;
}
.post-entete { display: flex; align-items: center; gap: 11px; }
.post-auteur { display: block; font-weight: 700; color: var(--encre); font-size: 15px; }
.post-auteur:hover { text-decoration: underline; }
.post-date { font-size: 12.5px; color: var(--gris); }
.post-supprimer { margin-left: auto; }
.post-supprimer button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gris);
    font-size: 15px;
    padding: 6px 9px;
    border-radius: 9px;
}
.post-supprimer button:hover { background: var(--fond); color: #b3261e; }
.post-contenu { margin: 13px 0 0; line-height: 1.6; font-size: 15px; white-space: pre-line; }
.post-photo {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 13px;
    display: block;
}
.post-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--bordure);
}
.action-jaime {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--gris);
    padding: 6px 10px;
    border-radius: 999px;
    transition: background .15s ease, transform .1s ease;
}
.action-jaime:hover { background: var(--fond); }
.action-jaime:active { transform: scale(.94); }
.action-jaime .coeur { transition: fill .15s ease, color .15s ease; }
.action-jaime.actif { color: #FF3B5C; }
.action-jaime.actif .coeur { fill: #FF3B5C; }
.action-commentaires {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: var(--gris);
    font-weight: 600;
}

.commentaires { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.commentaire { display: flex; gap: 9px; align-items: flex-start; }
.commentaire-bulle {
    background: var(--fond);
    border-radius: 14px;
    padding: 8px 13px;
    font-size: 14px;
    line-height: 1.5;
}
.commentaire-auteur { display: block; font-weight: 700; color: var(--encre); font-size: 13px; }
.commentaire-form { display: flex; gap: 9px; margin-top: 13px; }
.commentaire-form input[type="text"] {
    flex: 1;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    padding: 9px 16px;
    font: inherit;
    font-size: 14px;
    outline: none;
    background: var(--fond);
}
.commentaire-form input[type="text"]:focus { border-color: var(--bleu); background: var(--blanc); }
.commentaire-form button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--bleu);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}
.page-suivante { text-align: center; }

/* ---------- Profil ---------- */
.profil-carte {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 26px;
}
.profil-entete { display: flex; gap: 20px; align-items: center; }
.profil-infos h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.profil-meta { color: var(--gris); font-size: 14px; margin: 0; }
.profil-bio { margin: 10px 0 0; line-height: 1.6; font-size: 14.5px; }
.profil-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.inactif { opacity: .6; cursor: default; }
.parametres-avatar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

/* ---------- Lignes membres / conversations / notifications ---------- */
.ligne-membre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 10px;
    border-radius: 12px;
    color: inherit;
}
a.ligne-membre:hover, .ligne-membre:hover { background: var(--fond); }
.ligne-identite { display: flex; align-items: center; gap: 12px; color: var(--encre); min-width: 0; }
.ligne-identite span { display: flex; flex-direction: column; min-width: 0; }
.ligne-identite small { color: var(--gris); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ligne-actions .bouton { padding: 8px 16px; font-size: 13.5px; }
.ligne-fin { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ligne-fin .badge { position: static; }
.ligne-conversation.non-lu strong { font-weight: 800; }
.ligne-membre.non-lu { background: #eef4ff; }
.etiquette { font-size: 13px; color: var(--gris); font-weight: 600; }
.amis-rapides { display: flex; gap: 14px; flex-wrap: wrap; }
.amis-rapides a { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--encre); font-weight: 600; }

/* ---------- Recherche ---------- */
.recherche-form { display: flex; gap: 10px; margin-bottom: 18px; }
.recherche-form input {
    flex: 1;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    padding: 11px 18px;
    font: inherit;
    font-size: 15px;
    outline: none;
}
.recherche-form input:focus { border-color: var(--bleu); }

/* ---------- Messagerie ---------- */
.chat, .chat-groupe { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-entete {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bordure);
}
.chat-retour {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gris);
    padding: 7px;
    border-radius: 9px;
}
.chat-retour:hover { background: var(--fond); color: var(--encre); }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.chat-bulle {
    max-width: 75%;
    padding: 9px 14px;
    border-radius: 17px;
    font-size: 14.5px;
    line-height: 1.45;
    overflow-wrap: break-word;
    white-space: pre-line;
}
.chat-bulle.recu { background: var(--fond); border: 1px solid var(--bordure); align-self: flex-start; border-bottom-left-radius: 6px; }
.chat-bulle.envoye { background: var(--degrade); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.chat-form { display: flex; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--bordure); }
.chat-form input {
    flex: 1;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    padding: 10px 17px;
    font: inherit;
    font-size: 14.5px;
    outline: none;
    background: var(--fond);
}
.chat-form input:focus { border-color: var(--bleu); background: var(--blanc); }
.chat-form .bouton { padding: 10px 22px; font-size: 14px; }
.bouton-envoyer { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; }

@media (max-width: 620px) {
    .barre-recherche { max-width: none; }
    .barre-app { gap: 10px; }
    .chat, .chat-groupe { height: calc(100vh - 130px); }
}

/* ---------- Pages fonctionnalités (capsules, lieux, correspondants, commerces) ---------- */
.entete-fonction {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
}
.entete-fonction h1 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 6px; }
.entete-fonction p { color: var(--gris); line-height: 1.55; margin: 0; font-size: 14px; max-width: 420px; }
.entete-fonction > div { flex: 1; min-width: 220px; }
.entete-fonction .bouton { flex-shrink: 0; }
.entete-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--degrade);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(27, 87, 254, .28);
}
.section-titre {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    letter-spacing: -.01em;
    margin: 6px 0 -6px;
    color: var(--encre);
}
.petite-note { font-size: 12.5px; }

/* Formulaires des pages fonctionnalités */
.carte-page select, .carte-page .champ, .carte-page input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bordure);
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    outline: none;
    background: var(--blanc);
    margin: 6px 0 14px;
}
.carte-page select:focus, .carte-page .champ:focus, .carte-page input[type="date"]:focus { border-color: var(--bleu); }
.carte-page form .bouton[type="submit"] { margin-top: 18px; }
.raccourcis-dates { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.raccourcis-dates button {
    border: 1px solid var(--bordure);
    background: var(--fond);
    border-radius: 999px;
    padding: 6px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gris);
    cursor: pointer;
}
.raccourcis-dates button:hover { border-color: var(--bleu); color: var(--bleu); }

/* Capsules */
.capsule {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 20px;
}
.capsule-ouverte { border-top: 3px solid; border-image: var(--degrade) 1; }
.capsule-contenu { margin: 14px 0 0; line-height: 1.7; font-size: 15px; white-space: pre-line; }
.capsule-cadenas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--fond);
    border: 1px solid var(--bordure);
    color: var(--gris);
    flex-shrink: 0;
}
.capsule-date { font-size: 13px; color: var(--gris); text-align: right; flex-shrink: 0; }

/* Murs de lieux */
.lieu-recherche { position: relative; }
.lieu-recherche input {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    outline: none;
}
.lieu-recherche input:focus { border-color: var(--bleu); }
.lieu-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(4, 7, 23, .14);
    padding: 6px;
    z-index: 20;
}
.lieu-suggestions button {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    padding: 10px 12px;
    border-radius: 10px;
}
.lieu-suggestions button:hover { background: var(--fond); }
.lieu-suggestions small { color: var(--gris); font-size: 12.5px; }
.lieu-pastille {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--degrade);
    color: #fff;
    flex-shrink: 0;
}
.lieu-pastille-grande { width: 54px; height: 54px; border-radius: 16px; }
.lieu-entete {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
}
.lieu-entete > div { flex: 1; min-width: 200px; }
.lieu-entete h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.post-lieu {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bleu);
    margin-left: 8px;
}

/* Correspondants */
.lettres-entete { padding: 0 0 14px; margin-bottom: 4px; }
.lettres-intro, .lettres-attente { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.lettre {
    background: #FDFBF7;
    border: 1px solid #EFE8D8;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 14px 0;
    font-size: 14.5px;
}
.lettre-moi { background: var(--fond); border-color: var(--bordure); }
.lettre header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}
.lettre header time { color: var(--gris); }
.lettre p { margin: 0; line-height: 1.7; white-space: pre-line; }
.lettre-form label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }

/* Commerces */
.commerce-vignette {
    width: 44px; height: 44px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.commerce-fiche { padding: 0; overflow: hidden; }
.commerce-photo { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.commerce-corps { padding: 26px; }
.commerce-corps h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.commerce-description { line-height: 1.7; margin: 16px 0 4px; white-space: pre-line; }
.commerce-tenu { font-size: 13.5px; margin-top: 18px; }
.recherche-form select {
    border: 1px solid var(--bordure);
    border-radius: 999px;
    padding: 0 16px;
    font: inherit;
    font-size: 14px;
    outline: none;
    background: var(--blanc);
}

/* ---------- Fil : grille à 3 colonnes ---------- */
.fil-grille {
    display: grid;
    grid-template-columns: 250px minmax(0, 600px) 300px;
    gap: 22px;
    justify-content: center;
    align-items: start;
    max-width: 1260px;
    margin: 22px auto 60px;
    padding: 0 16px;
}
.fil-centre { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.fil-gauche, .fil-droite {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: none;
}
.fil-gauche::-webkit-scrollbar, .fil-droite::-webkit-scrollbar { display: none; }

.panneau {
    background: var(--blanc);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 16px;
}
.panneau-profil {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 14px;
    color: var(--encre);
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 8px;
}
.panneau-profil span { display: flex; flex-direction: column; min-width: 0; }
.panneau-profil strong { font-size: 15px; }
.panneau-profil small { color: var(--gris); font-size: 12.5px; }
.panneau-liens { display: flex; flex-direction: column; }
.panneau-liens a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--encre);
}
.panneau-liens a:hover { background: var(--fond); }
.panneau-liens a .icone { color: var(--gris); }
.panneau-liens hr { border: none; border-top: 1px solid var(--bordure); margin: 8px 10px; }

.panneau-titre {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    letter-spacing: -.01em;
    margin: 0 0 12px;
    color: var(--encre);
}
.panneau-titre .icone { color: var(--bleu); }
.panneau-texte { font-size: 13px; color: var(--gris); line-height: 1.55; margin: 0 0 10px; }
.panneau-ligne {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--gris);
    margin: 0 0 10px;
    line-height: 1.4;
}
.panneau-ligne span { display: flex; flex-direction: column; min-width: 0; }
.panneau-ligne strong { color: var(--encre); font-size: 13.5px; }
.panneau-ligne small { font-size: 12px; color: var(--gris); }
.panneau-ligne-lien { border-radius: 10px; padding: 5px 6px; margin: 0 -6px 4px; }
.panneau-ligne-lien:hover { background: var(--fond); }
.panneau-action { display: inline-block; font-size: 13px; font-weight: 700; margin-top: 2px; }
.lieu-pastille-mini { width: 28px; height: 28px; flex-direction: row !important; }
.panneau-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.panneau-suggestion .panneau-ligne { flex: 1; margin-bottom: 4px; }
.bouton-mini { padding: 6px 13px; font-size: 12.5px; }
.fil-pied { font-size: 12px; color: var(--gris); padding: 0 6px; }
.fil-pied a { color: var(--gris); text-decoration: underline; }

@media (max-width: 1180px) {
    .fil-grille { grid-template-columns: 240px minmax(0, 600px); }
    .fil-droite { display: none; }
}
@media (max-width: 860px) {
    .fil-grille { grid-template-columns: minmax(0, 1fr); }
    .fil-gauche { display: none; }
}

/* ---------- Réactions ---------- */
.reaction-zone { position: relative; }
.action-reagir {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--gris);
    padding: 6px 10px;
    border-radius: 999px;
    transition: background .15s ease, transform .1s ease;
}
.action-reagir:hover { background: rgba(var(--teinte), .06); }
.action-reagir:active { transform: scale(.94); }
.action-reagir.actif { color: var(--bleu); }
.reaction-resume { display: inline-flex; align-items: center; font-size: 15px; letter-spacing: -2px; }
.reaction-resume .icone { letter-spacing: normal; }
.reactions-palette {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    display: flex;
    gap: 2px;
    background: rgba(var(--verre), .85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(var(--verre), .8);
    border-radius: 999px;
    padding: 6px 8px;
    box-shadow: 0 14px 36px rgba(13, 43, 82, .18);
    z-index: 15;
    animation: apparait .15s ease both;
}
.reactions-palette[hidden] { display: none; }
.reactions-palette button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 5px;
    border-radius: 50%;
    transition: transform .12s ease, background .12s ease;
}
.reactions-palette button:hover { transform: scale(1.3) translateY(-3px); }
.reactions-palette button.choisie { background: rgba(27, 87, 254, .14); }

/* ---------- Partage ---------- */
.action-partager {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--gris);
    padding: 6px 10px;
    border-radius: 999px;
    margin-left: auto;
}
.action-partager:hover { background: rgba(var(--teinte), .06); color: var(--encre); }
.partage-form { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.partage-form[hidden] { display: none; }
.partage-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    border: 1px solid rgba(var(--teinte), .12);
    border-radius: 999px;
    padding: 9px 16px;
    font: inherit;
    font-size: 14px;
    outline: none;
    background: rgba(var(--verre), .62);
}
.post-origine {
    margin: 13px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    background: rgba(var(--teinte), .035);
}
.post-origine header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.post-origine header a { display: inline-flex; align-items: center; gap: 8px; color: var(--encre); }
.post-origine header time { color: var(--gris); margin-left: auto; }
.post-origine p { margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-line; }
.post-origine-vide { color: var(--gris); font-size: 13.5px; font-style: italic; }
.post-signaler {
    margin-left: auto;
    color: var(--gris);
    opacity: .4;
    padding: 6px 8px;
    border-radius: 9px;
    display: inline-flex;
}
.post-signaler:hover { opacity: 1; background: rgba(var(--teinte), .06); color: #b3261e; }

/* ---------- Ce jour-là ---------- */
.panneau-souvenir { border-top: 3px solid; border-image: var(--degrade) 1; }
.souvenir small { color: var(--gris); font-size: 12px; }
.souvenir p { margin: 4px 0 12px; font-size: 13.5px; line-height: 1.55; font-style: italic; }

/* ---------- Capsule collective ---------- */
.entete-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.choix-participants {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0 16px;
    max-height: 260px;
    overflow-y: auto;
}
.choix-participant {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500 !important;
}
.choix-participant:hover { background: rgba(var(--teinte), .05); }
.choix-participant input { width: auto !important; margin: 0 !important; accent-color: var(--bleu); }

/* ---------- Invitations ---------- */
.invitation-code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .5px; }

/* ---------- Carte de France ---------- */
.carte-france { padding: 18px; }
#carte-lieux { height: 380px; border-radius: 12px; z-index: 1; }

/* ---------- Modération ---------- */
.signalement-entete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.signalement-entete small { color: var(--gris); }
.signalement-raison { font-style: italic; color: var(--encre); margin: 0 0 12px; }
.signalement .ligne-actions { margin-top: 14px; }
.bouton-danger { color: #b3261e; border-color: rgba(179, 38, 30, .3); }
.bouton-danger:hover { background: rgba(179, 38, 30, .07); }

/* ============================================================
   Talk — dock de conversations flottantes
   ============================================================ */
.talk-bouton {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 12px;
    color: var(--gris);
    transition: background .15s ease, color .15s ease;
}
.talk-bouton:hover { background: rgba(var(--teinte), .06); color: var(--encre); }

.talk-menu { min-width: 320px; max-width: 340px; }
.talk-menu-entete {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 12px 12px;
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 6px;
}
.talk-menu-entete strong { font-size: 17px; letter-spacing: -.02em; }
.talk-menu-entete a { font-size: 13px; font-weight: 700; }
.talk-menu-ligne {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
    padding: 9px 10px;
    border-radius: 12px;
}
.talk-menu-ligne:hover { background: rgba(var(--teinte), .06); }
.talk-menu-ligne .talk-menu-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.talk-menu-ligne strong { font-size: 14px; }
.talk-menu-ligne small { color: var(--gris); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-menu-ligne.non-lu strong { font-weight: 800; }
.talk-menu-ligne .badge { position: static; flex-shrink: 0; }
.talk-menu-vide { color: var(--gris); font-size: 13.5px; padding: 10px 12px; margin: 0; }

#talk-dock {
    position: fixed;
    bottom: 0;
    right: 14px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    z-index: 60;
}
@media (max-width: 539px) { #talk-dock { display: none; } }

.talk-fenetre {
    display: flex;
    flex-direction: column;
    width: 300px;
    height: 400px;
    background: rgba(var(--verre), .78);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(var(--verre), .8);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 40px rgba(13, 43, 82, .18);
    overflow: hidden;
    animation: talk-monte .22s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes talk-monte {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.talk-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--bordure);
    background: rgba(var(--verre), .5);
}
.talk-identite { display: flex; align-items: center; gap: 9px; color: var(--encre); min-width: 0; }
.talk-identite strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk-boutons { display: flex; gap: 2px; flex-shrink: 0; }
.talk-boutons button {
    border: none;
    background: none;
    cursor: pointer;
    width: 28px; height: 28px;
    border-radius: 8px;
    color: var(--gris);
    font-size: 15px;
    line-height: 1;
}
.talk-boutons button:hover { background: rgba(var(--teinte), .07); color: var(--encre); }
.talk-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.talk-messages .chat-bulle { font-size: 13.5px; padding: 8px 12px; }
.talk-form {
    display: flex;
    gap: 8px;
    padding: 9px 10px;
    border-top: 1px solid var(--bordure);
}
.talk-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(var(--teinte), .12);
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    font-size: 13.5px;
    outline: none;
    background: rgba(var(--verre), .65);
}
.talk-form input:focus { border-color: var(--bleu); background: rgba(var(--verre), .95); }
.talk-form button {
    border: none;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--degrade);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.talk-bulle {
    position: relative;
    width: 52px; height: 52px;
    border: 2px solid rgba(var(--verre), .9);
    border-radius: 50%;
    cursor: pointer;
    background: none;
    padding: 0;
    margin-bottom: 14px;
    box-shadow: 0 10px 28px rgba(13, 43, 82, .25);
    transition: transform .15s ease;
    animation: talk-monte .22s ease both;
}
.talk-bulle:hover { transform: translateY(-3px) scale(1.05); }
.talk-bulle .avatar-reel, .talk-bulle .avatar-initiales { width: 100% !important; height: 100% !important; }
.talk-bulle .badge { top: -4px; right: -4px; }

/* Médias dans les bulles (Talk) */
.bulle-media {
    display: block;
    max-width: 100%;
    max-height: 220px;
    border-radius: 12px;
    margin-top: 6px;
}
.chat-bulle .bulle-media:only-child { margin-top: 0; }
.bulle-citation {
    font-size: .8rem;
    opacity: .75;
    border-left: 3px solid currentColor;
    padding-left: 8px;
    margin-bottom: 6px;
}
.chat-bulle audio { display: block; max-width: 100%; margin-top: 4px; }
.talk-media, .commentaire-media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gris);
    width: 34px; height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.talk-media:hover, .commentaire-media:hover { background: rgba(var(--teinte), .07); color: var(--bleu); }

/* Commentaires : réponses imbriquées + médias */
.commentaire-corps { min-width: 0; flex: 1; }
.commentaire-reponse { margin: 8px 0 0 10px; display: flex; gap: 8px; }
.commentaire-repondre {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--gris);
    padding: 3px 8px;
    border-radius: 8px;
}
.commentaire-repondre:hover { color: var(--bleu); background: rgba(var(--teinte), .05); }
.commentaire-photo {
    display: block;
    max-width: 220px;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 6px;
}
.reponse-indicateur {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bleu);
    background: rgba(27, 87, 254, .09);
    border-radius: 999px;
    padding: 4px 6px 4px 12px;
    white-space: nowrap;
}
.reponse-indicateur[hidden] { display: none; }
.reponse-annuler {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--bleu);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
}
.commentaire-form { flex-wrap: wrap; align-items: center; }

/* ---------- Profil 2.0 ---------- */
.profil-entete-carte { padding: 0; overflow: hidden; }
.profil-couverture {
    height: 190px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--bleu) 50%, var(--violet) 100%);
    background-size: cover;
    background-position: center;
}
.profil-identite {
    display: flex;
    gap: 18px;
    padding: 0 26px;
    margin-top: -46px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.profil-avatar-grand .avatar-reel, .profil-avatar-grand .avatar-initiales {
    border: 4px solid rgba(var(--verre), .95);
    box-shadow: 0 10px 26px rgba(13, 43, 82, .22);
}
.profil-identite .profil-infos { flex: 1; min-width: 240px; padding-top: 52px; }
.profil-infos h1 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.02em; }
.profil-badges { display: flex; gap: 7px; flex-wrap: wrap; margin: 2px 0 8px; }
.profil-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--bleu-fonce);
    background: rgba(27, 87, 254, .1);
    border: 1px solid rgba(27, 87, 254, .18);
    border-radius: 999px;
    padding: 4px 11px;
    cursor: help;
}
.profil-details { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 0; }
.profil-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gris);
}
a.profil-detail:hover { color: var(--bleu); }
.profil-entete-carte .profil-actions { padding: 18px 26px 22px; margin-top: 14px; }
.profil-entete-carte .profil-bio { max-width: 560px; }

.profil-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.stat-tuile {
    background: rgba(var(--verre), .58);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(var(--verre), .72);
    border-radius: var(--rayon);
    box-shadow: 0 10px 36px rgba(13, 43, 82, .08), inset 0 1px 0 rgba(255, 255, 255, .85);
    padding: 16px 18px;
    text-align: center;
}
.stat-tuile strong {
    display: block;
    font-size: 24px;
    font-weight: 800;
    background: var(--degrade);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-tuile span { font-size: 12.5px; color: var(--gris); font-weight: 600; }

.profil-mot-futur {
    background: rgba(var(--verre), .58);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(var(--verre), .72);
    border-top: 3px solid;
    border-image: var(--degrade) 1;
    border-radius: var(--rayon);
    padding: 20px 24px;
    box-shadow: 0 10px 36px rgba(13, 43, 82, .08);
}
.profil-mot-futur h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gris);
    margin: 0 0 10px;
}
.profil-mot-futur p { margin: 0; font-size: 15.5px; line-height: 1.65; font-style: italic; }

.profil-commerce {
    display: flex;
    align-items: center;
    gap: 13px;
    background: rgba(var(--verre), .58);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(var(--verre), .72);
    border-radius: var(--rayon);
    padding: 14px 18px;
    color: var(--encre);
    box-shadow: 0 10px 36px rgba(13, 43, 82, .08);
}
.profil-commerce span:last-child { display: flex; flex-direction: column; }
.profil-commerce small { color: var(--gris); font-size: 12.5px; }
.profil-commerce:hover { border-color: rgba(27, 87, 254, .3); }

.profil-onglets {
    display: flex;
    gap: 4px;
    background: rgba(var(--verre), .58);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(var(--verre), .72);
    border-radius: 999px;
    padding: 5px;
    box-shadow: 0 10px 36px rgba(13, 43, 82, .08);
}
.profil-onglets a {
    flex: 1;
    text-align: center;
    padding: 9px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gris);
}
.profil-onglets a:hover { color: var(--encre); }
.profil-onglets a.actif { background: var(--degrade); color: #fff; box-shadow: 0 6px 18px rgba(27, 87, 254, .3); }

.profil-annees { display: flex; gap: 8px; flex-wrap: wrap; }
.profil-annees a {
    padding: 6px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gris);
    background: rgba(var(--verre), .55);
    border: 1px solid rgba(var(--teinte), .12);
}
.profil-annees a.actif { background: var(--encre); border-color: var(--encre); color: var(--blanc); }

.profil-galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.profil-galerie img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    transition: transform .15s ease;
}
.profil-galerie a:hover img { transform: scale(1.03); }

.profil-grille-amis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.profil-ami {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(var(--verre), .58);
    border: 1px solid rgba(var(--verre), .72);
    border-radius: var(--rayon);
    padding: 18px 10px 14px;
    color: var(--encre);
    text-align: center;
    box-shadow: 0 8px 26px rgba(13, 43, 82, .07);
    transition: transform .15s ease;
}
.profil-ami:hover { transform: translateY(-3px); }
.profil-ami small { color: var(--gris); }

.parametres-couverture { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.case-a-cocher {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin-top: 34px;
    cursor: pointer;
    font-weight: 500 !important;
}
.case-a-cocher input { width: auto !important; margin: 0 !important; accent-color: var(--bleu); }

@media (max-width: 620px) {
    .profil-stats { grid-template-columns: 1fr; }
    .profil-identite { margin-top: -58px; }
    .profil-identite .profil-infos { padding-top: 0; }
}

/* ---------- Visionneuse (lightbox) ---------- */
#visionneuse {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 7, 23, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: zoom-out;
    animation: apparait .15s ease both;
    padding: 28px;
}
#visionneuse[hidden] { display: none; }
#visionneuse img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 14px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
#visionneuse button {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 42px; height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
#visionneuse button:hover { background: rgba(255, 255, 255, .26); }
.post-photo, .commentaire-photo, .bulle-media, .commerce-photo, .profil-galerie img { cursor: zoom-in; }

/* ---------- Vidéos ---------- */
.post-video {
    width: 100%;
    max-height: 460px;
    border-radius: 12px;
    margin-top: 13px;
    display: block;
    background: #04071708;
}

/* ---------- Édition de publication ---------- */
.post-outils { margin-left: auto; display: flex; gap: 2px; }
.post-outils .post-supprimer { margin-left: 0; }
.post-modifier {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gris);
    padding: 6px 9px;
    border-radius: 9px;
    display: inline-flex;
}
.post-modifier:hover { background: rgba(var(--teinte), .06); color: var(--bleu); }
.post-edition { margin-top: 13px; }
.post-edition[hidden] { display: none; }
.post-edition textarea {
    width: 100%;
    border: 1px solid rgba(var(--teinte), .14);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    outline: none;
    resize: vertical;
    background: rgba(var(--verre), .7);
}
.post-edition textarea:focus { border-color: var(--bleu); }
.edition-boutons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ---------- Actions des commentaires ---------- */
.commentaire-barre {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 2px 0 0 6px;
    flex-wrap: wrap;
}
.commentaire-action {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--gris);
    padding: 3px 8px;
    border-radius: 8px;
}
.commentaire-action:hover { color: var(--bleu); background: rgba(var(--teinte), .05); }
.commentaire-suppr { display: inline-flex; }
.commentaire-suppr .commentaire-action:hover { color: #b3261e; }
.commentaire-modifie { font-size: 11.5px; color: var(--gris); font-style: italic; margin-left: 4px; }
.commentaire-edition {
    display: flex;
    gap: 7px;
    margin: 6px 0 0 6px;
}
.commentaire-edition[hidden] { display: none; }
.commentaire-edition input[type="text"] {
    flex: 1;
    border: 1px solid rgba(var(--teinte), .14);
    border-radius: 999px;
    padding: 7px 14px;
    font: inherit;
    font-size: 13.5px;
    outline: none;
    background: rgba(var(--verre), .7);
}
.commentaire-edition button[type="submit"] {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--bleu);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

/* ---------- E2EE ---------- */
.e2ee-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 7, 23, .6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
}
.e2ee-carte {
    background: rgba(var(--verre), .97);
    border-radius: 18px;
    padding: 28px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.e2ee-carte h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.e2ee-carte p { margin: 0; font-size: 14px; color: var(--gris); line-height: 1.55; }
.e2ee-carte input {
    border: 1px solid var(--bordure);
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    outline: none;
}
.e2ee-carte input:focus { border-color: var(--bleu); }
.chat-e2ee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gris);
    background: rgba(27, 87, 254, .06);
    margin: 0;
    padding: 7px 12px;
    border-bottom: 1px solid var(--bordure);
}
.chat-e2ee[hidden] { display: none; }
.talk-cadenas { font-size: 11px; margin-left: 2px; }

/* Accusé de lecture et indicateur de frappe */
.message-vu {
    align-self: flex-end;
    font-size: 11px;
    font-weight: 700;
    color: var(--gris);
    margin: -2px 6px 0 0;
}
.frappe-indicateur {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 12.5px;
    font-style: italic;
    color: var(--gris);
    margin: 0;
    padding: 4px 18px 8px;
}
.frappe-indicateur[hidden] { display: none; }
.frappe-points span {
    animation: frappe-pulse 1.2s infinite;
    display: inline-block;
}
.frappe-points span:nth-child(2) { animation-delay: .2s; }
.frappe-points span:nth-child(3) { animation-delay: .4s; }
@keyframes frappe-pulse {
    0%, 60%, 100% { opacity: .25; }
    30% { opacity: 1; }
}
.talk-fenetre .frappe-indicateur { padding: 2px 14px 6px; }

/* ---------- Appels audio/vidéo ---------- */
.chat-appels { display: flex; gap: 4px; margin-left: auto; }
.appel-bouton {
    border: none;
    background: none;
    cursor: pointer;
    width: 38px; height: 38px;
    border-radius: 11px;
    color: var(--gris);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.appel-bouton:hover { background: rgba(var(--teinte), .07); color: var(--bleu); }

#appel-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    background: rgba(4, 7, 23, .94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    animation: apparait .2s ease both;
}
.appel-entete {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 26px 20px 10px;
}
.appel-entete strong { font-size: 20px; letter-spacing: -.02em; }
.appel-etat { font-size: 13.5px; color: rgba(255, 255, 255, .65); }
.appel-scene {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    min-height: 0;
}
.appel-distant {
    max-width: 100%;
    max-height: 100%;
    border-radius: 16px;
    background: #000;
}
.appel-local {
    position: absolute;
    bottom: 26px;
    right: 26px;
    width: 130px;
    border-radius: 12px;
    border: 2px solid rgba(var(--verre), .4);
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.appel-audio-pastille { display: none; }
.appel-scene-audio .appel-distant, .appel-scene-audio .appel-local { width: 1px; height: 1px; opacity: 0; position: absolute; }
.appel-scene-audio .appel-audio-pastille {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: var(--degrade);
    font-size: 48px;
    font-weight: 800;
    box-shadow: 0 20px 60px rgba(27, 87, 254, .4);
    animation: flotte 5s ease-in-out infinite;
}
.appel-controles {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 18px 20px 34px;
}
.appel-controles button {
    width: 58px; height: 58px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.appel-controles button:hover { background: rgba(255, 255, 255, .26); transform: translateY(-2px); }
.appel-controles button.coupe { background: rgba(255, 255, 255, .85); color: var(--encre); text-decoration: line-through; }
.appel-raccrocher { background: #E53935 !important; transform: rotate(135deg); }
.appel-raccrocher:hover { background: #c62828 !important; transform: rotate(135deg) translateX(-2px); }

#appel-entrant {
    position: fixed;
    top: 72px;
    right: 18px;
    z-index: 115;
    animation: talk-monte .25s ease both;
}
.appel-entrant-carte {
    background: rgba(var(--verre), .97);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(4, 7, 23, .3);
    padding: 18px 20px;
    min-width: 260px;
}
.appel-entrant-carte p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--gris); }
.appel-entrant-carte strong { color: var(--encre); font-size: 15.5px; }
.appel-entrant-actions { display: flex; gap: 10px; }
.appel-accepter { background: #2E7D32; color: #fff; flex: 1; padding: 10px; }
.appel-accepter:hover { background: #1B5E20; }
.appel-refuser { background: #E53935; color: #fff; flex: 1; padding: 10px; }
.appel-refuser:hover { background: #c62828; }

/* ---------- Pages simples ---------- */
.fil, .page-texte { max-width: 720px; margin: 48px auto; padding: 0 24px; }
.page-texte h1, .fil h1 { font-size: 28px; letter-spacing: -.02em; }
.page-texte p, .fil p, .page-texte li { line-height: 1.7; color: var(--gris); }
.page-texte h2 { font-size: 19px; margin: 32px 0 8px; letter-spacing: -.01em; }
.page-texte ul { padding-left: 22px; }

@media (max-width: 620px) {
    .auth-ligne { flex-direction: column; gap: 0; }
    .nav-actions .lien-discret { display: none; }
    .carte-chat, .carte-notif { margin-top: 0; }
    .pied { justify-content: center; text-align: center; }
}

/* ============================================================
   Thème « verre dépoli » — s'applique par-dessus les composants
   ============================================================ */

/* Fond ambiant : halos de couleur fixes + vagues discrètes que le verre vient flouter */
body { background: transparent; }
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 420' preserveAspectRatio='none'%3E%3Cpath d='M0,180 C240,100 480,260 720,180 S1200,100 1440,180 L1440,420 L0,420 Z' fill='%231B57FE' fill-opacity='0.045'/%3E%3Cpath d='M0,250 C260,180 500,320 740,250 S1180,180 1440,250 L1440,420 L0,420 Z' fill='%237705F6' fill-opacity='0.04'/%3E%3Cpath d='M0,320 C240,260 480,380 720,320 S1200,260 1440,320 L1440,420 L0,420 Z' fill='%230093FD' fill-opacity='0.05'/%3E%3C/svg%3E") no-repeat bottom center / 100% 42vh,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none'%3E%3Cpath d='M0,120 C260,190 520,60 780,120 S1220,190 1440,120 L1440,0 L0,0 Z' fill='%230093FD' fill-opacity='0.035'/%3E%3Cpath d='M0,200 C280,260 560,140 840,200 S1240,250 1440,200 L1440,0 L0,0 Z' fill='%237705F6' fill-opacity='0.028'/%3E%3C/svg%3E") no-repeat top center / 100% 30vh,
        radial-gradient(1000px 700px at 88% -12%, rgba(119, 5, 246, .13), transparent 62%),
        radial-gradient(900px 700px at -12% 8%, rgba(0, 147, 253, .16), transparent 62%),
        radial-gradient(800px 600px at 52% 112%, rgba(27, 87, 254, .11), transparent 62%),
        var(--ambiance-fond);
}
body.page-accueil::before { opacity: .6; }
body.page-auth::before { display: none; } /* l'auth a déjà son dégradé */

/* Barre d'application */
.barre-app {
    background: rgba(var(--verre), .55);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-bottom: 1px solid rgba(var(--verre), .6);
    box-shadow: 0 1px 18px rgba(13, 43, 82, .05);
}

/* Panneaux de verre */
.panneau, .composeur, .post, .carte-page, .profil-carte, .capsule, .vide,
.entete-fonction, .lieu-entete, .auth-carte,
.atouts article, .uniques-grille article {
    background: rgba(var(--verre), .58);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(var(--verre), .72);
    box-shadow: 0 10px 36px rgba(13, 43, 82, .08), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.vide { border: 1px dashed rgba(var(--teinte), .16); }
.atouts article:hover, .uniques-grille article:hover {
    box-shadow: 0 26px 56px rgba(13, 43, 82, .13), inset 0 1px 0 rgba(255, 255, 255, .85);
}

/* Menus flottants — fond quasi opaque : le flou d'arrière-plan ne traverse pas
   la barre (limitation des backdrop-filter imbriqués), on ne s'y fie donc pas. */
.menu-deroulant, .lieu-suggestions {
    background: rgba(var(--verre), .96);
    backdrop-filter: blur(28px) saturate(1.6);
    -webkit-backdrop-filter: blur(28px) saturate(1.6);
    border: 1px solid rgba(var(--verre), .75);
    box-shadow: 0 24px 60px rgba(13, 43, 82, .18);
}

/* Champs posés sur le verre */
.auth-carte input, .carte-page select, .carte-page .champ, .carte-page input[type="date"],
.carte-page textarea, .commentaire-form input[type="text"], .chat-form input,
.recherche-form input, .recherche-form select, .lieu-recherche input, .barre-recherche input {
    background: rgba(var(--verre), .62);
    border-color: rgba(var(--teinte), .12);
}
.auth-carte input:focus, .carte-page select:focus, .carte-page .champ:focus,
.carte-page input[type="date"]:focus, .carte-page textarea:focus,
.commentaire-form input[type="text"]:focus, .chat-form input:focus,
.recherche-form input:focus, .lieu-recherche input:focus, .barre-recherche input:focus {
    background: rgba(var(--verre), .9);
    border-color: var(--bleu);
}

/* Survols : teinte translucide plutôt que gris opaque */
.barre-nav > a:hover, .barre-explorer:hover, .menu-conteneur.ouvert .barre-explorer,
.panneau-liens a:hover, .menu-deroulant a:hover, .menu-deroulant form button:hover,
a.ligne-membre:hover, .ligne-membre:hover, .panneau-ligne-lien:hover,
.lieu-suggestions button:hover, .action-jaime:hover, .post-supprimer button:hover,
.chat-retour:hover {
    background: rgba(var(--teinte), .06);
}
.ligne-membre.non-lu { background: rgba(27, 87, 254, .09); }
.raccourcis-dates button { background: rgba(var(--verre), .55); border-color: rgba(var(--teinte), .12); }

/* Bulles et éléments internes */
.commentaire-bulle { background: rgba(var(--teinte), .055); border: none; }
.chat-bulle.recu, .bulle-recue { background: rgba(var(--verre), .7); border-color: rgba(var(--teinte), .08); }
.capsule-cadenas, .bouton-secondaire { background: rgba(var(--verre), .55); border-color: rgba(var(--teinte), .12); }
.hero-badge { background: rgba(var(--verre), .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgba(var(--verre), .8); }
.bouton-ghost { background: rgba(var(--verre), .62); border-color: rgba(var(--teinte), .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Lettres : papier translucide */
.lettre {
    background: rgba(253, 251, 247, .82);
    border-color: rgba(190, 170, 120, .25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.lettre-moi { background: rgba(243, 248, 255, .78); border-color: rgba(27, 87, 254, .14); }

/* Messages flash */
.flash {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.flash-succes { background: rgba(231, 246, 236, .8); }
.flash-erreur { background: rgba(253, 236, 234, .85); }

/* Navigateurs sans backdrop-filter : on retombe sur du blanc quasi opaque */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .panneau, .composeur, .post, .carte-page, .profil-carte, .capsule, .vide,
    .entete-fonction, .lieu-entete, .auth-carte,
    .atouts article, .uniques-grille article,
    .menu-deroulant, .lieu-suggestions, .barre-app {
        background: rgba(var(--verre), .95);
    }
}

/* ---------- Bibliothèque de GIF (Talk) ---------- */
.chat-form, .talk-form { position: relative; align-items: center; }
.gif-bouton {
    flex-shrink: 0;
    border: 1.5px solid var(--bleu);
    background: transparent;
    color: var(--bleu);
    font: inherit;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 4px 7px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.gif-bouton:hover, .gif-bouton.actif { background: var(--bleu); color: #fff; }
.gif-panneau {
    position: absolute;
    left: 8px; right: 8px; bottom: calc(100% + 6px);
    height: min(380px, 62vh);
    display: flex;
    flex-direction: column;
    background: rgba(var(--verre), .97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bordure);
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(13, 43, 82, .22);
    overflow: hidden;
    z-index: 30;
    animation: talk-monte .18s cubic-bezier(.2, .7, .3, 1) both;
}
.gif-panneau[hidden] { display: none; }
.gif-compact { height: 290px; left: 4px; right: 4px; border-radius: 14px; }
.gif-tete { padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 8px; }
.gif-onglets { display: flex; gap: 4px; background: rgba(var(--teinte), .06); padding: 3px; border-radius: 10px; }
.gif-onglets button {
    flex: 1; border: none; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700;
    color: var(--gris); padding: 5px 0; border-radius: 8px; cursor: pointer;
}
.gif-onglets button.actif { background: var(--blanc); color: var(--bleu); box-shadow: 0 1px 4px rgba(13, 43, 82, .12); }
.gif-tete input {
    width: 100%; box-sizing: border-box; border: 1px solid var(--bordure); border-radius: 999px;
    padding: 7px 14px; font: inherit; font-size: 13.5px; outline: none; background: rgba(var(--teinte), .03);
}
.gif-tete input:focus { border-color: var(--bleu); background: var(--blanc); }
.gif-grille {
    flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 10px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; align-content: start;
}
.gif-compact .gif-grille { grid-template-columns: repeat(2, 1fr); }
.gif-tuile {
    position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
    background: linear-gradient(135deg, #e8eefc, #efe6fd);
}
.gif-tuile > button:first-child {
    display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer;
    transition: transform .15s ease;
}
.gif-tuile > button:first-child:hover { transform: scale(1.04); }
.gif-tuile img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.gif-tuile.choisi { outline: 3px solid var(--bleu); outline-offset: -3px; }
.gif-coeur {
    position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    background: rgba(4, 7, 23, .45); color: #fff; opacity: 0; transition: opacity .15s ease, background .15s ease;
}
.gif-coeur svg { fill: none; }
.gif-tuile:hover .gif-coeur, .gif-coeur:focus-visible, .gif-coeur.actif { opacity: 1; }
.gif-coeur.actif { background: #ff3b5c; }
.gif-coeur.actif svg { fill: currentColor; }
@media (hover: none) { .gif-coeur { opacity: 1; } }
.gif-vide { margin: 0; padding: 36px 20px; text-align: center; color: var(--gris); font-size: 13.5px; flex: 1; }
.gif-vide[hidden], .gif-apercu[hidden] { display: none; }
.gif-apercu {
    display: flex; gap: 12px; align-items: center; padding: 10px 12px;
    border-top: 1px solid var(--bordure); background: var(--blanc); animation: talk-monte .18s ease both;
}
.gif-apercu img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.gif-compact .gif-apercu img { width: 72px; height: 72px; }
.gif-apercu-infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gif-apercu-infos strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gif-apercu-infos div { display: flex; gap: 8px; }
.gif-annuler, .gif-envoyer {
    border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.gif-annuler { background: rgba(var(--teinte), .08); color: var(--encre); }
.gif-envoyer { background: var(--degrade); color: #fff; flex: 1; }
.gif-envoyer:disabled { opacity: .6; cursor: default; }

/* Nouveautés (journal des versions) */
.nouveautes-version { margin: 28px 0; padding: 20px 22px; background: var(--blanc); border: 1px solid var(--bordure); border-radius: 18px; }
.nouveautes-version header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.nouveautes-version h2 { margin: 0; }
.nouveautes-version time { color: var(--gris); font-size: 13px; }
.nouveautes-version ul { list-style: none; padding: 0; margin: 14px 0 0; }
.nouveautes-version li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--bordure); }
.nouveautes-version li:first-child { border-top: 0; }
.nouveautes-texte { flex: 1 1 280px; }
.nouveautes-plateforme { color: var(--gris); font-size: 12px; }
.pastille { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.pastille-nouveau { background: rgba(119, 5, 246, .1); color: var(--violet); }
.pastille-amelioration { background: rgba(0, 120, 255, .1); color: #0A66D8; }
.pastille-correctif { background: rgba(0, 150, 90, .12); color: #0B7A4B; }

/* GIF dans les commentaires */
.commentaire-zone { position: relative; }
.commentaire-form .gif-bouton { border: 1.5px solid var(--bleu); border-radius: 8px; padding: 4px 7px; font-size: 11.5px; font-weight: 800; color: var(--bleu); }
.commentaire-form .gif-bouton:hover, .commentaire-form .gif-bouton.actif { color: #fff; }
.commentaire-photo.commentaire-gif { display: block; margin-top: 6px; max-width: min(220px, 100%); border-radius: 12px; }

/* GIF dans une publication */
.composeur { position: relative; }
.composeur-gif { background: none; border: 0; font: inherit; padding: 0; }
.composeur-gif .gif-bouton { pointer-events: none; }
.composeur-gif:hover .gif-bouton, .composeur-gif.actif .gif-bouton { background: var(--bleu); color: #fff; }
.gif-panneau.gif-bas { bottom: auto; top: calc(100% + 6px); animation: none; }
.composeur-gif-apercu { position: relative; display: inline-block; margin: 6px 0 4px; }
.composeur-gif-apercu img { display: block; max-width: 200px; max-height: 160px; border-radius: 12px; }
.composeur-gif-retirer {
    position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1;
}
.post-gif { max-width: min(320px, 100%); }
.composeur-gif-apercu[hidden] { display: none; }
input, textarea, select { color: var(--encre); }
.composeur textarea, .post-edition textarea, .commentaire-form input[type="text"] { background: transparent; }
::placeholder { color: var(--gris); opacity: .75; }

/* ============================================================
   Mode sombre : réglage Auto (système) / Clair / Sombre, posé sur <html data-theme>
   ============================================================ */
:root[data-theme="sombre"] {
    --encre:   #E8ECF5;
    --gris:    #9AA6BA;
    --fond:    #0B0F1B;
    --blanc:   #141A2A;
    --bordure: #262E44;
    --verre:   20, 26, 42;
    --teinte:  255, 255, 255;
    --ambiance-fond: linear-gradient(180deg, #080B15 0%, #0B0F1B 45%, #0F0B1C 100%);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) {
    --encre:   #E8ECF5;
    --gris:    #9AA6BA;
    --fond:    #0B0F1B;
    --blanc:   #141A2A;
    --bordure: #262E44;
    --verre:   20, 26, 42;
    --teinte:  255, 255, 255;
    --ambiance-fond: linear-gradient(180deg, #080B15 0%, #0B0F1B 45%, #0F0B1C 100%);
    color-scheme: dark;
}
}

/* Surfaces aux couleurs codées en dur */
:root[data-theme="sombre"] body::before { filter: brightness(.55) saturate(1.1); }
:root[data-theme="sombre"] .flash-succes { background: #12301d; color: #7fd69b; }
:root[data-theme="sombre"] .flash-erreur, :root[data-theme="sombre"] .auth-erreur { background: #3a1714; color: #ff9d94; }
:root[data-theme="sombre"] .ligne-membre.non-lu { background: #15233f; }
:root[data-theme="sombre"] .lettre { background: #1d1a14; border-color: #3a3222; }
:root[data-theme="sombre"] .gif-tuile { background: linear-gradient(135deg, #1d2740, #2a2046); }
:root[data-theme="sombre"] .bouton-danger, :root[data-theme="sombre"] .post-signaler:hover { color: #ff9d94; }

/* Sélecteur de thème (Paramètres) */
.theme-choix { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.theme-choix button {
    flex: 1; min-width: 96px; padding: 10px 14px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer;
    background: rgba(var(--verre), .6); color: var(--encre); border: 1px solid var(--bordure);
}
.theme-choix button.actif { background: var(--degrade); color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) body::before { filter: brightness(.55) saturate(1.1); }
    :root:not([data-theme="clair"]) .flash-succes { background: #12301d; color: #7fd69b; }
    :root:not([data-theme="clair"]) .flash-erreur, :root:not([data-theme="clair"]) .auth-erreur { background: #3a1714; color: #ff9d94; }
    :root:not([data-theme="clair"]) .ligne-membre.non-lu { background: #15233f; }
    :root:not([data-theme="clair"]) .lettre { background: #1d1a14; border-color: #3a3222; }
    :root:not([data-theme="clair"]) .gif-tuile { background: linear-gradient(135deg, #1d2740, #2a2046); }
    :root:not([data-theme="clair"]) .bouton-danger, :root:not([data-theme="clair"]) .post-signaler:hover { color: #ff9d94; }
}
:root[data-theme="sombre"] .pastille-nouveau { background: rgba(160, 100, 255, .2); color: #c4a1ff; }
:root[data-theme="sombre"] .pastille-amelioration { background: rgba(60, 150, 255, .2); color: #8cc4ff; }
:root[data-theme="sombre"] .pastille-correctif { background: rgba(40, 200, 130, .18); color: #6fdfae; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .pastille-nouveau { background: rgba(160, 100, 255, .2); color: #c4a1ff; }
    :root:not([data-theme="clair"]) .pastille-amelioration { background: rgba(60, 150, 255, .2); color: #8cc4ff; }
    :root:not([data-theme="clair"]) .pastille-correctif { background: rgba(40, 200, 130, .18); color: #6fdfae; }
}

/* ============================================================
   Mentions, hashtags et tendances
   ============================================================ */
a.mention, a.hashtag { font-weight: 600; color: var(--bleu); }
a.mention:hover, a.hashtag:hover { text-decoration: underline; }
.profil-pseudo { margin: -2px 0 8px; color: var(--gris); font-weight: 600; }
.tendances { display: flex; flex-wrap: wrap; gap: 8px; }
.tendance {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    background: rgba(var(--verre), .6); border: 1px solid rgba(var(--teinte), .12); color: var(--encre); font-weight: 600; font-size: 14px;
}
.tendance small { color: var(--gris); font-weight: 600; }
.tendance:hover { border-color: var(--bleu); color: var(--bleu); }
.mention-liste {
    position: fixed; z-index: 1000; margin: 0; padding: 6px; list-style: none; max-width: 340px;
    background: var(--blanc); border: 1px solid var(--bordure); border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .2);
}
.mention-liste li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.mention-liste li.actif, .mention-liste li:hover { background: rgba(var(--teinte), .08); }
.mention-liste small { color: var(--gris); margin-left: auto; }
.mention-avatar {
    width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center;
    background: var(--degrade); color: #fff; font-size: 12px; font-weight: 700;
}

/* Réglages de notifications */
.notif-form{display:flex;flex-direction:column;gap:2px}
.notif-ligne{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--bordure);cursor:pointer}
.notif-ligne span{display:flex;flex-direction:column;gap:2px;min-width:0}
.notif-ligne small{color:var(--gris);font-size:.82rem}
.notif-ligne input[type=checkbox]{width:44px;height:26px;flex:none;appearance:none;-webkit-appearance:none;border-radius:13px;background:rgba(var(--teinte),.22);position:relative;cursor:pointer;transition:background .2s}
.notif-ligne input[type=checkbox]::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.notif-ligne input[type=checkbox]:checked{background:var(--bleu,#2b6cf0)}
.notif-ligne input[type=checkbox]:checked::after{transform:translateX(18px)}
.notif-plage{display:flex;gap:18px;align-items:center;padding:12px 0 16px;color:var(--gris)}
.notif-plage .champ{width:auto;display:inline-block;margin-left:6px}

/* Administration : onglets et modération */
.admin-onglets{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.admin-onglets a{padding:8px 14px;border-radius:999px;font-size:14px;font-weight:600;color:var(--gris);background:rgba(var(--verre),.5);border:1px solid var(--bordure)}
.admin-onglets a.actif{color:#fff;background:var(--degrade);border-color:transparent}
.signalement-alerte{color:#b3261e;font-weight:600;font-size:14px;margin:8px 0}
.signalement-dossier{color:var(--gris);font-size:13px;margin:8px 0}
.suspension-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.suspension-form .champ{width:auto;flex:1 1 180px;margin:0}

/* ---------- Stories ---------- */
.stories-barre {
    display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 4px 2px 14px;
    scrollbar-width: none;
}
.stories-barre::-webkit-scrollbar { display: none; }
.story-pastille {
    flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--encre);
}
.story-anneau {
    position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
    background: var(--bordure); padding: 3px;
}
.story-pastille-nouvelle .story-anneau { background: var(--degrade); }
.story-anneau > .avatar-reel, .story-anneau > .avatar-initiales {
    border: 3px solid var(--blanc); box-sizing: content-box; border-radius: 50%; width: 52px; height: 52px;
}
.story-plus {
    position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--bleu); color: #fff; font-weight: 700; display: grid; place-items: center;
    border: 2px solid var(--blanc); font-size: 15px; line-height: 1;
}
.story-nom { font-size: 12px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-ajout {
    flex: none; width: 28px; height: 28px; margin: 18px -6px 0 -8px; border-radius: 50%; border: 0;
    background: var(--bleu); color: #fff; font-size: 17px; cursor: pointer; line-height: 1;
}

.fond-0 { background: linear-gradient(135deg, #0093FD, #7705F6); }
.fond-1 { background: linear-gradient(135deg, #FF7A59, #E1306C); }
.fond-2 { background: linear-gradient(135deg, #11998E, #38EF7D); }
.fond-3 { background: linear-gradient(135deg, #F7971E, #FFD200); }
.fond-4 { background: linear-gradient(135deg, #232526, #414345); }
.fond-5 { background: linear-gradient(135deg, #4776E6, #8E54E9); }

body.story-ouverte { overflow: hidden; }
.story-viewer {
    position: fixed; inset: 0; z-index: 400; background: rgba(4, 7, 23, .94);
    display: grid; place-items: center; animation: story-entree .18s ease-out;
}
@keyframes story-entree { from { opacity: 0; } to { opacity: 1; } }
.story-cadre {
    position: relative; width: min(100vw, 420px); height: min(100vh, 760px); border-radius: 18px;
    overflow: hidden; background: #000; color: #fff;
}
@media (max-width: 480px) { .story-cadre { border-radius: 0; width: 100vw; height: 100vh; } }
.story-scene { position: absolute; inset: 0; display: grid; place-items: center; container-type: size; }
.story-media { width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-texte-grand {
    margin: 0; padding: 40px 28px; text-align: center; font-size: 26px; font-weight: 700; line-height: 1.3;
    overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.story-legende {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 60px 22px 26px; text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7)); font-size: 16px; overflow-wrap: anywhere;
}
.story-zone { position: absolute; top: 70px; bottom: 0; width: 38%; border: 0; background: transparent; cursor: pointer; }
.story-zone-g { left: 0; }
.story-zone-d { right: 0; width: 62%; }
.story-progres { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.story-barre { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.story-barre-rempli { display: block; height: 100%; background: #fff; }
.story-entete {
    position: absolute; top: 22px; left: 0; right: 0; padding: 6px 12px; display: flex; justify-content: space-between;
    align-items: center; background: linear-gradient(rgba(0, 0, 0, .45), transparent); z-index: 2;
}
.story-qui { display: flex; align-items: center; gap: 10px; }
.story-qui strong { display: block; font-size: 14px; }
.story-qui small { opacity: .8; font-size: 12px; }
.story-actions { display: flex; gap: 6px; }
.story-bouton {
    border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 999px; min-width: 34px; height: 34px;
    padding: 0 12px; cursor: pointer; font: inherit; font-size: 14px; backdrop-filter: blur(6px);
}
.story-bouton:hover { background: rgba(255, 255, 255, .3); }
.story-spectateurs {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 60%; z-index: 3; background: rgba(20, 24, 40, .96);
    border-radius: 18px 18px 0 0; padding: 14px 16px 18px; display: flex; flex-direction: column;
}
.story-spectateurs-titre { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.story-spectateurs-liste { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.story-spectateur { display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: #fff; text-decoration: none; border-radius: 10px; }
.story-spectateur:hover { background: rgba(255, 255, 255, .08); }
.story-vide { opacity: .7; text-align: center; margin: 14px 0; }

.story-creation {
    position: fixed; inset: 0; z-index: 400; background: rgba(4, 7, 23, .6); display: grid; place-items: center; padding: 16px;
    backdrop-filter: blur(6px);
}
.story-creation-carte {
    width: min(100%, 400px); max-height: 100%; overflow-y: auto; background: var(--blanc); color: var(--encre);
    border-radius: var(--rayon); padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.story-creation-carte h2 { margin: 0; font-size: 18px; }
.story-creation-apercu {
    position: relative; --h: min(380px, 52vh); height: var(--h); width: calc(var(--h) * 9 / 16); flex: none; margin: 0 auto;
    border-radius: 14px; overflow: hidden;
    display: grid; place-items: center; color: #fff; background: #000; container-type: size;
}
.story-creation-apercu .story-texte-grand { font-size: 6cqw; padding: 20px; }
.story-apercu-base { position: absolute; inset: 0; display: grid; place-items: center; }
.story-apercu-couche { position: absolute; inset: 0; }
.story-creation-carte textarea {
    width: 100%; border: 1px solid var(--bordure); border-radius: 12px; padding: 10px 12px; font: inherit; resize: none;
    background: var(--fond); color: var(--encre);
}
.story-compteur { text-align: right; color: var(--gris); margin-top: -8px; }
.story-creation-outils { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.story-couleurs { display: flex; gap: 6px; }
.story-couleur { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--blanc); box-shadow: 0 0 0 1px var(--bordure); cursor: pointer; padding: 0; }
.story-creation-actions { display: flex; justify-content: flex-end; gap: 10px; }
.story-erreur { color: #b3261e; margin: 0; font-size: 13px; }

/* Filtres photo/vidéo (appliqués à l'affichage) */
.filtre-noir { filter: grayscale(1) contrast(1.05); }
.filtre-sepia { filter: sepia(.85) saturate(1.1); }
.filtre-vif { filter: saturate(1.7) contrast(1.1); }
.filtre-froid { filter: sepia(.3) hue-rotate(170deg) saturate(1.3); }
.filtre-chaud { filter: sepia(.35) saturate(1.4) hue-rotate(-10deg); }
.filtre-fane { filter: contrast(.85) brightness(1.1) saturate(.65); }
.filtre-dramatique { filter: contrast(1.35) saturate(1.2) brightness(.92); }

/* Calques : stickers emoji et textes, positionnés en proportion du cadre (cqw = largeur du cadre) */
.story-calque {
    position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); z-index: 1; width: max-content;
    max-width: 80cqw; line-height: 1.1; text-align: center; overflow-wrap: anywhere; user-select: none; pointer-events: none;
    transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s));
}
.story-calque-sticker { font-size: 17cqw; }
.story-calque-texte { font-size: 6.5cqw; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.story-calque-edit { pointer-events: auto; cursor: grab; touch-action: none; }
.story-calque-edit.selectionne { outline: 2px dashed rgba(255, 255, 255, .85); outline-offset: 4px; border-radius: 6px; }
.story-filtres, .story-outils-calque { display: flex; gap: 6px; flex-wrap: wrap; }
.story-filtres[hidden], .story-outils-calque[hidden], .story-stickers[hidden], .story-saisie-calque[hidden] { display: none; }
.story-chip {
    border: 1px solid var(--bordure); background: var(--fond); color: var(--encre); border-radius: 999px; padding: 5px 12px;
    font: inherit; font-size: 12.5px; cursor: pointer;
}
.story-chip.actif { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.story-stickers { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.story-sticker { border: 0; background: transparent; font-size: 22px; padding: 4px 0; border-radius: 8px; cursor: pointer; }
.story-sticker:hover { background: var(--fond); }
.story-saisie-calque { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.story-saisie-calque input {
    flex: 1 1 140px; border: 1px solid var(--bordure); border-radius: 12px; padding: 8px 12px; font: inherit;
    background: var(--fond); color: var(--encre);
}

/* ---------- Conversations de groupe ---------- */
.talk-titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.talk-titre h1 { margin: 0; }
.talk-titre .bouton { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; font-size: 13.5px; }
.avatar-groupe {
    display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #1b57fe, #8b5cf6); font-size: 18px; color: #fff;
}
.chat-groupe .ligne-identite { flex: 1; min-width: 0; }
.chat-groupe .ligne-identite small { display: block; }
.chat-gerer { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; }
.chat-erreur { margin: 0; padding: 8px 14px; font-size: 13px; font-weight: 600; color: #b3261e; background: rgba(179, 38, 30, .08); }
.chat-erreur[hidden] { display: none; }
.bulle-auteur { display: block; font-size: 11.5px; font-weight: 700; color: var(--bleu); margin-bottom: 2px; }
.chat-systeme { align-self: center; max-width: 90%; text-align: center; font-size: 12px; font-weight: 600; color: var(--gris); padding: 3px 10px; }
.groupe-carte { max-width: 440px; max-height: 90vh; overflow-y: auto; }
.groupe-carte h3 { margin: 6px 0 0; font-size: 14px; }
.groupe-liste { display: flex; flex-direction: column; gap: 2px; }
.groupe-ligne { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; font-size: 14px; cursor: default; }
.groupe-ligne label { flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.groupe-ligne small { color: var(--gris); }
.groupe-ligne .groupe-retirer { border: none; background: none; color: #b3261e; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.groupe-ligne.desactive { opacity: .55; }
.groupe-carte .groupe-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.groupe-carte .groupe-actions .bouton { padding: 9px 18px; font-size: 14px; }
.groupe-carte .bouton-danger { color: #b3261e; border-color: rgba(179, 38, 30, .35); }

/* ============================================================
   Talk — messagerie plein écran (liste, conversation, infos)
   ============================================================ */
body.page-talk { overflow: hidden; }
body.page-talk .flash { display: none; }
.talk-app {
    --talk-liste: 360px;
    --talk-infos: 340px;
    display: grid;
    grid-template-columns: var(--talk-liste) minmax(0, 1fr);
    height: calc(100dvh - var(--barre-h, 59px));
    background: var(--blanc);
    border-top: 1px solid var(--bordure);
}
.talk-app.infos-ouvertes { grid-template-columns: var(--talk-liste) minmax(0, 1fr) var(--talk-infos); }
.talk-liste, .talk-conv, .talk-infos { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.talk-liste { border-right: 1px solid var(--bordure); background: var(--blanc); }
.talk-infos { border-left: 1px solid var(--bordure); background: var(--blanc); overflow-y: auto; }
.talk-infos[hidden] { display: none; }
.talk-conv { background: var(--fond); position: relative; }

.tk-btn-icone {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border: none; border-radius: 50%;
    background: none; color: var(--gris); cursor: pointer; flex: none; transition: background .15s, color .15s;
}
.tk-btn-icone:hover { background: rgba(var(--teinte), .07); color: var(--encre); }
.tk-btn-icone.actif { background: rgba(27, 87, 254, .12); color: var(--bleu); }
.tk-btn-icone:disabled { opacity: .4; cursor: default; }

/* --- Liste --- */
.tk-liste-tete { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.tk-liste-tete h1 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.tk-liste-actions { display: flex; gap: 2px; }
.tk-recherche { position: relative; margin: 4px 14px 8px; }
.talk-app [hidden], .tk-modal-liste [hidden], .e2ee-carte [hidden] { display: none !important; }
:root { --barre-h: 59px; }
.tk-ico { line-height: 0; }
.tk-recherche .tk-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gris); pointer-events: none; }
.tk-recherche input {
    width: 100%; box-sizing: border-box; border: 1px solid transparent; background: rgba(var(--teinte), .06);
    border-radius: 999px; padding: 10px 14px 10px 36px; font: inherit; font-size: 14px; color: var(--encre); outline: none;
}
.tk-recherche input:focus { border-color: var(--bleu); background: var(--blanc); }
.tk-filtres { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }
.tk-filtre {
    border: none; border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 700;
    background: rgba(var(--teinte), .06); color: var(--gris); cursor: pointer;
}
.tk-filtre:hover { color: var(--encre); }
.tk-filtre.actif { background: rgba(27, 87, 254, .13); color: var(--bleu); }
.tk-items { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.tk-item {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; text-align: left;
    padding: 10px 10px; border: none; border-radius: 14px; background: none; font: inherit; color: var(--encre); cursor: pointer;
}
.tk-item:hover { background: rgba(var(--teinte), .05); }
.tk-item.actif { background: rgba(27, 87, 254, .10); }
.tk-item-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-item-ligne { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tk-item-nom { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tk-item-heure { font-size: 12px; color: var(--gris); flex: none; }
.tk-item-apercu { font-size: 13.5px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tk-item.non-lu .tk-item-nom, .tk-item.non-lu .tk-item-apercu { font-weight: 800; color: var(--encre); }
.tk-item.non-lu .tk-item-heure { color: var(--bleu); font-weight: 700; }
.tk-pastille {
    min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: var(--bleu);
    color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; flex: none;
}
.tk-pastille.calme { background: var(--gris); }
.tk-item-icones { display: inline-flex; gap: 4px; color: var(--gris); flex: none; }
.tk-item-plus {
    position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--bordure);
    background: var(--blanc); color: var(--gris); cursor: pointer; display: none; place-items: center; font-size: 15px; line-height: 1;
    box-shadow: 0 2px 8px rgba(13, 43, 82, .12);
}
.tk-item:hover .tk-item-plus { display: grid; }
.tk-section-titre { margin: 10px 10px 4px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--gris); }
.tk-archives-ligne {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: none; background: none; font: inherit;
    font-size: 14px; font-weight: 700; color: var(--gris); cursor: pointer; border-radius: 12px;
}
.tk-archives-ligne:hover { background: rgba(var(--teinte), .05); color: var(--encre); }
.tk-liste-vide { padding: 30px 20px; text-align: center; color: var(--gris); font-size: 14px; line-height: 1.5; }

/* --- Conversation --- */
.tk-accueil { margin: auto; text-align: center; max-width: 360px; padding: 24px; color: var(--gris); }
.tk-accueil .tk-accueil-logo {
    width: 84px; height: 84px; border-radius: 28px; margin: 0 auto 18px; display: grid; place-items: center; color: #fff;
    background: var(--degrade); box-shadow: 0 18px 40px rgba(27, 87, 254, .3);
}
.tk-accueil h2 { margin: 0 0 8px; color: var(--encre); letter-spacing: -.02em; }
.tk-accueil p { margin: 0 0 16px; line-height: 1.55; font-size: 14.5px; }
.tk-entete {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--blanc); border-bottom: 1px solid var(--bordure); flex: none;
}
.tk-retour { display: none; }
.tk-identite { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; background: none; border: none; padding: 2px; font: inherit; color: var(--encre); text-align: left; cursor: pointer; border-radius: 12px; }
.tk-identite:hover { background: rgba(var(--teinte), .05); }
.tk-identite > span { min-width: 0; display: flex; flex-direction: column; }
.tk-identite strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-identite small { font-size: 12.5px; color: var(--gris); }
.tk-identite small.ecrit { color: var(--bleu); font-weight: 700; }
.tk-entete-actions { display: flex; gap: 2px; }
.tk-barre-recherche {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--blanc); border-bottom: 1px solid var(--bordure); flex: none;
}
.tk-barre-recherche input {
    flex: 1; border: 1px solid var(--bordure); background: var(--fond); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--encre); outline: none;
}
.tk-barre-recherche input:focus { border-color: var(--bleu); }
.tk-barre-recherche small { color: var(--gris); font-weight: 700; min-width: 54px; text-align: center; }
.tk-bandeau { margin: 0; padding: 7px 14px; font-size: 12.5px; text-align: center; color: var(--gris); background: rgba(var(--teinte), .03); flex: none; }
.tk-bandeau.erreur { color: #b3261e; background: rgba(179, 38, 30, .08); font-weight: 600; cursor: pointer; }
.tk-bandeau[hidden] { display: none; }
.tk-fil { flex: 1; overflow-y: auto; padding: 14px 18px 8px; display: flex; flex-direction: column; gap: 3px; scroll-behavior: auto; }
.tk-charger-plus { align-self: center; border: 1px solid var(--bordure); background: var(--blanc); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; color: var(--bleu); cursor: pointer; margin-bottom: 8px; }
.tk-fil-vide { margin: auto; color: var(--gris); font-size: 14px; text-align: center; }
.tk-sep { align-self: center; font-size: 12px; font-weight: 700; color: var(--gris); padding: 6px 12px; }

.tk-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; position: relative; }
.tk-msg.moi { flex-direction: row-reverse; }
.tk-msg .tk-msg-avatar { width: 28px; flex: none; align-self: flex-end; }
.tk-msg-bloc { display: flex; flex-direction: column; max-width: min(540px, 76%); min-width: 0; }
.tk-msg.moi .tk-msg-bloc { align-items: flex-end; }
.tk-auteur { font-size: 12px; font-weight: 700; color: var(--gris); margin: 6px 10px 2px; }
.tk-bulle {
    position: relative; padding: 8px 13px; border-radius: 20px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap;
    background: var(--blanc); border: 1px solid var(--bordure); border-bottom-left-radius: 6px; max-width: 100%; box-sizing: border-box;
}
.tk-msg.moi .tk-bulle { background: var(--degrade); color: #fff; border-color: transparent; border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.tk-bulle a { color: inherit; text-decoration: underline; }
.tk-bulle.supprime { background: transparent; border: 1px dashed var(--bordure); color: var(--gris); font-style: italic; }
.tk-msg.moi .tk-bulle.supprime { color: var(--gris); }
.tk-bulle.sans-fond { background: none; border: none; padding: 0; }
.tk-msg.trouve .tk-bulle { outline: 3px solid rgba(255, 190, 0, .75); }
.tk-msg.surligne .tk-bulle { animation: tk-flash 1.6s ease; }
@keyframes tk-flash { 0%, 60% { box-shadow: 0 0 0 4px rgba(27, 87, 254, .35); } 100% { box-shadow: 0 0 0 0 rgba(27, 87, 254, 0); } }
.tk-bulle mark { background: rgba(255, 200, 0, .55); color: inherit; border-radius: 3px; }
.tk-transfere, .tk-cite-label { font-size: 12px; font-weight: 700; opacity: .75; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.tk-cite {
    display: block; width: 100%; text-align: left; border: none; border-left: 3px solid currentColor; border-radius: 8px; padding: 5px 9px; margin-bottom: 6px;
    background: rgba(var(--teinte), .08); color: inherit; font: inherit; font-size: 13px; cursor: pointer; opacity: .9;
}
.tk-msg.moi .tk-cite { background: rgba(255, 255, 255, .18); }
.tk-cite b { display: block; font-size: 12px; }
.tk-cite span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-media { display: block; max-width: 100%; max-height: 320px; border-radius: 14px; cursor: zoom-in; background: rgba(var(--teinte), .06); }
.tk-media + .tk-texte, .tk-texte + .tk-media { margin-top: 6px; }
.tk-gif { max-width: 240px; cursor: default; }
.tk-bulle audio { display: block; max-width: 100%; width: 260px; height: 38px; }
.tk-fichier {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(var(--teinte), .07); color: inherit;
    text-decoration: none !important; min-width: 200px;
}
.tk-msg.moi .tk-fichier { background: rgba(255, 255, 255, .18); }
.tk-fichier-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(27, 87, 254, .14); color: var(--bleu); flex: none; font-size: 11px; font-weight: 800; }
.tk-msg.moi .tk-fichier-ico { background: rgba(255, 255, 255, .25); color: #fff; }
.tk-fichier-txt { display: flex; flex-direction: column; min-width: 0; }
.tk-fichier-txt strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk-fichier-txt small { opacity: .75; font-size: 12px; }
.tk-lien-carte {
    display: flex; align-items: center; gap: 10px; margin-top: 7px; padding: 8px 10px; border-radius: 12px; background: rgba(var(--teinte), .07);
    color: inherit; text-decoration: none !important; white-space: normal;
}
.tk-msg.moi .tk-lien-carte { background: rgba(255, 255, 255, .18); }
.tk-lien-carte .tk-lien-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(27, 87, 254, .14); color: var(--bleu); flex: none; }
.tk-msg.moi .tk-lien-ico { background: rgba(255, 255, 255, .25); color: #fff; }
.tk-lien-carte span { display: flex; flex-direction: column; min-width: 0; }
.tk-lien-carte strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-lien-carte small { font-size: 12px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--gris); margin: 2px 8px 0; }
.tk-meta .tk-etoile { color: #f5a300; display: inline-flex; }
.tk-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: -8px 8px 0; position: relative; z-index: 1; }
.tk-msg.moi .tk-reacts { justify-content: flex-end; }
.tk-react {
    display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--bordure); background: var(--blanc);
    font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 1px 4px rgba(13, 43, 82, .12); color: var(--encre);
}
.tk-react.moi { border-color: var(--bleu); background: rgba(27, 87, 254, .12); }
.tk-react small { font-size: 11.5px; font-weight: 700; }
.tk-vu { align-self: flex-end; font-size: 11.5px; font-weight: 700; color: var(--gris); margin: 2px 10px 6px; }
.tk-actions {
    position: absolute; top: -14px; display: none; gap: 1px; padding: 2px; border-radius: 999px; background: var(--blanc);
    border: 1px solid var(--bordure); box-shadow: 0 4px 16px rgba(13, 43, 82, .18); z-index: 5;
}
.tk-msg:not(.moi) .tk-actions { left: 36px; }
.tk-msg.moi .tk-actions { right: 0; }
.tk-msg:hover .tk-actions, .tk-msg.menu-ouvert .tk-actions { display: flex; }
.tk-actions button { width: 30px; height: 30px; border: none; border-radius: 50%; background: none; color: var(--gris); cursor: pointer; display: grid; place-items: center; }
.tk-actions button:hover { background: rgba(var(--teinte), .08); color: var(--encre); }
.tk-systeme { align-self: center; max-width: 90%; text-align: center; font-size: 12px; font-weight: 600; color: var(--gris); padding: 5px 12px; }
.tk-ecrit { padding: 0 20px 6px; font-size: 12.5px; font-style: italic; color: var(--gris); min-height: 0; }
.tk-ecrit[hidden] { display: none; }
.tk-descendre {
    position: absolute; right: 22px; bottom: 96px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--bordure); background: var(--blanc);
    color: var(--encre); cursor: pointer; box-shadow: 0 6px 20px rgba(13, 43, 82, .2); display: grid; place-items: center; z-index: 6;
}
.tk-descendre[hidden] { display: none; }
.tk-descendre .tk-pastille { position: absolute; top: -8px; right: -4px; }

/* --- Composeur --- */
.tk-compo { position: relative; background: var(--blanc); border-top: 1px solid var(--bordure); padding: 10px 14px 12px; flex: none; }
.tk-compo-bandeau {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 7px 10px; border-radius: 12px; background: rgba(var(--teinte), .06);
    border-left: 3px solid var(--bleu); font-size: 13px;
}
.tk-compo-bandeau > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-compo-bandeau b { font-size: 12px; color: var(--bleu); }
.tk-compo-bandeau span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gris); }
.tk-compo-bandeau .tk-btn-icone { width: 28px; height: 28px; }
.tk-pj { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tk-pj-item { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 30px 6px 8px; border-radius: 12px; background: rgba(var(--teinte), .06); font-size: 13px; max-width: 260px; }
.tk-pj-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.tk-pj-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-pj-item button { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(var(--teinte), .15); color: var(--encre); cursor: pointer; line-height: 1; }
.tk-compo-ligne { display: flex; align-items: flex-end; gap: 6px; position: relative; }
.tk-compo-ligne textarea {
    flex: 1; resize: none; border: 1px solid transparent; background: rgba(var(--teinte), .06); border-radius: 22px; padding: 10px 16px; font: inherit; font-size: 15px;
    line-height: 1.4; max-height: 140px; color: var(--encre); outline: none; box-sizing: border-box;
}
.tk-compo-ligne textarea:focus { border-color: var(--bleu); background: var(--blanc); }
.tk-envoyer {
    width: 40px; height: 40px; border: none; border-radius: 50%; background: var(--degrade); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none;
    box-shadow: 0 6px 16px rgba(27, 87, 254, .3); transition: transform .12s;
}
.tk-envoyer:hover { transform: scale(1.06); }
.tk-envoyer:disabled { opacity: .5; cursor: default; transform: none; }
.tk-micro.enregistre { background: rgba(229, 57, 53, .15); color: #e53935; animation: tk-pulse 1.2s infinite; }
@keyframes tk-pulse { 50% { box-shadow: 0 0 0 6px rgba(229, 57, 53, .12); } }
.tk-enregistrement { display: flex; align-items: center; gap: 10px; flex: 1; padding: 8px 14px; border-radius: 22px; background: rgba(229, 57, 53, .1); color: #e53935; font-weight: 700; font-size: 14px; }
.tk-enregistrement i { width: 10px; height: 10px; border-radius: 50%; background: #e53935; animation: tk-pulse 1s infinite; }
.talk-conv .gif-panneau { left: 10px; right: auto; width: min(420px, calc(100% - 20px)); bottom: calc(100% + 4px); }

/* --- Menus, modales, notifications --- */
.tk-menu {
    position: fixed; z-index: 120; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--blanc); border: 1px solid var(--bordure);
    box-shadow: 0 16px 48px rgba(13, 43, 82, .28); animation: talk-monte .14s ease both;
}
.tk-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: none; border-radius: 9px; background: none; font: inherit; font-size: 14px;
    color: var(--encre); cursor: pointer; text-align: left;
}
.tk-menu button:hover { background: rgba(var(--teinte), .07); }
.tk-menu button.danger { color: #d93025; }
.tk-menu button .icone { color: var(--gris); }
.tk-menu hr { border: none; border-top: 1px solid var(--bordure); margin: 4px 0; }
.tk-emojis { display: flex; gap: 2px; padding: 6px; border-radius: 999px; }
.tk-emojis button { width: 38px; height: 38px; justify-content: center; padding: 0; font-size: 22px; border-radius: 50%; transition: transform .12s; }
.tk-emojis button:hover { transform: scale(1.25); }
.tk-emojis button.moi { background: rgba(27, 87, 254, .15); }
.tk-modal-liste { max-height: 48vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tk-modal-liste .tk-item { padding: 8px; }
.tk-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 140; background: #111827; color: #fff; padding: 10px 18px; border-radius: 999px;
    font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: talk-monte .2s ease both;
}
.tk-toast.erreur { background: #b3261e; }

/* --- Panneau Infos --- */
.tk-infos-tete { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 18px 12px; text-align: center; position: relative; }
.tk-infos-tete h2 { margin: 6px 0 0; font-size: 19px; letter-spacing: -.02em; }
.tk-infos-tete small { color: var(--gris); }
.tk-infos-fermer { position: absolute; top: 10px; right: 10px; }
.tk-infos-actions { display: flex; justify-content: center; gap: 14px; padding: 6px 12px 14px; flex-wrap: wrap; }
.tk-infos-actions button { display: flex; flex-direction: column; align-items: center; gap: 5px; border: none; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--gris); cursor: pointer; }
.tk-infos-actions button > span { width: 42px; height: 42px; border-radius: 50%; background: rgba(var(--teinte), .07); display: grid; place-items: center; color: var(--encre); }
.tk-infos-actions button.actif > span { background: rgba(27, 87, 254, .14); color: var(--bleu); }
.tk-onglets { display: flex; gap: 2px; padding: 3px; margin: 0 14px; border-radius: 12px; background: rgba(var(--teinte), .06); }
.tk-onglets button { flex: 1; border: none; background: none; border-radius: 9px; padding: 7px 2px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--gris); cursor: pointer; }
.tk-onglets button.actif { background: var(--blanc); color: var(--bleu); box-shadow: 0 1px 4px rgba(13, 43, 82, .12); }
.tk-infos-corps { padding: 12px 14px 24px; display: flex; flex-direction: column; gap: 8px; }
.tk-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tk-grille button { padding: 0; border: none; background: rgba(var(--teinte), .06); border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.tk-grille img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-infos-ligne { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--encre); text-decoration: none; font-size: 13.5px; background: none; border: none; font-family: inherit; text-align: left; cursor: pointer; width: 100%; }
.tk-infos-ligne:hover { background: rgba(var(--teinte), .06); }
.tk-infos-ligne > span { min-width: 0; display: flex; flex-direction: column; }
.tk-infos-ligne strong, .tk-infos-ligne em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-infos-ligne small { color: var(--gris); font-size: 12px; }
.tk-infos-vide { color: var(--gris); font-size: 13.5px; text-align: center; padding: 18px 8px; }

/* --- Mobile : une colonne à la fois --- */
@media (max-width: 860px) {
    .talk-app, .talk-app.infos-ouvertes { grid-template-columns: 1fr; }
    .talk-app .talk-conv, .talk-app .talk-infos { display: none; }
    .talk-app.conv-ouverte .talk-liste { display: none; }
    .talk-app.conv-ouverte .talk-conv { display: flex; }
    .talk-app.infos-ouvertes.conv-ouverte .talk-conv { display: none; }
    .talk-app.infos-ouvertes .talk-infos { display: flex; position: relative; }
    .tk-retour { display: inline-grid; }
    .tk-msg-bloc { max-width: 84%; }
    .tk-actions { display: none !important; }
}
@media (hover: none) { .tk-item-plus { display: grid; } }

/* ---------- Pages publiques ---------- */
.badge-verifie { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--bleu); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.onglets-pages { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(var(--teinte), .06); margin-bottom: 16px; }
.onglets-pages a { flex: 1; text-align: center; padding: 9px 6px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--gris); }
.onglets-pages a.actif { background: var(--blanc); color: var(--bleu); box-shadow: 0 1px 4px rgba(13, 43, 82, .12); }
.pages-filtres { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pages-filtres input, .pages-filtres select { flex: 1; min-width: 140px; padding: 11px 14px; border: 1px solid var(--bordure); border-radius: 12px; font: inherit; font-size: 14.5px; background: var(--blanc); color: var(--encre); outline: none; }
.pages-filtres input:focus, .pages-filtres select:focus { border-color: var(--bleu); }
.pages-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.page-carte { display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; color: var(--encre); transition: transform .15s, box-shadow .15s; }
.page-carte:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(13, 43, 82, .12); }
.page-carte-couv { height: 78px; background: center / cover no-repeat; }
.page-carte-couv-vide { background: var(--degrade); opacity: .85; }
.page-carte-corps { display: flex; flex-direction: column; gap: 3px; padding: 0 14px 16px; }
.page-carte-avatar { margin-top: -26px; margin-bottom: 6px; width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--blanc); background: var(--blanc); overflow: hidden; display: block; }
.page-carte small { color: var(--gris); font-size: 12.5px; }
.page-carte-accroche { font-size: 13.5px; line-height: 1.45; color: var(--gris); margin: 3px 0; }
.page-fiche { max-width: 920px; }
.page-entete { background: var(--blanc); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; margin-bottom: 18px; }
.page-couverture { height: 210px; background: var(--degrade) center / cover no-repeat; }
.page-entete-corps { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding: 0 22px 20px; }
.page-avatar { margin-top: -48px; border: 4px solid var(--blanc); border-radius: 50%; background: var(--blanc); overflow: hidden; line-height: 0; }
.page-identite { flex: 1; min-width: 200px; padding-top: 12px; }
.page-identite h1 { margin: 0 0 3px; font-size: 24px; letter-spacing: -.02em; }
.page-accroche { margin: 0 0 4px; color: var(--encre); }
.page-actions { display: flex; gap: 8px; align-items: center; }
.page-colonnes { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.page-infos { position: sticky; top: 76px; }
.page-description { line-height: 1.65; margin: 0 0 14px; }
.page-coordonnees { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.page-coordonnees li { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.page-flux { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.post-actions-public { display: flex; gap: 16px; align-items: center; }
.composeur-page { border: 1px solid var(--bordure); border-radius: 10px; padding: 7px 10px; background: var(--blanc); color: var(--encre); font: inherit; font-size: 13px; max-width: 150px; }
.nav-publique { position: sticky; top: 0; }
@media (max-width: 760px) {
    .page-colonnes { grid-template-columns: 1fr; }
    .page-infos { position: static; }
    .page-couverture { height: 140px; }
}

/* Présence en ligne */
.tk-av { position: relative; display: inline-flex; flex: none; }
.tk-av.en-ligne::after {
    content: ''; position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%;
    background: #22c55e; border: 2.5px solid var(--blanc, #fff);
}
.tk-identite small.en-ligne { color: #16a34a; font-weight: 600; }

/* Code de récupération du chiffrement */
.e2ee-lien { background: none; border: 0; padding: 4px; color: var(--bleu); font: inherit; font-size: 13px; cursor: pointer; text-align: center; }
.e2ee-erreur, .recup-erreur { color: #dc2626 !important; font-weight: 600; }
.recup-code {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 14px 0; padding: 18px;
    border-radius: 14px; background: rgba(27, 87, 254, .07); border: 1px dashed var(--bleu);
}
.recup-code strong { font: 700 20px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; word-break: break-all; }
.recup-code small { color: var(--gris); line-height: 1.5; }
.recup-form { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-width: 380px; }
.recup-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
#recup [hidden] { display: none !important; }

.invitation-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.qr-carte { align-items: center; text-align: center; }
.qr-image { width: 240px; height: 240px; padding: 14px; background: #fff; border-radius: 14px; border: 1px solid var(--bordure); }
.qr-image svg { width: 100%; height: 100%; display: block; }
