/* Styles récurrents pour hubs, sous-hubs et pages de contenu */
:root {
    --subglobal-color-définitiontechnique: #5400da;
    --subglobal-color-divers: #c96100;
    --subglobal-color-définitiontechnique-light: color-mix(in srgb, var(--subglobal-color-définitiontechnique) 20%, rgba(255, 255, 255, 0));
    --subglobal-color-divers-light: color-mix(in srgb, var(--subglobal-color-divers) 20%, rgba(255, 255, 255, 0));
}

.main-content {
    min-height: 100vh;
}

.cn-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px 72px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.cn-hero {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
	justify-content: space-between;
}


.cn-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.cn-section h2 {
    margin: 0;
    color: var(--txt-color-blackop-50);
    font-weight: 400;
    font-size: var(--txt-size-10);
}


.cn-grid {
	display: grid;
	gap: 16px;
}

.cn-grid-cards {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}


.cn-direct-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.cn-hub-box,
.cn-subhub-box {
	background: var(--global-white-2);
	border: 1px solid var(--global-transparent-white-1);
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.cn-hub-box .cn-direct-grid,
.cn-subhub-box .cn-direct-grid {
	gap: 18px;
}

.cn-subhub-box {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.cn-variant-definition {
	--cn-accent: var(--subglobal-color-définitiontechnique);
}
.cn-variant-divers {
	--cn-accent: var(--subglobal-color-divers);
}

.cn-icon-card {
	width: 140px;
	min-height: 120px;
	border-radius: 14px;
	border: 2px solid rgb(255, 255, 255);
	background-color: var(--global-white-1);
    font-weight: 500;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: 16px 12px 14px;
	gap: 12px;
    transition: filter 0.2s ease, background-color 0.2s ease;
}

.cn-icon-card:hover,
.cn-icon-card:focus-visible {
	border-color: rgb(255, 255, 255);
    background-color: var(--global-transparent-white-1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    filter: saturate(5) contrast(2);
    transition: filter 0.4s ease, background-color 0.4s ease;
}


.cn-icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.815);
	border: 1px solid rgb(255, 255, 255);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cn-icon img {
	width: 70%;
	height: 70%;
	object-fit: contain;
}

.cn-icon-card.cn-variant-definition .cn-icon,
.cn-icon-card.cn-variant-divers .cn-icon {
	border-color: var(--cn-accent);
	background: color-mix(in srgb, var(--cn-accent) 22%, transparent);
}

.cn-icon-label {
	text-align: center;
	font-size: var(--txt-size-09);
}


.cn-description-box {
	border-radius: 12px;
	border: 1px dashed var(--global-transparent-white);
	background: rgba(255, 255, 255, 0.2);
	padding: 16px;
	min-height: 120px;
	display: flex;
	align-items: center;
}


.glow-button:hover {
    
    background-image: linear-gradient(
        315deg,
        var(--cn-accent) -5%,
        rgb(253, 255, 126) 50%,
        #fff8d4 110%
    );
    border: 2px solid var(--cn-accent);
    filter: contrast(2);
    transition: filter 0.5s ease;
}


.glow-button .glow-button-text { 
    font-size: var(--txt-size-11);
}




.cn-list-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 10px;
}

.cn-list-links a {
	text-decoration: none;
}

.cn-link-meta {
	margin-left: 8px;
	font-size: var(--txt-size-08);
	opacity: 0.7;
}


.cn-file-list {
	display: grid;
	gap: 10px;
}

.cn-file {
	text-decoration: none;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgb(255, 0, 0);
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: inherit;
}


@media (max-width: 720px) {
	.cn-page {
		padding: 32px 18px 60px;
	}

	.cn-hero {
		flex-direction: column;
	}


	.cn-icon-card {
		width: 120px;
	}

}












/* =========================
   CARROUSEL AVEC SÉLECTEUR DE GROUPE
   Styles réutilisables pour toutes les pages de Contenu normalisé
========================= */

/* =========================
   CONTAINER SELECT GROUPE
========================= */

.carroussel-select-wrapper {
    position: relative;
    z-index: 50;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: calc(80vw - 80px);
    max-width: 1000px;
    margin: 0 16px;
    padding: 20px 50px;
    box-sizing: border-box;
	background-color: var(--global-transparent-white-2);
    backdrop-filter: blur(17px);
    border: 1px solid var(--global-transparent-white-1);
	border-radius: 99px;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1);
}

.carroussel-select-label {
    font-size: var(--txt-size-08);
    font-weight: 500;
    color: var(--txt-color-blackop-70);
    white-space: nowrap;
}

.carroussel-select-container {
    flex: 1;
    width: 100%;
}

/* =========================
   CUSTOM SELECT CARROUSEL
========================= */

.carroussel-custom-select {
    position: relative;
    font-size: var(--txt-size-08);
    font-weight: 400;
    min-width: 180px;
}

.carroussel-custom-select select {
    display: none;
}

.carroussel-custom-select .select-selected {
    background-color: transparent;
    border-radius: 8px;
    padding: 10px 40px 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carroussel-custom-select .select-selected:hover {
	font-weight: 600;

}

.carroussel-custom-select .select-selected:after {
    position: absolute;
    content: "";
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-color: rgba(0, 0, 0, 0.6) transparent transparent transparent;
    transition: transform 0.2s ease;
}

.carroussel-custom-select .select-selected.select-arrow-active:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Select items - positionné dans le body via JS (portal) */
.select-items-portal {
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 20;
    padding: 1px 0;
    border: 1px solid var(--global-transparent-white-1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    font-size: var(--txt-size-08);
	margin-top: -5px;
}

.select-items-portal div {
    color: var(--txt-color-blackop-85);
    padding: 5px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.select-items-portal div:hover {
    background-color: rgba(0, 0, 255, 0.1);
}

.select-items-portal div.same-as-selected {
    background-color: var(--button-global-color);
    color: white;
    font-weight: 500;
}

.select-items-portal div.same-as-selected:hover {
    background-color: var(--button-global-color);
}

/* Scrollbar personnalisée pour portal */
.select-items-portal::-webkit-scrollbar {
    width: 15px;
}

.select-items-portal::-webkit-scrollbar-track {
    background: transparent;
    margin: 2px;
}

.select-items-portal::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.select-items-portal::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.select-items-portal::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

/* Cacher le menu portal */
.select-items-portal.select-hide {
    display: none;
}

/* Fallback pour les anciens selects non-portal */
.carroussel-custom-select .select-items {
	background-color: rgba(26, 24, 153, 0.103);
	backdrop-filter: blur(18px) brightness(1);
    position: absolute;

    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    padding: 8px 0;
    border: 1px solid var(--global-transparent-white-1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 250px;
    overflow-y: auto;
    
    /* Scrollbar personnalisée - Webkit (Chrome, Safari, Edge) */

}

/* Scrollbar personnalisée pour Webkit */
.carroussel-custom-select .select-items::-webkit-scrollbar {
    width: 15px;
}

.carroussel-custom-select .select-items::-webkit-scrollbar-track {
    background: transparent;
    margin: 2px;
}

.carroussel-custom-select .select-items::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.carroussel-custom-select .select-items::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.73);
}

/* Masquer les boutons flèches de la scrollbar */
.carroussel-custom-select .select-items::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

.carroussel-custom-select .select-items div {
    color: var(--txt-color-blackop-85);
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.carroussel-custom-select .select-items div:hover {
    background-color: var(--global-transparent-white-1);
}

.carroussel-custom-select .select-items div.same-as-selected {
    background-color: var(--button-global-color);
    color: white;
    font-weight: 500;
}

.carroussel-custom-select .select-items div.same-as-selected:hover {
    background-color: var(--button-global-color);
}

.carroussel-custom-select .select-hide {
    display: none;
}

/* =========================
   CARROUSEL CONTAINER
========================= */

.carroussel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80vw;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 50px;
    box-sizing: border-box;
}
@media (max-width: 800px) {
    .carroussel {
        width: 100vw;
        padding: 20px 30px;
    }
}

/* =========================
   CARROUSEL VIEWPORT
========================= */

.carroussel-viewport {
    position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(18px);
    border: 1px solid var(--global-transparent-white-2);
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1);
    /* La hauteur est définie dynamiquement via JS */
}
@media (max-width: 800px) {
    .carroussel-viewport {
        width: 100vw;
        border-radius: 0;
        background-color: transparent;
        background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) , rgba(255, 255, 255, 0.15) 30%, rgba(255, 255, 255, 0.15) 70%, rgba(255, 0, 0, 0));
    }
}

/* =========================
   INDICATEUR DE CHARGEMENT
========================= */

.carroussel-loading-container {
    width: 100%;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.carroussel-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--txt-size-10);
    color: var(--txt-color-blackop-50);
    font-style: italic;
    z-index: 5;
}

/* =========================
   CARROUSEL TRACK
========================= */

.carroussel-track {
    display: flex;
    transition: transform 0.4s ease;
}

/* =========================
   CARROUSEL GROUP (une page du carrousel)
========================= */

.carroussel-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* =========================
   CARROUSEL ITEM (une image)
========================= */

.carroussel-item {
    flex: 1 1 auto;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0);
    border-radius: 8px;
    padding: 12px;
    overflow: hidden;
    cursor: pointer;
	border-bottom: 1px solid transparent;
}

.carroussel-item:hover {
	background-color: rgba(255, 255, 255, 0.3);
	transition: background-color 0.3s ease;

}

.carroussel-item img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* =========================
   CARROUSEL MESSAGE VIDE
========================= */

.carroussel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100%;
    min-height: 200px;
    color: var(--txt-color-blackop-50);
    font-style: italic;
}

/* =========================
   BOUTONS DE NAVIGATION
========================= */

.carroussel-btn {
    position: absolute;
    top: calc(50% - 25px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    background-color: var(--global-transparent-white-1);
    color: var(--txt-color-blackop-70);
    font-size: var(--txt-size-13);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
@media (max-width: 800px) {
    .carroussel-btn {
        position: relative;
        width: 32px;
        height: 32px;
        font-size: var(--txt-size-11);
        top: auto;
        left: auto;
        right: auto;
        margin: 0 12px;
    }
}

.carroussel-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    color: black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carroussel-prev {
    left: 0;
}

.carroussel-next {
    right: 0;
}

@media (max-width: 800px) {
    .carroussel-prev,
    .carroussel-next {
        left: auto;
        right: auto;
    }
}

/* =========================
   DOTS DE NAVIGATION
========================= */

.carroussel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    min-height: 36px;
}

@media (max-width: 800px) {
    .carroussel-controls {
        flex-wrap: wrap;
        gap: 12px;
    }
}

.carroussel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    min-height: 10px;
}

.carroussel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carroussel-dot:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.carroussel-dot.active {
    background-color: var(--button-global-color);
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightbox-zoom-in 0.9s ease;
}

@keyframes lightbox-zoom-in {
    from {
        transform: scale(0.1);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--txt-color-blackop-70);
    font-size: var(--txt-size-13);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background-color: rgb(255, 0, 0);
    border: none;
    color: white;
}

/* =========================
   RESPONSIVE CARROUSEL
========================= */

@media (max-width: 8000px) {
    .carroussel-select-wrapper {
        padding: 0 40px;
    }
    
    .carroussel {
        padding: 20px 40px;
    }
    
    .carroussel-group {
        gap: 12px;
        padding: 15px;
    }
    
    
    .carroussel-btn {
        width: 32px;
        height: 32px;
        font-size: var(--txt-size-13);
    }
}


@media (max-width: 800px) {
    .carroussel-select-wrapper {
        padding: 0 40px;
    }
    
    .carroussel {
        padding: 20px 40px;
    }
    
    .carroussel-group {
        gap: 12px;
        padding: 15px;
    }
    
    .carroussel-btn {
        width: 32px;
        height: 32px;
        font-size: var(--txt-size-13);
    }
}

@media (max-width: 500px) {
    .carroussel-select-wrapper {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
        gap: 8px;
		border-radius: 7px;
		
    }
    
    .carroussel-select-container {
        width: 100%;
		background-color: rgba(255, 255, 255, 0.50);
		border-radius: 7px;
        max-width: none;
    }
    
    .carroussel-custom-select {
        width: 100%;
    }
    
    .carroussel-btn {
        width: 24px;
        height: 24px;
        font-size: var(--txt-size-09);
    }
    
    .carroussel-dot {
        width: 8px;
        height: 8px;
    }
    
    .lightbox-close {
        top: -30px;
        right: 0;
    }
}
