/* Marque de SC Companion, commune à tout le site (vitrine, espace créateur, espace équipe, espace Admin) :
   polices de l'appli (Manrope pour le texte, Montserrat pour les titres), logo et nom en tête,
   onglets soulignés comme ceux de l'appli (ui/theme.py, QPushButton#themeTab). */
@font-face { font-family: "Manrope"; font-weight: 200 800; src: url("fonts/Manrope-Variable.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Montserrat"; font-weight: 700; src: url("fonts/Montserrat-Bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Montserrat"; font-weight: 600; src: url("fonts/Montserrat-SemiBold.ttf") format("truetype"); font-display: swap; }

body { font-family: "Manrope", "Segoe UI", system-ui, sans-serif; }
h1, h2, h3 { font-family: "Montserrat", "Segoe UI", sans-serif; }

/* Logo et nom : « SC » en bleu, « COMPANION » en blanc, un trait, puis « BOUTIQUE » en orange */
header.brand-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: nowrap; }
header.brand-bar .brand { min-width: 0; }
header.brand-bar .bar-right { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none !important; color: #F2F5FA !important; }
.brand img { height: 46px; width: auto; display: block; }
.brand-name { font-family: "Montserrat", "Segoe UI", sans-serif; font-weight: 700; font-size: 26px; letter-spacing: .04em; white-space: nowrap; }
.brand-name .sc { color: #2E95E8; }
.brand-sep { flex: none; width: 1px; height: 28px; background: rgba(255, 255, 255, .18); }
.brand-shop { font-family: "Montserrat", "Segoe UI", sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .22em;
  text-transform: uppercase; color: #F5A524; white-space: nowrap; }
.brand:hover .brand-name { color: #fff; }

/* Espaces (créateur, équipe, Admin) : nom de l'espace en pastille, qui est connecté, tête de Copi */
.space-tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  letter-spacing: .02em; white-space: nowrap; background: rgba(86, 161, 166, .16); color: #7FD1D6;
  border: 1px solid rgba(86, 161, 166, .4); }
.space-tag.admin { background: rgba(245, 165, 36, .12); color: #F5C26B; border-color: rgba(245, 165, 36, .4); }
.space-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.space-who .who { color: #E6EBF2; font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Onglets de l'espace : comme dans l'appli (texte gris, l'onglet actif turquoise et souligné) */
nav.tabs { display: flex; gap: 2px; flex-wrap: wrap; align-items: flex-end; max-width: 1600px; margin: 18px auto 0;
  border-bottom: 1px solid #2A3A51; }
nav.tabs a, nav.tabs button { position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px 11px; border: none; border-radius: 10px 10px 0 0; background: none;
  color: #8D99AB; font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; }
nav.tabs a:hover, nav.tabs button:hover { color: #E6EBF2; }
nav.tabs a.now { color: #7FD1D6; }
nav.tabs a.now::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px;
  border-radius: 2px; background: #56A1A6; }   /* trait aux bouts arrondis, comme dans l'appli */
nav.tabs .end { margin-left: auto; }   /* lien vers l'autre espace, à droite */
nav.tabs .count { margin-left: 2px; }
nav.tabs form { display: inline; margin: 0; }

@media (max-width: 640px) {
  .brand { gap: 8px; }
  .brand img { height: 28px; }
  .brand-name { font-size: 17px; }
  .brand-shop { font-size: 11px; letter-spacing: .16em; }
  .space-who .who { font-size: .95rem; }
  nav.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  nav.tabs a, nav.tabs button { white-space: nowrap; padding: 8px 10px 9px; }
  nav.tabs .end { margin-left: 0; }
}
/* Téléphone, dans un espace : la pastille de l'espace remplace « BOUTIQUE » (pas la place pour les deux) */
@media (max-width: 640px) {
  header.brand-bar:has(.space-tag) .brand-sep, header.brand-bar:has(.space-tag) .brand-shop { display: none; }
}
@media (max-width: 640px) {
  .space-tag { padding: 2px 9px; font-size: .72rem; }
  header.brand-bar { gap: 10px; }
}
@media (max-width: 400px) {
  header.brand-bar:has(.space-tag) .brand-name { font-size: 15px; }
}
/* Actions rares de l'en-tête (mot de passe, déconnexion) : petit carré, icône seule, info-bulle */
.icon-form { display: inline; margin: 0; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; min-height: 0; padding: 0;
  border-radius: 10px; border: 1px solid #34465F; background: #1D2B40; color: #B6C0CE; cursor: pointer; }
.icon-btn:hover { border-color: #56A1A6; color: #E6EBF2; }
/* Petit écran, dans un espace : la marque sur une ligne, puis l'espace, les petits boutons et Copi dessous */
@media (max-width: 640px) {
  header.brand-bar:has(.space-tag) { flex-wrap: wrap; row-gap: 10px; }
  header.brand-bar:has(.space-tag) .bar-right { width: 100%; }
  header.brand-bar:has(.space-tag) .bar-right .guide-open { margin-left: auto; }
  header.brand-bar:has(.space-tag) .brand-sep, header.brand-bar:has(.space-tag) .brand-shop { display: inline-block; }
}

/* Listes déroulantes de l'appli (liste.js) : bouton comme un champ, liste ouverte comme celle de l'appli
   (fond de la barre, bord turquoise léger, arrondie, lignes arrondies, choix en turquoise) */
.app-select { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; }
.app-select.block { display: block; width: 100%; }
.card .app-select.block { margin-top: 6px; }
.app-select-native { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important;
  opacity: 0; pointer-events: none; }
.app-select-btn { display: block; width: 100%; min-width: 0; margin: 0; padding: 9px 36px 9px 12px; text-align: left;
  border-radius: 10px; border: 1px solid #2A3A51; background: #162336 no-repeat right 12px center; color: #E6EBF2;
  font: inherit; font-size: 16px; font-weight: 400; line-height: 1.55; cursor: pointer; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; min-height: 0; height: auto; text-transform: none; letter-spacing: 0; box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238D99AB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.app-select-btn:hover { border-color: rgba(86, 161, 166, .35); background-color: #1D2B40; color: #E6EBF2; }
.app-select.on .app-select-btn, .app-select-btn:focus-visible { border-color: #56A1A6; outline: none; }
.app-select-btn:disabled { opacity: .5; cursor: default; }
.app-select-list { position: fixed; z-index: 1000; max-height: 300px; max-width: calc(100vw - 16px); box-sizing: border-box;
  overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #142030; border: 1px solid rgba(86, 161, 166, .35);
  border-radius: 12px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); scrollbar-width: thin; scrollbar-color: #34465F transparent; }
.app-select-list li { margin: 0; padding: 6px 10px; min-height: 30px; border-radius: 6px; color: #E6EBF2; font-size: 15px;
  line-height: 1.2; display: flex; align-items: center; white-space: nowrap; cursor: pointer; list-style: none; }
.app-select-list li.now { background: rgba(255, 255, 255, .05); }
.app-select-list li.sel { background: rgba(86, 161, 166, .16); color: #7FD1D6; }
.app-select-list li.off { opacity: .4; cursor: default; }
.app-select-list li.empty { color: #8D99AB; }

/* Mention légale du bas de page : centrée, sur tout le site */
body > footer, #footer-links { text-align: center; justify-content: center; }
