html {	
	width: 100%;
}

body {
	font-family: "Trebuchet MS";
	min-height: 100vh;
    display: flex;
    flex-direction: column;
	background-image: url("images/background.png");
	background-size: cover;
	background-attachment: fixed;
}

header, footer {
	min-height:2vh;
	background-color: #402061;
}

.highlight, .link-highlight, .link-highlight:hover
{
	background-color: #efb02f;
	color: #402061 !important;	
}

.menu {
	background-color:white;
	padding-top: 3.5vh !important;
}

.menu, .link-highlight {
	font-weight: bold;
	font-size:3vh;
}

nav div, footer div {
	min-width: 15vw;
	text-align: center;
}

.menu img {
	height: 20vh;
	width: 20vh;
}

.logo {
    position: absolute;
    top: 2vh;
	left: -1vw;
    z-index: 10;
}

.separation-vague {
    width: 100%;
    line-height: 0;
}

.separation-vague svg {
    display: block;
    width: 100%;
    height: 12vh;
}

main {
    flex: 1;
	width: 100%;
	min-height: 80%;
	padding-left: 10vw;
	padding-right: 10vw;
}

h1 {
	text-align:right;
	font-weight: bold;
	margin-bottom: 5vh;
	width: 97.5%;
}

/* Rangée des catégories */
.category-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    width: 95%;
    margin: 0 auto 2rem;
}

/* Onglet de catégorie inactif */
.category-tab {
    flex: 0 0 125px;
    min-width: 0;
    max-height: 14vh;
    padding: 0.75rem 0.5rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;

    border: 1px solid #e2d9ef;
    border-radius: 0.5rem;
    background-color: #f5f2fa;
    color: #402061;

    cursor: pointer;
    transition:
        flex-grow 0.25s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}


.category-icon {
    max-width: 100%;
    width: 7vh;
    height: 7vh;
    object-fit: contain;
    flex-shrink: 0;
}

/* Nom de la catégorie */
.category-label {
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
}

/* Nombre de formations */
.category-count {
    font-size: 0.75rem;
    color: #6f6084;
    text-align: center;
}

/* Onglet actif : il occupe l'espace restant */
.category-tab.active {
    flex: 1 1 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    background-color: #efb02f;
    border-color: #efb02f;
    border-bottom: 4px solid #402061;
    color: #402061;
    padding: 1rem 1.5rem;
    max-width: 100%;
    min-height: 14vh;
    width: auto;
    height: auto;
}

/* Icône plus visible dans l'onglet actif */
.category-tab.active .category-icon {
    font-size: 2.5rem;
    width: 14h;
    height: 14vh;
}

/* Libellé agrandi */
.category-tab.active .category-label {
    font-size: 1.25rem;
    text-align: left;
}

/* Compteur dans l'onglet actif */
.category-tab.active .category-count {
    color: #402061;
    margin-left: auto;
}

/* Contenu affiché sous les onglets */
.category-content {
    width: 100%;
}

/* Adaptation mobile */
@media (max-width: 768px) {
    .category-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .category-tab {
        flex-basis: 105px;
        min-height: 100px;
    }

    .category-tab.active {
        flex-basis: 210px;
    }
}


/* Carte de formation */
.formation {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
	width: 95%;
    margin: 0 auto 1.5rem;
}

@media (max-width: 768px) {
    .formation {
        width: 95%;
    }
}

/* Bandeau supérieur */
.formation-header {
    background-color: #402061;
    color: white;
    padding: 1rem 1.25rem;
    border-bottom: 3px solid #efb02f;
    cursor: pointer;
}

.formation-header h2 {
    color: white;
}

/* Onglets */
.formation .nav-pills .nav-link {
    color: #402061;
    border-radius: 0.35rem;
}

.formation .nav-pills .nav-link:hover {
    background-color: #f0eaf8;
}

.formation .nav-pills .nav-link.active {
    background-color: #402061;
    color: white;
}

/* Texte des rubriques */
.formation .tab-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.formation .tab-pane h3 {
    color: #402061;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

/* Bandeau inférieur */
.formation-documents {
    background-color: #f5f2fa;
    border-top: 3px solid #efb02f;
    padding: 1rem 1.25rem;
}

.formation-document {
    background-color: #402061;
    color: white;
    font-size: 0.85rem;
    font-weight: normal;
    white-space: normal;
    text-align: left;
    padding: 0.5rem 0.75rem;
}

/* Pied de carte */
.formation-documents {
    background-color: #f5f2fa;
    border-top: 3px solid #efb02f;
    padding: 1rem 1.25rem;
}

/* Sections du footer */
.formation-footer-section {
    height: 100%;
    color: #402061;
}

/* Séparation entre les deux colonnes */
@media (min-width: 768px) {
    .formation-footer-section:first-child {
        border-right: 1px solid #ddd;
    }
}
