.essential-container {
    padding: var(--space-xl) var(--space-lg) var(--space-lg) var(--space-lg);
    background-color: var(--source-color-white-transparent) !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-z2);
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

.page-title-essential {
    display: flex;
    align-items: center;
    font-size: 2rem;
    margin: 0 !important;
    line-height: 1 !important;
    color: #007d32;
}

/* Icône Abeille */
.essential-page-title-icon {
    width: auto;
    height: 3rem;
    /* CHANGEMENT : 15px = 0.9375rem */
    margin: 0 0 0 0.9375rem !important;
}

/* Sous-titre Orange */
.page-nav-subtitle {
    font-size: 1.4rem;
    font-weight: bold;
    color: #e65100;
    /* CHANGEMENT : 20px = 1.25rem */
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

/* Conteneur global */
.keep-in-line-icon-and-page-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

/* essential nav */
.essential-grid {
    display: flex;
    flex-wrap: wrap;
    /* CHANGEMENT : 15px = 0.9375rem */
    gap: 0.9375rem;
    padding: var(--space-md 0);
    justify-content: center;
    margin-top: var(--space-md);
    margin-bottom: 0;
}

/* -------------------------------------- */
/* 2. Style de base des cartes */
/* -------------------------------------- */
.essential-item {
    background-color: var(--source-color-white-transparent) !important;
    border: 1px solid var(--color-essential-item-border);
    border-radius: var(--radius-sm);
    font-weight: var(--fw-bold);
    color: var(--color-essential-item);
    text-decoration: none;
    /* CHANGEMENT : 230px = 14.375rem */
    max-width: 14.375rem;
    flex-basis: 14.375rem;
    flex-grow: 1;
    flex-shrink: 1;

    aspect-ratio: 1.8 / 1;
    box-sizing: border-box;

    /* CHANGEMENT : 5px = 0.3125rem */
    padding: 0.3125rem var(--space-xs) !important;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0;
    box-shadow: var(--shadow-z2);
    min-height: 0 !important;
}

.essential-item img {
    margin: 0 !important;
    display: block;
}

.essential-item:hover {
    background-color: var(--color-card-hover);
    transform: scale(var(--transform-scale-md));
    box-shadow: var(--shadow-z2);
}

/* -------------------------------------- */
/* 3. Styles de l'icône (NORMALISATION) */
/* -------------------------------------- */
.essential-item .essential-icon {
    /* CHANGEMENT : 60px = 3.75rem */
    height: 3.75rem;
    width: auto;
    object-fit: contain;
    max-width: none;
    margin: var(--space-sm) 0 var(--space-xs) 0;
}

/* -------------------------------------- */
/* 4. Styles du Texte */
/* -------------------------------------- */
.essential-item .essential-text,
.essential-item .essential-subtext {
    /* CHANGEMENT : 5px = 0.3125rem */
    margin: 0.3125rem 0 0 0;
    line-height: 1;
    display: block;
    width: 100%;
    color: inherit;
    flex-shrink: 0;
    text-align: center;
}

.essential-item .essential-text {
    font-weight: var(--fw-bold);
    font-size: var(--font-size-essential-nav-item-text);
    margin-bottom: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.essential-item .essential-subtext-bottom {
    font-weight: var(--fw-bold);
    font-size: var(--font-size-essential-nav-item-subtext-bottom);
    transform-origin: center center;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25rem;
}

.essential-item .essential-subtext-top {
    font-weight: var(--fw-normal);
    font-size: var(--font-size-essential-nav-item-subtext-top);
    white-space: normal;
}

/* ------------------------------------------- */
/* CAROUSEL */
/* ------------------------------------------- */

.carousel-container {
    /* CHANGEMENT : 500px = 31.25rem */
    max-width: 31.25rem;
    position: relative;
    border: 2px solid var(--color-carousel-container-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-z2);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.mySlides {
    display: none;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.mySlides img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* Numéro de slide */
.number-text {
    position: absolute;
    /* CHANGEMENT : 15px = 0.9375rem */
    top: 0.9375rem;
    left: 0.9375rem;
    color: var(--source-color-white);
    font-size: var(--font-size-carousel-number-text);
    background-color: var(--color-black-transparent);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    z-index: 10;
}

/* LA LÉGENDE */
.carousel_caption_text {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    /* CHANGEMENT : 80px = 5rem */
    min-height: 5rem;
    /* CHANGEMENT : 10px = 0.625rem */
    padding: 0.625rem;
    color: var(--color-carousel-caption-text);
    font-size: 1rem;
    font-weight: var(--fw-normal);
    text-align: center;
    background-color: #333333;
    white-space: normal;
    z-index: 10;
}

/* Boutons précédent / suivant */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 40%;
    width: auto;
    padding: var(--space-sm) var(--space-md);
    color: white;
    font-weight: var(--fw-bold);
    font-size: var(--font-size-carousel-prev-next-symbol);
    /* CHANGEMENT : 50px = 3.125rem | 20px = 1.25rem */
    border-radius: var(--radius-sm) 3.125rem 3.125rem 1.25rem;
    user-select: none;
    z-index: 11;
}

.prev { left: 4px; }
.next { right: 4px; }

/* LOGIQUE FLOTTANTE */
.slide-to-the-right {
    float: right;
    margin-left: var(--space-md);
    /* CHANGEMENT : 400px = 25rem */
    width: 25rem;
    max-width: 25rem;
}

/* AVERTISSEMENT */
.content-warning-overlay {
    color: white;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
}

.warning-icon {
    /* CHANGEMENT : 70px = 4.375rem */
    width: 4.375rem !important;
    height: auto;
    margin-bottom: var(--space-xs);
}

.warning-text {
    color: white;
    font-size: var(--font-size-carousel-warning-text);
    font-weight: var(--fw-normal);
    line-height: 1.3;
    font-style: italic;
    max-width: 70%;
}

/* ------------------------------------------- */
/* RESPONSIVITÉ */
/* ------------------------------------------- */

/* 900px = 56.25rem */
@media (max-width: 56.25rem) {
    .slide-to-the-right {
        width: 21.875rem;
    }
}

/* 785px = 49.0625rem */
@media (max-width: 49.0625rem) {
    .essential-page-title-icon {
        width: 4rem;
        height: 4rem;
        display: block;
        margin: 0 0 0 var(--space-md);
    }
    .slide-to-the-right {
        float: none !important;
        /* La largeur est déjà héritée du média query précédent (56.25rem) */
        max-width: 100% !important;
        display: block !important;
        margin: var(--space-md) auto !important;
    }
}

/* 425px = 26.5625rem */
@media (max-width: 26.5625rem) {
    .slide-to-the-right {
        width: 100% !important;
    }
}

/* 576px = 36rem */
@media (max-width: 36rem) {
    /* Désactivation des effets de survol sur mobile pour plus de fluidité */
    .essential-item:hover,
    .essential-item:focus,
    .essential-item:active {
        transform: none !important;
        box-shadow: var(--shadow-z2) !important;
        transition: none !important;
        /* background-color supprimé car il doit probablement rester celui par défaut */
    }
}