.menu-plus-links {
    color: black !important;
}

.card {
    border-radius: 8px;
    max-width: 500px;
    min-width: 500px;
    border: 1px solid var(--accent-color);
    position: relative;
    overflow: hidden;
    background-color: var(--secondary-color);

    h4 {
        margin: 1rem 1.2rem;
        border-bottom: 1px solid var(--accent-color);
        padding: 0.5rem 0;
        box-sizing: border-box;
    }
    ul {
        padding-left: 1.2rem;
    }

    ul li {
        list-style-type: disc;
    }

    button {
        width: 100%;
    }
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.card-header {
    display: flex;
    align-items: center;
    min-height: 160px;
    border-bottom: 1px solid var(--accent-color);
    background-color: white;
    position: relative;

    h3 {
        color: var(--secondary-color);
        font-weight: 500;
    }

    p {
        color: var(--secondary-color);
    }

    .card-header-infos {
        padding-left: 3rem;
        text-align: center;
        width: 55%;
    }
}

.card > img {
    position: absolute;
    right: -45px;
    top: -20px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 100;
}

.card-body {
    min-height: 440px;
    max-height: 440px;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    color: white;
    position: relative;
    z-index: 1;
}

.card-body-top {
    min-height: 240px;
}

.card-body-top,
.card-body-bottom {
    display: flex;
    flex-wrap: wrap;
}

.card-body-bottom {
    margin-top: auto;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    color: white;
    position: relative;
    z-index: 1;
    border-radius: 0 0 8px 8px;
    margin-top: 1rem;
}

.card-formations,
.card-languages,
.card-centers,
.card-experiences {
    margin: 1.2rem 0;
    width: 50%;
}

ul > .li-no-data {
    list-style: none !important;
    color: rgba(255, 255, 255, 0.65);
}

.li-more {
    list-style: none !important;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.25rem;
}

/* ================== MODAL ================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
}

.hidden-modal {
    display: none;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0;
}

.modal-left-and-right {
    display: flex;
}

.modal-title,
.modal-left__title,
.modal-right__title {
    color: var(--secondary-color) !important;
}

.modal-left__title,
.modal-right__title {
    margin-bottom: 0.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 1;
}

.modal-title {
    text-align: left;
    margin: 0;
    padding: 2rem 2rem 1rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-left,
.modal-right {
    padding: 1rem 2rem;
    width: 50%;
    gap: 1.5rem;
}

.modal-left {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.modal-left img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.modal-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-start;
}

.modal-footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
}

.take-appointment .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    background-color: var(--accent-color);
    color: white;
    transition: background-color 0.2s ease;
}

.show-modal {
    transform: scale(1);
}

body.modal-open {
    overflow: hidden;
}

.hidden-modal {
    display: none;
}

/* ============================== */
/* RESPONSIVE - MOBILES           */
/* ============================== */

@media (max-width: 768px) {

    .card {
        max-width: 400px;
        min-width: 300px;
    }
    
    .card-body {
        overflow-y: auto;
    }

    .modal-left-and-right {
        flex-direction: column;
        padding: 30px 0;
    }

    .modal-left,
    .modal-right {
        width: 100%;
    }
}

@media (max-width: 600px) {
    h2 {
        text-align: center;
    }
    .cards-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .card {
        display: flex;
        flex-direction: column;
        border: none;
        -webkit-box-shadow: 5px 5px 15px -5px #000000;
        box-shadow: 5px 5px 15px -5px #000000;
    }

    /* 1. Image en pleine largeur tout en haut */
    .card > img {
        order: 0;
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        height: 280px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
        object-position: center;
        box-shadow: none;
        display: block;
        margin: 0;
    }

    /* 2. Header (nom) juste sous l'image, fond blanc */
    .card-header {
        order: 1;
        min-height: auto;
        padding: 1rem 1.2rem;
        border-bottom: 1px solid var(--accent-color);
    }

    .card-header-infos {
        width: 100% !important;
        padding: 0 !important;
        text-align: left;
    }

    /* 3. Body + Footer en dessous */
    .card-body-and-footer {
        order: 2;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .card-body {
        order: unset;
        min-height: auto;
        max-height: none;
        padding: 1rem;
    }

    .card-footer {
        order: unset;
    }

    .card-formations,
    .card-languages,
    .card-centers,
    .card-experiences {
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 325px) {
    .card {
        max-width: 300px;
        min-width: 250px;
    }
}
