/* ============================================
   ZETBOO — Optimized Stylesheet
   ============================================ */

/* ---------- Import Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Palette principale (navbar sombre) */
    --bg-body: hsl(0, 0%, 100%);              /* était #ffffff */
    --bg-navbar: hsla(0, 0%, 100%, 0.98);      /* était rgba(255, 255, 255, 0.98) */
    --bg-navbar-mobile: hsla(210, 3%, 12%, 0.98); /* était rgba(30, 31, 32, 0.98) */
    --bg-dropdown: hsla(0, 0%, 97%, 0.95);     /* était rgba(248, 248, 248, 0.95) */
    --bg-lang-btn: hsla(0, 0%, 100%, 0.1);     /* était rgba(255, 255, 255, 0.1) */
    --bg-hover-item: hsla(30, 87%, 54%, 0.15); /* était rgba(240, 138, 36, 0.15) */

    /* Typographie */
    --text-main: hsl(180, 3%, 15%);            /* était #252727 */
    --text-muted: hsl(0, 0%, 33%);             /* était #555555 */
    --text-hover: hsl(30, 87%, 54%);           /* était #f08a24 */

    /* Bordures & ombres */
    --border-color: hsla(228, 4%, 27%, 0.4);   /* était rgba(66, 67, 71, 0.4) */
    --border-dropdown: hsla(0, 0%, 100%, 0.15); /* était rgba(255, 255, 255, 0.15) */
    --shadow-navbar: 0 4px 12px hsla(0, 0%, 0%, 0.5);   /* était rgba(0, 0, 0, 0.5) */
    --shadow-dropdown: 0 4px 12px hsla(0, 0%, 0%, 0.4); /* était rgba(0, 0, 0, 0.4) */
    --shadow-mobile: 0 10px 15px hsla(0, 0%, 0%, 0.3);  /* était rgba(0, 0, 0, 0.3) */

    /* Carte de chat (theme clair) */
    --card-bg: hsl(0, 0%, 97%);                /* était #f8f8f8 */
    --card-border: hsl(0, 0%, 92%);             /* était #eaeaea */
    --shadow-default: 0 10px 25px hsla(0, 0%, 0%, 0.05);      /* était rgba(0, 0, 0, 0.05) */
    --shadow-hover: 0 15px 30px hsla(30, 100%, 50%, 0.15);    /* était rgba(255, 127, 0, 0.15) */

    /* Badge & bouton */
    --badge-bg: hsla(30, 100%, 50%, 0.1);      /* était rgba(255, 127, 0, 0.1) */
    --badge-color: hsl(30, 100%, 50%);         /* était #ff7f00 */
    --btn-bg: hsl(30, 100%, 50%);              /* était #ff7f00 */
    --btn-hover-bg: hsl(30, 100%, 45%);        /* était #e67300 */
    --btn-text: hsl(0, 0%, 100%);              /* était #ffffff */

    /* blocs responsive */
    --block-bg: hsla(210, 3%, 12%, 0.85);      /* était rgba(30, 31, 32, 0.85) */
    --block-border: hsla(0, 0%, 100%, 0.15);   /* était rgba(255, 255, 255, 0.15) */
    --title-color: hsl(30, 87%, 54%);          /* était #f08a24 */
    --text-color: hsl(0, 0%, 100%);            /* était #ffffff */

    --orange: hsl(21, 90%, 54%);               /* était #f36b21 */
    --orange-dark: hsl(21, 84%, 46%);          /* était #d95713 */
    --ink: hsl(0, 0%, 13%);                    /* était #202020 */
    --muted: hsl(0, 0%, 40%);                  /* était #666 */
    --paper: hsl(34, 26%, 95%);                /* était #f5f2ee */
    --white: hsl(0, 0%, 100%);                 /* était #fff */
    --line: hsl(32, 16%, 85%);                 /* était #ded8d1 */
    --radius: 18px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;    
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

.content {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    padding: 2rem;
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-navbar);
    backdrop-filter: blur(8px);
    padding: 0.1rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    box-shadow: 0 0 0 transparent;
    transition: box-shadow 0.4s ease, background-color 0.4s ease;
    border-bottom: 0.1rem solid var(--border-color);
}

.navbar.is-scrolled {
    box-shadow: var(--shadow-navbar);
}

/* ---------- Brand ---------- */
.nav-brand {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2rem;
    justify-self: start;
    text-decoration: none;
}

/* ---------- Navigation Links ---------- */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-self: center;
}

.nav-links a, .nav-links router-link
.btn-login {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.btn-login:hover {
    color: var(--text-hover);
}

@keyframes navSearchExpand {
    from { width: 200px; box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0); }
    to { width: 320px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18); }
}

@keyframes navSearchCollapse {
    from { width: 320px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18); }
    to { width: 200px; box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0); }
}

.nav-salon-search input {
    width: 200px;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background-color: var(--bg-lang-btn);
    color: var(--text-main);
    font: inherit;
    font-size: 0.85rem;
}

.nav-salon-search input::placeholder {
    color: var(--muted);
}

.nav-salon-search input:focus {
    outline: none;
}

.nav-salon-search input.expanded {
    animation: navSearchExpand 0.5s ease-out forwards;
}

.nav-salon-search input.collapsing {
    animation: navSearchCollapse 0.5s ease-out forwards;
}

/* Icône "créer un salon", à côté de la barre de recherche */
.nav-create-room-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-create-room-btn:hover {
    background-color: var(--bg-hover-item);
    color: var(--text-hover);
}

/* Bouton "Amis" du menu — un <button> (pas un lien), stylé pour se fondre
   avec le reste du menu (.nav-links a). */
.nav-friends-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-friends-btn:hover {
    color: var(--text-hover);
}

/* Icône "amis" (SVG en ligne) à côté de l'avatar, dans le menu du compte */
.nav-friends-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-friends-icon-btn:hover {
    background-color: var(--bg-hover-item);
    color: var(--text-hover);
}

/* ---------- Menu du compte (avatar + déconnexion) ---------- */
.user-menu-wrapper {
    position: relative;
}

.user-avatar-btn {
    position: relative;
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    display: block;
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    /* Couleur pilotée par .status-dot-chat/away/dnd/offline (voir plus bas) */
    border: 2px solid var(--bg-navbar);
}

.user-dropdown {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--bg-dropdown);
    border: 1px solid var(--border-dropdown);
    border-radius: 12px;
    box-shadow: var(--shadow-dropdown);
    min-width: 160px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform-origin: top right;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    animation: dropdownIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-dropdown li button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    font: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-item-icon {
    flex-shrink: 0;
    color: var(--muted);
}

.user-dropdown li button:hover {
    background-color: var(--bg-hover-item);
    color: var(--text-hover);
}

.status-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-menu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.25s ease;
}

.status-menu-arrow.open {
    transform: rotate(180deg);
}

.status-submenu {
    list-style: none;
    padding: 0.2rem 0 0.3rem;
}

.status-submenu .status-option {
    padding-left: 2rem;
}

/* ---------- Accordéon "Langues" intégré au menu avatar ---------- */
.lang-submenu-wrapper {
    padding: 0.2rem 0 0.3rem;
}

.lang-select-inline {
    list-style: none;
}

.lang-select-inline li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem 0.5rem 2rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-select-inline li a:hover {
    background-color: var(--bg-hover-item);
    color: var(--text-hover);
}

.lang-select-inline li.active a {
    color: var(--text-hover);
    font-weight: 600;
}

.lang-select-inline img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
}

/* ---------- Transition Vue partagée par les accordéons du menu avatar
   (statut, langues) — même durée/courbe que l'agrandissement de la barre
   de recherche des salons, pour une cohérence d'ensemble. ---------- */
.submenu-enter-active,
.submenu-leave-active {
    transition: opacity 0.5s ease-out, max-height 0.5s ease-out;
    overflow: hidden;
}

.submenu-enter-from,
.submenu-leave-to {
    opacity: 0;
    max-height: 0;
}

.submenu-enter-to,
.submenu-leave-from {
    opacity: 1;
    max-height: 320px;
}

.user-dropdown-divider {
    height: 1px;
    margin: 0.3rem 0;
    background-color: var(--border-dropdown);
}

.status-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-option.active {
    color: var(--text-hover);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot-chat { background: #2ecc71; }
.status-dot-away { background: #f1c40f; }
.status-dot-dnd { background: #e74c3c; }
.status-dot-offline { background: #bbb; }

/* ---------- Right Section ---------- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-self: end;
}

/* ---------- Hamburger Menu ---------- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* ---------- Language Selector ---------- */
.lang-wrapper {
    position: relative;
}

.lang-btn {
    background-color: var(--bg-lang-btn);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--text-hover);
}

.lang-btn .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-wrapper.active .arrow {
    transform: rotate(180deg);
}

/* Animation d'ouverture partagée par les menus déroulants (langue, compte) */
@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lang-select {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--bg-dropdown);
    border: 1px solid var(--border-dropdown);
    border-radius: 12px;
    box-shadow: var(--shadow-dropdown);
    min-width: 140px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform-origin: top right;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.lang-select.show {
    opacity: 1;
    visibility: visible;
    animation: dropdownIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lang-select li a {
    color: var(--text-main);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-select li:hover {
    background-color: var(--bg-hover-item);
}

.lang-select li:hover a {
    color: var(--text-hover);
}

.lang-select img,
.lang-btn img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
}


.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 40px;

  display: grid;
  grid-template-areas:
    "header header header header"
    "intro  intro   hero   hero"
    "chat   people  passion interface"
    "cta    cta     cta    cta"
    "footer footer  footer footer";
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.header {
  grid-area: header;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
}

.logo img {
  display: block;
  width: 155px;
  height: auto;
}

.header-label {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro,
.hero,
.card,
.cta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.intro {
  grid-area: intro;
  background: var(--white);
  padding: clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.intro p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
}

.intro .lead {
  font-size: 1.08rem;
  color: var(--ink);
}

.hero {
  grid-area: hero;
  min-height: 430px;
  margin: 0;
  background: #252525;
}

.hero img {
  display: block;
  width: 100%;
  height: 100%;
  
  min-height: 430px;
  object-fit: cover;
}

.card {
  min-height: 270px;
  padding: 26px;
  background: var(--white);
}

.card img {
    width: 85px;
    height: 85px;
    object-fit: none;
}

.card h2 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .94rem;
}

.chat img {
    object-position: left center;
}

.people img {
    object-position: 33.33% center;
}

.passion img {
    object-position: 66.66% center;
}

.interface img {
    object-position: right center;
}


.chat { grid-area: chat; }
.people { grid-area: people; }
.passion { grid-area: passion; }
.interface { grid-area: interface; }

.cta {
  grid-area: cta;
  padding: 28px 34px;
  background: var(--orange);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.cta .eyebrow {
  margin-bottom: 5px;
  color: rgba(255,255,255,.78);
}

.cta h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.button {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--white);
  color: var(--orange-dark);
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background: #fff5ef;
}

.footer {
  grid-area: footer;
  padding: 10px 4px;
  color: var(--muted);
  font-size: .78rem;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .page {
    grid-template-areas:
      "header header"
      "intro  intro"
      "hero   hero"
      "chat   people"
      "passion interface"
      "cta    cta"
      "footer footer";
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page {
    width: min(100% - 24px, 560px);
    grid-template-areas:
      "header"
      "intro"
      "hero"
      "chat"
      "people"
      "passion"
      "interface"
      "cta"
      "footer";
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .header {
    min-height: 60px;
    padding-inline: 4px;
  }

  .logo img {
    width: 125px;
  }

  .hero,
  .hero img {
    min-height: 300px;
  }

  .card {
    min-height: 0;
  }

  .cta {
    align-items: flex-start;
    flex-direction: column;
  }
}





/* ---------- Chat Card ---------- */
.xmpp-chat-card {
    background-color: var(--card-bg);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-default);
    max-width: 720px;
    width: 100%;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--card-border);
}

.xmpp-chat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.xmpp-chat-card .card-badge {
    display: inline-block;
    background-color: var(--badge-bg);
    color: var(--badge-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.xmpp-chat-card h2 {
    font-size: 1.6rem;
    margin: 0 0 15px;
    font-weight: 700;
    line-height: 1.3;
}

.xmpp-chat-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 25px;
}

.xmpp-chat-card .card-btn {
    display: inline-block;
    background: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 22px;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.xmpp-chat-card .card-btn:hover {
    background: var(--btn-hover-bg);
}

.xmpp-chat-card .card-btn:active {
    transform: scale(0.98);
}

/* ---------- Responsive — blocs ---------- */

.responsive-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem;
    justify-content: center;
    box-sizing: border-box;
  }

  .content-block {
    flex: 1 1 300px;
    max-width: 500px;
    background-color: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: 8px;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
  }

  .block-title {
    color: var(--title-color);
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-family: inherit;
  }

  .block-text {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
  }

/* ---------- Responsive — Tablet / Mobile ---------- */
@media (max-width: 900px) {
    .navbar {
        grid-template-columns: auto 1fr auto;
        padding: 0.8rem 1rem;
    }

    .menu-toggle {
        display: flex;
        justify-self: start;
        margin-left: 1rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-navbar-mobile);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: var(--shadow-mobile);
    }

    .nav-links.mobile-open {
        max-height: 300px;
        padding: 1rem 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .nav-right {
        gap: 0.8rem;
    }

    .btn-login {
        font-size: 0.85rem;
    }
}

/* ---------- Responsive — Short viewport (landscape mobile) ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-links.mobile-open {
        max-height: 200px;
        overflow-y: auto;
    }

    .navbar {
        padding: 0.5rem 1rem;
    }
}

/* ---------- Responsive — Small screens ---------- */
@media (max-width: 480px) {
    .xmpp-chat-card {
        padding: 25px 20px;
        margin: 10px;
        width: calc(100% - 20px);
    }

    .xmpp-chat-card h2 {
        font-size: 1.35rem;
    }

    .xmpp-chat-card p {
        font-size: 0.9rem;
    }
}
