/* ============================================
   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) */
    --bg-hover-light: hsla(0, 0%, 96%, 1);      /* était #f5f5f5 */
    --avatar-border-blue: hsla(198, 48%, 51%, 1); /* était #4599be */

    /* Couleurs des icônes (Tabler Icons) — appliquées aléatoirement, voir
       .icon-c1 à .icon-c6 plus bas */
    --icon-c1: hsl(165, 76%, 25%); /* était #0f6e56 */
    --icon-c2: hsl(33, 85%, 28%);  /* était #854f0b */
    --icon-c3: hsl(15, 67%, 33%);  /* était #8d381c */
    --icon-c4: hsl(246, 45%, 37%); /* était #3c3489 */
    --icon-c5: hsl(210, 82%, 27%); /* était #0c447c */
    --icon-c6: hsl(15, 68%, 36%);  /* était #993c1d */
    --icon-logout: hsl(0, 72%, 42%); /* rouge dédié à l'icône de déconnexion */

    /* 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 */
    --orange-light: hsl(21, 90%, 82%);         /* même teinte, très proche du blanc */
    --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;

    /* [CORRECTION] Hauteur de la navbar — utilisée par tous les calculs
       "espace disponible sous la navbar" (.app-body, .salon-page,
       .salon-chat-section…). Avant cette variable, chaque endroit devinait
       cette hauteur à sa façon (3.6rem ici, 48px là) sans jamais se
       recouper avec la hauteur réelle (logo-navbar.png fait 47px de haut,
       non contraint en CSS, + le padding vertical de .navbar) — d'où des
       calculs incohérents d'un endroit à l'autre. .navbar prend maintenant
       min-height: var(--navbar-height) pour que cette valeur soit la
       source de vérité plutôt qu'une coïncidence. */
    --navbar-height: 56px;
}

/* ---------- Icônes (Tabler Icons, .ti .ti-<nom>) ----------
   Léger décalage vers le bas pour un centrage optique correct (le glyphe de
   la police Tabler Icons rend visuellement un peu trop haut sinon).
   !important nécessaire pour les couleurs : certaines icônes combinent
   .icon-cN avec .menu-item-icon (qui fixe sa propre couleur grise, définie
   plus bas dans ce fichier donc prioritaire sur ces règles à spécificité
   égale). ---------- */
.ti,
.tif {
    position: relative;
    top: 1px;
}

.icon-c1 { color: var(--icon-c1) !important; }
.icon-c2 { color: var(--icon-c2) !important; }
.icon-c3 { color: var(--icon-c3) !important; }
.icon-c4 { color: var(--icon-c4) !important; }
.icon-c5 { color: var(--icon-c5) !important; }
.icon-c6 { color: var(--icon-c6) !important; }
.icon-logout { color: var(--icon-logout) !important; }

/* ---------- 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(--white);
    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;
    /* [CORRECTION] Hauteur explicite plutôt que subie (le logo, non
       contraint, faisait 47px de haut et déterminait la hauteur réelle par
       accident) — voir --navbar-height ci-dessus (:root), seule référence
       désormais utilisée partout où "l'espace sous la navbar" compte. */
    min-height: var(--navbar-height);
    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;
}

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

/* ---------- Brand ---------- */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2rem;
    justify-self: start;
    text-decoration: none;
}

/* Créer un salon / Mes salons — regroupés dans .nav-right avec les autres
   icônes du compte (déplacés depuis .nav-brand, à côté du logo). */
.nav-brand-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---------- Navigation Links ---------- */
.nav-links {
    list-style: none;
    display: flex;
    /* [CORRECTION] Par défaut (stretch), un <li> étiré ne centre pas son
       contenu tout seul : les icônes qui y ont été ajoutées (Salons
       visités, Salons publics, Créer un salon, Mes salons) restaient
       collées en haut. .nav-right avait déjà ce align-items:center. */
    align-items: center;
    gap: 2rem;
    justify-self: center;
}

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

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

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

/* 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-my-rooms-wrapper {
    position: relative;
}

/* Icône "Idiomas" autonome dans la navbar (déplacée hors du menu du compte) */
.nav-lang-wrapper {
    position: relative;
}

/* Panneau de langues affiché sous cette icône — géré par v-if/Transition
   (pas par la classe .show en JS classique comme .user-dropdown), donc pas
   d'opacity:0/visibility:hidden par défaut ici : sinon la liste resterait
   invisible même une fois ajoutée au DOM. */
.lang-standalone-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;
}

.nav-friends-icon-btn {
    position: relative;
    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: color 0.2s ease;
}

/* Fond au survol sur un pseudo-élément (plutôt que background-color direct
   sur le bouton) pour pouvoir le décaler d'un pixel vers le bas sans
   déplacer l'icône elle-même. */
.nav-friends-icon-btn::before {
    content: '';
    position: absolute;
    inset: 2px 0 -2px 0;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease;
    z-index: 0;
}

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

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

.nav-friends-icon-btn > * {
    position: relative;
    z-index: 1;
}

/* ---------- 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);
}

/* Style de base d'un menu déroulant navbar/compte — visible par défaut : la
   plupart des dropdowns qui réutilisent cette classe sont montés/démontés
   par Vue (v-if), donc déjà cachés tant qu'ils n'existent pas dans le DOM.
   Seul #userDropdown (menu du compte) est encore ouvert/fermé par une
   classe .show (JS classique) : voir la règle dédiée juste en dessous, qui
   ajoute SON PROPRE état caché par défaut — inutile de le répercuter ici
   pour tout le monde. */
.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;
}

#userDropdown {
    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;
}

#userDropdown.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);
}

/* Icône SVG partagée par tous les boutons ".btn-close-popup" (modales,
   toast d'erreur d'appel…) — remplace l'ancien caractère "✕" texte. */
.btn-close-popup {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-popup svg {
    width: 14px;
    height: 14px;
    display: block;
}

.btn-close-popup i {
    font-size: 14px;
}

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

/* Actions de modération irréversibles/sensibles (expulser, bannir) —
   couleur rouge, comme l'icône de déconnexion (--icon-logout). */
.user-dropdown li button.dropdown-action-danger {
    color: var(--icon-logout);
}

.user-dropdown li button.dropdown-action-danger:hover {
    background-color: var(--icon-logout);
    color: #fff;
}

/* "Expulser" (réversible) : survol dans un rouge 30% plus clair (mélangé
   de blanc) que "Bannir" (irréversible, ci-dessus) — pour distinguer les
   deux actions par leur gravité. */
.user-dropdown li button.dropdown-action-kick:hover {
    background-color: color-mix(in srgb, var(--icon-logout) 70%, white 30%);
    color: #fff;
}

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

.status-menu-arrow {
    margin-left: auto;
    display: inline-flex;
    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. ---------- */
/* ---------- Transition entre pages (router-view) — léger zoom + fondu,
   ex. visible en arrivant sur la page d'accueil après déconnexion. ---------- */
.page-zoom-enter-active,
.page-zoom-leave-active {
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.page-zoom-enter-from {
    opacity: 0;
    transform: scale(0.97);
}

.page-zoom-leave-to {
    opacity: 0;
    transform: scale(1.02);
}

.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: 0.1rem;
    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: none;
    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);
}

/* 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;
}

/* Liens du pied de page : À propos, Règles du service, Confidentialité */
.footer a {
  color: inherit;
  text-decoration: underline;
}

@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 horizontal réduit pour un écran plus étroit, mais hauteur
           (padding vertical) inchangée : une barre plus grande sur un écran
           plus petit n'a pas de sens. */
        padding: 0.1rem 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.5rem;
    }

    .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;
    }
}

/* ---------- 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;
    }
}
