/* ── Base de l'espace compte ──────────────────────────────────────────
   Valeurs de la maquette Figma « Skedul · Espace personnel » (police : Montserrat au lieu d'Inter). */

:root {
    --color-bg: #101112;
    --color-header: #0b0c0d;
    --color-surface: #17191a;          /* cartes */
    --color-surface-alt: #1d2021;      /* pied de carte */
    --color-field: #111314;            /* champs de formulaire */
    --color-border: #2b2e30;           /* cartes, champs, séparateur de l'en-tête */
    --color-divider: #25282a;          /* traits de séparation */
    --color-text: #f2f4f3;
    --color-muted: #a4adaa;            /* textes secondaires, labels */
    --color-faint: #737d79;            /* placeholders, titres de section */
    --color-primary: #44E5B5;
    --color-primary-text: #08241a;
    --color-primary-soft: #1b332c;     /* onglet actif, avatar */
    --color-primary-line: #3a6958;     /* bordure de l'avatar */

    --color-explorer: #44E5B5;
    --color-streamer: #B18CFF;

    --radius: 8px;
    --radius-lg: 16px;
    --gutter: 48px;
    --container: 1344px;               /* 1440 - 2 × 48 */
    --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 760px) {
    :root {
        --gutter: 16px;
    }
}

/* Transition fondue entre les pages (onglets) */
@view-transition {
    navigation: auto;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

/* colonne pleine hauteur : le contenu (.app-main) prend la place libre, le pied de page reste
   en bas de l'écran sur une page courte, sans être collé (sticky) sur une page longue */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
}

::-moz-selection {
    color: #181818;
    background: #44E5B5;
}

::selection {
    color: #181818;
    background: #44E5B5;
}

/* ── En-tête ──────────────────────────────────────────────────────── */

/* Reste en haut au défilement (fond opaque : le contenu passe dessous) */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-header);
    border-bottom: 1px solid var(--color-divider);
}

/* Même largeur que le contenu : logo et liens alignés sur ses bords */
.app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(var(--container), 100% - 2 * var(--gutter));
    min-height: 96px;
    margin: 0 auto;
    padding: 1rem 0;
}

.app-header__logo {
    display: inline-flex;
    flex-shrink: 0;
}

.app-header__logo img {
    display: block;
    width: 137px;
    height: 30px;
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Lien vers le Studio : pilule secondaire (.dash-link__button), à la hauteur du bloc de droite.
   « Créer mon 1er planning » : bouton principal de la charte (.skedul-button) */
.app-header__studio {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 17px;
    border: 1px solid var(--color-border);
    border-radius: 29px;
    background: transparent;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.app-header__studio:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.app-header__studio i {
    font-size: 14px;
}

.app-header__studio.is-primary {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #0C2F2F;
}

.app-header__studio.is-primary:hover {
    border-color: #0C2F2F;
    background: #0C2F2F;
    color: #fff;
}


/* Mobile : les actions passent sous le logo plutôt que de déborder */
@media (max-width: 760px) {
    .app-header__inner {
        flex-wrap: wrap;
    }

    .app-header__actions {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Bouton vers le Studio : masqué sur mobile (le Studio reste accessible via le menu burger) */
    .app-header__studio {
        display: none;
    }

}

/* ── Contenu ──────────────────────────────────────────────────────── */

.app-main {
    flex: 1 0 auto;
    width: min(var(--container), 100% - 2 * var(--gutter));
    margin: 52px auto 72px;
}

@media (max-width: 760px) {
    .app-main {
        margin-top: 24px;
    }
}

/* ── Pied de page : barre fine pleine largeur, une ligne ─────────── */

.app-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 10px;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 9px var(--gutter);
    border-top: 1px solid var(--color-border);
    background: #0b0c0d;
    color: var(--color-faint);
    font-size: 11px;
    line-height: 1.4;
}

.app-footer a {
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-footer a:hover {
    color: var(--color-primary);
}

.app-footer__sep {
    opacity: 0.5;
}

.app-title {
    margin: 0.5rem 0 1.5rem;
    font-size: 1.6rem;
}

/* Section vide, à venir ou en erreur */
.app-soon {
    padding: 2.5rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-muted);
    text-align: center;
}

.app-soon i {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 2rem;
    color: var(--color-primary);
}

.app-soon strong {
    display: block;
    color: var(--color-text);
}

.app-soon p {
    margin: 0.4rem 0 0;
}

/* Bandeau « connecté en tant que » (session ouverte depuis l'espace admin) */
.app-impersonation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 16px;
    padding: 8px var(--gutter);
    background: #f5b942;
    color: #2a1d00;
    font-size: 13px;
    text-align: center;
}

.app-impersonation a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}
