/* ==================== */
/* TWO-COLUMN LAYOUT    */
/* ==================== */
.site-footer {
    margin-top: 5% !important;
    width: 100%;
}

.split-layout {
    display: flex;
    min-height: 100vh;
}

.left-block {
    flex: 0 0 40%;
    /* fallback */
    overflow: hidden;
}

.left-block .image-wrapper {
    width: 100%;
    height: 100%;
}

.left-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: auto;
}

.right-block {
    flex: 0 0 60%;
    background: #ffffff;
    overflow-y: auto;
    padding: 60px 40px;
    /* breathing space */
}

/* Keep all your existing styles below, but adjust container */
.study-container {
    max-width: 800px;
    /* keeps content readable */
    margin: 0 auto;
}

/* --- Progress Bar --- */
.progress-container {
    width: 100%;
    height: 10px;
    background: #eef0f2;
    border-radius: 20px;
    margin-bottom: 50px;
}

.progress-bar {
    height: 100%;
    background: #89cf30;
    border-radius: 20px;
}

/* --- Typography --- */
.main-title {
    font-size: 38px;
    font-weight: 900;
    color: #000;
    margin-bottom: 10px;
}

.sub-description {
    font-size: 16px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 40px;
}

/* --- Slider Structure --- */
.slider-outer-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    gap: 15px;
}

.slider-viewport {
    flex: 1;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-slide {
    flex: 0 0 100%;
}

.slide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* --- Side Navigation Arrows --- */
.nav-arrow {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #89cf30;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
    transition: 0.3s;
    flex-shrink: 0;
}

.nav-arrow:hover {
    background: #76ba24;
}

.nav-arrow:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}

/* --- The Cards (matching image color) --- */
.program-card {
    background: #f7f8fc;
    /* Light blue/grey from image */
    border-radius: 10px;
    padding: 35px 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.program-card .card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
}

.program-card .card-icon img {
    width: 100%;
    height: auto;
    filter: brightness(0) saturate(100%) invert(10%) sepia(26%) saturate(4590%) hue-rotate(231deg) brightness(92%) contrast(106%);
    /* Makes icons dark blue/purple */
}

.program-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a3d;
    margin: 0;
}

.program-card:hover {
    background: #89cf30;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #89cf30;
}

/* --- Bottom Buttons --- */
.bottom-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.btn-action {
    display: flex;
    align-items: center;
    padding: 10px 25px;
    border-radius: 30px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-back {
    background: #a8e6a3;
    color: #1e4d2b;
}

.btn-forward {
    background: #39b54a;
    color: #fff;
}

.icon-circle {
    background: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    color: #000;
    font-size: 12px;
}

/* --- Social Icons --- */
.social-links-minimal {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 40px;
    color: #1a1a3d;
    font-size: 20px;
}

.social-links-minimal a {
    color: inherit;
}

/* ==================== */
/* RESPONSIVE AM�LIOR�  */
/* ==================== */

/* Tablettes et petits �crans */
@media (max-width: 1000px) {
    .split-layout {
        flex-direction: column;
    }

    .left-block {
        flex: none;
        height: 300px;
    }

    .right-block {
        flex: none;
        padding: 40px 20px;
    }

    .slide-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .right-block {
        padding: 30px 20px;
    }

    .main-title {
        font-size: 28px;
    }

    .sub-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .progress-container {
        margin-bottom: 30px;
    }

    .program-card {
        padding: 25px 15px;
    }

    .card-icon {
        width: 42px;
        height: 42px;
    }

    .program-card h3 {
        font-size: 13px;
    }

    .bottom-controls {
        margin-top: 30px;
    }
}

/* Mobiles (=600px) */
@media (max-width: 600px) {
    .left-block {
        height: 200px;
    }

    .nav-arrow {
        display: none;
        /* on cache les fl�ches lat�rales, on utilise les boutons du bas */
    }

    .slider-outer-wrapper {
        gap: 0;
    }

    .slide-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .program-card {
        padding: 20px 15px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .program-card h3 {
        font-size: 14px;
    }

    .bottom-controls {
        justify-content: center;
    }

    .btn-action {
        padding: 10px 20px;
        font-size: 14px;
    }

    .icon-circle {
        width: 22px;
        height: 22px;
        margin: 0 5px;
    }

    .social-links-minimal {
        justify-content: center;
        margin-top: 30px;
    }
}

/* Tr�s petits mobiles (=480px) */
@media (max-width: 480px) {
    .left-block {
        height: 150px;
    }

    .right-block {
        padding: 25px 15px;
    }

    .main-title {
        font-size: 24px;
    }

    .sub-description {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .progress-container {
        height: 8px;
        margin-bottom: 25px;
    }

    .slide-grid {
        gap: 12px;
    }

    /* Cartes en disposition horizontale pour �conomiser l'espace */
    .program-card {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 15px;
        padding: 15px 12px;
    }

    .program-card .card-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 0;
    }

    .program-card h3 {
        font-size: 14px;
        text-align: left;
    }

    .bottom-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-action {
        justify-content: center;
    }

    .social-links-minimal {
        gap: 15px;
        font-size: 18px;
    }
}

/* �crans tr�s �troits (=400px) */
@media (max-width: 400px) {
    .right-block {
        padding: 20px 12px;
    }

    .main-title {
        font-size: 22px;
    }

    .sub-description {
        font-size: 13px;
    }

    .program-card {
        padding: 12px 10px;
    }

    .program-card h3 {
        font-size: 13px;
    }

    .btn-action {
        font-size: 13px;
        padding: 8px 15px;
    }
}

.black-circle {
    background-color: #1a1a3d;
    margin-right: 10px;
}

/* Tr�s petits mobiles (=480px) */
@media (max-width: 480px) {
    .left-block {
        height: 380px;
        display: none;
        /* Active le mode Flexbox */
        justify-content: center;
        /* Centre horizontalement */
        align-items: center;
        /* Centre verticalement */
        overflow: hidden;
        /* Empêche l'image de dépasser du bloc */
        background-color: #0fb116;
        /* Optionnel : assure la continuité du vert */
    }

    .left-block img {
        width: auto;
        /* Garde ses proportions */
        height: 100%;
        /* Prend toute la hauteur du bloc */
        object-fit: contain;
        /* S'assure que toute la carte est visible sans être coupée */
        display: block;
        margin: auto;
    }

    .right-block {
        padding: 25px 12px;
    }

    .main-title {
        font-size: 24px;
    }

    .sub-description {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .progress-container {
        height: 8px;
        margin-bottom: 25px;
    }

    .slide-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Une seule colonne */
    .program-card {
        padding: 18px 12px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
    }

    /* Disposition horizontale pour gagner de la place */
    .program-card h3 {
        font-size: 14px;
        text-align: left;
    }

    .card-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 0;
    }

    .bottom-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-action {
        justify-content: center;
    }

    .social-links-minimal {
        gap: 15px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .left-block {
        height: 380px;
        display: none;
        /* Active le mode Flexbox */
        justify-content: center;
        /* Centre horizontalement */
        align-items: center;
        /* Centre verticalement */
        overflow: hidden;
        /* Empêche l'image de dépasser du bloc */
        background-color: #38B227;
        /* Optionnel : assure la continuité du vert */
    }

    .left-block img {
        width: auto;
        /* Garde ses proportions */
        height: 100%;
        /* Prend toute la hauteur du bloc */
        object-fit: contain;
        /* S'assure que toute la carte est visible sans être coupée */
        display: block;
        margin: auto;
    }
}

/**Nv style**/
/* —— Hint & Compteur —— */
.selection-hint {
    font-size: 0.88rem;
    color: #666;
    margin: 4px 0 10px;
}

.selection-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

#counterText {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.counter-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.3s ease, transform 0.3s ease;
}

.dot.dot-active {
    background: #39b54a;
    transform: scale(1.2);
}

/* —— Cartes —— */
.program-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.program-card.selected-card {
    border: 2px solid #39b54a !important;
    background-color: rgba(57, 181, 74, 0.06);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* —— Bouton Suivant —— */
.btn-forward:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-forward.btn-active {
    opacity: 1;
    cursor: pointer;
    pointer-events: all;
}

/* —— Toast —— */
.toast-container {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 440px;
}

.custom-toast {
    background: #39b54a;
    color: #fff;
    padding: 14px 22px;
    border-radius: 15px;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.4;
    animation: slideUp 0.4s ease forwards;
}

.toast-error {
    background: #e74c3c !important;
}

.custom-toast.hide {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* —— Grille —— */
.all-subdomains-grid {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px 10px;
    margin: 0 -10px;
}

.slide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px;
}

@media (max-width: 768px) {
    .slide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .slide-grid {
        grid-template-columns: 1fr;
    }

    .bottom-controls {
        flex-direction: column;
        gap: 10px;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }
}