/* ====== Reset minimal & base ====== */

html, body {
    height: 100%;
    min-height: 100%;
    margin: 0;
}

/* Par sécurité : neutralise des resets globaux trop agressifs sur <main> */
main {
    display: block;
    margin: 0;
    padding: 0;
}

/* ====== Single-SPA wrapper ====== */
single-spa-router {
    display: block;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

/* ====== Layout global: header | contenu | footer ====== */
#octo-layout {
    min-height: 100vh;                 /* occupe toute la hauteur du viewport */
    display: grid;
    grid-template-rows: auto 1fr auto; /* 1fr pousse le footer en bas */
    width: 100%;
    background-color: #F7F7F9;
}

#octo-layout > * {
    min-width: 0;          /* clé pour éviter l’overflow en Grid/Flex */
}

/* ====== Zone contenu ======
   - flow-root crée un nouveau contexte de formatage (BFC) et bloque le margin-collapsing
   - min-height:0 évite que le contenu force la hauteur et remonte le footer
=========================================================== */
#app-content {
    display: flow-root;  /* stoppe le margin-collapse des enfants (h1, etc.) */
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
}

/* Si un micro-front met des marges énormes sur son 1er/dernier enfant,
   on évite l’effet “marge qui déborde” visuellement */
#app-content > :first-child {
    margin-top: 0;
}
#app-content > :last-child {
    margin-bottom: 0;
}

/* ====== Footer orchestrateur ====== */
#footer-layout {
    position: relative;   /* surtout pas fixed/sticky ici */
    margin: 0;
    padding: 1% 1.5%;
    background-color: #3a3a40;
    color: #fff;
    z-index: 5;
}

#footer-layout .footer-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

#footer-layout .footer-col.left  { justify-self: start; }
#footer-layout .footer-col.right { justify-self: end; text-align: right; }

#footer-layout .footer-logo {
    height: 40px;
    display: block;
    margin-left: 3rem;
}

#footer-layout a {
    color: #fff;
    text-decoration: underline;
}

.gray { color: #cfcfd4; }

/* ====== Petits garde-fous utiles ====== */
/* Éviter les scrollbars horizontales surprises */
html, body {
    overflow-x: hidden;
}

/* Images responsives par défaut (utile dans des MF hétérogènes) */
img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
