/* Menu Sticky */
.menu-sticky {
    position: sticky;
    top: 0;
    max-width: calc(100% - 160px);
    margin: 0 auto;
    background-color: #ffffff;
    z-index: 1000;
    border: 1px solid #C8C8C8;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Container du menu */
.menu-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Groupe gauche : logo + navigation */
.menu-left-group {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Logo */
.menu-logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-left: 20px;
}

/* Navigation */
.menu-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

/* Items du menu */
.menu-item {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
}

/* Numéros au-dessus des items
.menu-number {
    font-size: 10px;
    color: #B4C6C6;
    margin-bottom: 2px;
    padding-left: 20px;
    font-weight: 400;
}*/

/* Liens des items */
.menu-item > a {
    display: block;
    padding: 0 20px;
    color: #0A1B2A;
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.5px;
    white-space: nowrap;
    position: relative;
}

/* Icône dropdown - cachée en desktop */
.menu-dropdown-icon {
    display: none;
}

.menu-item > a::after {
    content: '';
    position: absolute;
    bottom: -26px;
    left: 0;
    right: 0;
    height: 0;
    background-color: transparent;
    transition: height 0.2s ease, background-color 0.2s ease;
}

.menu-item:hover > a::after {
    height: 5px;
    background-color: #B4C6C6;
}

/* Item Contact - caché en mobile dans la première liste */
.menu-item-contact {
    display: none;
}

/* Item Contact à droite (desktop) */
.menu-nav-contact {
    display: flex;
}

.menu-item-contact-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.menu-item-contact-desktop > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 25px 0 20px;
}

.menu-item-contact-desktop > a::before {
    content: '';
    width: 30px;
    height: 30px;
    background-image: url('https://3812pabtakq.preview.infomaniak.website/wp-content/uploads/2025/09/Fleche-Cercle.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.menu-item-contact-desktop:hover > a::after {
    height: 0;
    background-color: transparent;
}

/* Dropdowns Compétences et Equipe - largeur bord à bord */
.dropdown-competences,
.dropdown-equipe {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    opacity: 0;
    visibility: hidden;
    padding: 30px 0 20px 0;
    border-top: 5px solid #C8C8C8;
    border: 1px solid #C8C8C8;
    border-radius: 0 0 5px 5px;
}

.menu-item-competences:hover .dropdown-competences,
.menu-item-equipe:hover .dropdown-equipe {
    opacity: 1;
    visibility: visible;
}

/* Header du dropdown : titre + CTA en row */
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dropdown-title {
    font-size: 24px;
    font-weight: 500;
    color: #0A1B2A;
    margin: 0;
    padding: 0 25px;
}

.dropdown-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    color: #0A1B2A;
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.dropdown-cta::before {
    content: '';
    width: 30px;
    height: 30px;
    background-image: url('https://3812pabtakq.preview.infomaniak.website/wp-content/uploads/2025/09/Fleche-Cercle.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Grille des compétences */
.competences-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
    padding: 0 15px;
}

.competence-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.competence-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #0A1B2A;
    height: 100%;
    padding: 10px;
}

.competence-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    pointer-events: none;
}

.competence-item span {
    font-size: 20px;
    font-weight: 400;
    text-align: center;
    color: #0A1B2A;
}

/* Grille de l'équipe - 3 colonnes */
.equipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
    gap: 0;
}

.equipe-item a {
    display: block;
    padding: 2px 25px;
    color: #0A1B2A;
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    white-space: nowrap;
    transition: font-weight 0.2s ease;
}

.equipe-item a:hover {
    font-weight: 600;
}

/* Menu Burger */
.menu-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    position: relative;
    width: 25px;
    height: 25px;
    justify-content: center;
    align-items: center;
}

.menu-burger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #0A1B2A;
    transition: all 0.3s ease;
    position: absolute;
}

.menu-burger span:nth-child(1) {
    top: 4px;
}

.menu-burger span:nth-child(2) {
    top: 11px;
}

.menu-burger span:nth-child(3) {
    top: 18px;
}

/* Animation vers croix */
.menu-burger.active {
    background: transparent;
}

.menu-burger.active span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}

.menu-burger.active span:nth-child(2) {
    opacity: 0;
}

.menu-burger.active span:nth-child(3) {
    top: 11px;
    transform: rotate(-45deg);
}

/* Responsive Desktop intermédiaire - réduction progressive du texte */
@media (max-width: 1440px) {
    .menu-item > a {
        font-size: 15px;
    }

    .menu-item-contact-desktop > a {
        font-size: 15px;
    }

    .dropdown-cta {
        font-size: 15px;
    }

    .competence-item span {
        font-size: 15px;
    }

    .equipe-item a {
        font-size: 15px;
    }
}

@media (max-width: 1280px) {
    .menu-item > a {
        font-size: 14px;
        padding: 0 15px;
    }

    .menu-item a::after {
        bottom: -29px;
    }

    .menu-item-contact-desktop > a {
        font-size: 14px;
        padding: 0 20px 0 15px;
    }

    .menu-number {
        padding-left: 15px;
    }

    .dropdown-cta {
        font-size: 14px;
    }

    .competence-item span {
        font-size: 14px;
    }

    .equipe-item a {
        font-size: 14px;
    }
}

@media (max-width: 1150px) {
    .menu-item > a {
        font-size: 13px;
        padding: 0 12px;
    }

    .menu-item-contact-desktop > a {
        font-size: 13px;
        padding: 0 15px 0 12px;
    }

    .menu-number {
        padding-left: 12px;
    }

    .menu-left-group {
        gap: 20px;
    }
}

/* Responsive Tablet & Mobile */
@media (max-width: 1024px) {
    /* Menu sticky avec marges */
    .menu-sticky {
        position: sticky;
        max-width: calc(100% - 40px);
        margin: 0 20px;
    }

    /* Container du menu */
    .menu-container {
        padding: 0;
        height: 60px;
    }

    /* Afficher le burger */
    .menu-burger {
        display: flex;
        background: transparent !important;
    }

    .menu-burger:focus,
    .menu-burger:active,
    .menu-burger:hover {
        background: transparent !important;
        outline: none;
    }

    /* Logo plus petit */
    .menu-logo img {
        height: 30px;
        margin-top: 10px;
    }

    /* Ajuster le groupe gauche */
    .menu-left-group {
        gap: 0;
        width: 100%;
        justify-content: space-between;
        padding: 0 10px;
        align-items: center;
    }

    .menu-logo {
        margin-right: auto;
    }

    .menu-nav {
        display: none;
        position: fixed;
        top: 85px;
        left: 30px;
        right: 30px;
        max-width: calc(100% - 60px);
        flex-direction: column;
        background-color: #ffffff;
        padding: 20px;
        gap: 0;
        z-index: 999;
        border: 1px solid #C8C8C8;
        border-radius: 5px;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
    }

    .menu-nav.active {
        display: flex;
    }

    /* Items du menu mobile */
    .menu-item {
        height: auto;
        padding: 10px 0;
        width: 100%;
        display: block;
    }

    .menu-item-competences,
    .menu-item-equipe {
        position: relative;
    }

    .menu-item > .menu-number {
        display: none;
    }

    .menu-item > a {
        display: inline-block;
        padding: 0;
        line-height: 1.2;
        vertical-align: middle;
        font-size: 18px;
    }

    .menu-item > a::after {
        display: none;
    }

    /* Icône dropdown - visible en mobile */
    .menu-dropdown-icon {
        display: inline-block;
        width: 10px;
        height: 10px;
        margin-left: 5px;
        vertical-align: middle;
        transition: transform 0.3s ease;
    }

    .menu-item-competences.active .menu-dropdown-icon,
    .menu-item-equipe.active .menu-dropdown-icon {
        transform: rotate(90deg);
    }

    /* Dropdowns prennent toute la largeur */
    .menu-item > .dropdown-menu {
        flex-basis: 100%;
        width: 100%;
    }

    /* Cacher le contact desktop en mobile */
    .menu-nav-contact {
        display: none;
    }

    /* Afficher le contact mobile dans la liste */
    .menu-item-contact {
        display: flex;
        margin-top: 5px;
    }

    .menu-item-contact > a {
        padding: 15px 0;
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 600;
    }

    .menu-item-contact > a::before {
        content: '';
        width: 20px;
        height: 20px;
        background-image: url('https://3812pabtakq.preview.infomaniak.website/wp-content/uploads/2025/09/Fleche-Cercle.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        margin-top: -5px;
    }

    /* Dropdowns en mobile - en dessous de l'item */
    .dropdown-competences,
    .dropdown-equipe {
        position: static !important;
        left: auto;
        right: auto;
        width: 100%;
        padding: 10px 0 0 0;
        border: none !important;
        border-radius: 0;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
        margin-top: 0;
    }

    .menu-item-competences.active .dropdown-competences,
    .menu-item-equipe.active .dropdown-equipe {
        display: block;
        padding-left: 20px;
    }

    /* Header dropdown mobile - Caché */
    .dropdown-header {
        display: none;
    }

    /* Grille compétences mobile - Liste simple sans illustrations */
    .competences-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-left: 20px;
    }

    .competence-item {
        display: block;
    }

    .competence-item a {
        flex-direction: row;
        gap: 0;
        justify-content: flex-start;
        padding: 5px 0;
        line-height: 1.2;
        height: auto;
        font-size: 16px;
    }

    .competence-item img {
        display: none !important;
        pointer-events: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
    }

    .competence-item span {
        font-size: 14px;
        text-align: left;
        font-weight: 300;
        line-height: 1.2;
    }

    /* Grille équipe mobile - Liste simple */
    .equipe-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-left: 20px;
    }

    .equipe-item a {
        padding: 5px 0;
        font-size: 14px;
        font-weight: 300;
        line-height: 1.2;
    }
}
