/**
 * Section Expertise - Design avec diagonale
 * Titre, texte, 2 tags et image pleine hauteur avec séparation diagonale
 */

/* ============================================================
   STRUCTURE PRINCIPALE
   ============================================================ */

.expertise-section {
    position: relative;
    background: var(--color-light);
    min-height: 700px;
    overflow: hidden;
}

/* Texture métallique en overlay */
.expertise-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../img/Metal\ scratch\ png\ overlay,\ abstract\ design\ on\ transparent\ background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

.expertise-section__container {
    max-width: 1600px;
    margin: 0 auto;
    margin-right: 0px !important ;
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: stretch;
    z-index: 2;
}

/* ============================================================
   IMAGE (DROITE) - PLEINE HAUTEUR AVEC DIAGONALE
   ============================================================ */

.expertise-section__image-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    overflow: hidden;
    animation: fadeInRight 0.8s ease-out 0.3s forwards;
    opacity: 0;
    /* Découpe diagonale sur le côté gauche */
    clip-path: polygon(8% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Liseré le long de la découpe diagonale */
.expertise-section__image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    clip-path: polygon(8% 0%, 8.4% 0%, 0.4% 100%, 0% 100%);
    z-index: 2;
    pointer-events: none;
}

.expertise-section__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.expertise-section__image-wrapper:hover .expertise-section__image {
    transform: scale(1.05);
}

/* ============================================================
   CONTENU (GAUCHE) - DIV BLANCHE QUI DÉBORDE
   ============================================================ */

.expertise-section__content {
    position: relative;
    z-index: 2;
    /* Effet Glassmorphism */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px 0 rgba(3, 6, 7, 0.15),
        inset 0 0 0 1px rgba(227, 177, 52, 0.1);
    padding: 4rem;
    margin: 4rem 0 4rem 4rem;
    max-width: 650px;
    /* Déborde légèrement sur l'image */
    margin-right: -100px;
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.expertise-section__title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 2rem 0;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: -0.06em;
    font-family: var(--font-heading);
}

.expertise-section__title .highlight {
    color: var(--color-primary);
}

.expertise-section__description {
    font-size: 1.125rem;
    color: var(--color-text);
    line-height: 1.8;
    margin: 0 0 2rem 0;
    font-family: var(--font-primary);
}

/* ============================================================
   LISTE DES EXPERTISES
   ============================================================ */

.expertise-section__list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
}

.expertise-section__list-item {
    display: flex;
    align-items: flex-start;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out backwards;
    position: relative;
}

.expertise-section__list-item:nth-child(1) { animation-delay: 0.3s; }
.expertise-section__list-item:nth-child(2) { animation-delay: 0.4s; }
.expertise-section__list-item:nth-child(3) { animation-delay: 0.5s; }
.expertise-section__list-item:nth-child(4) { animation-delay: 0.6s; }
.expertise-section__list-item:nth-child(5) { animation-delay: 0.7s; }

.expertise-section__list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--color-primary);
    color: var(--color-secondary);
    margin-right: 0.875rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    padding: 7px;
}

.expertise-section__list-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-secondary);
}

.expertise-section__list-item:hover .expertise-section__list-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.expertise-section__list-text {
    flex: 1;
    font-weight: 500;
}

/* Lien "Choisir" pour Rigoles Métalliques */
.expertise-section__list-item--rigoles {
    cursor: pointer;
    transition: all 0.3s ease;
}

.expertise-section__list-link {
    position: absolute;
    right: 131px;
    top: 64%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    color: var(--color-secondary);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.expertise-section__list-item--rigoles:hover .expertise-section__list-link {
    opacity: 1;
    pointer-events: auto;
}

.expertise-section__list-link:hover {
    background: transparent;
    color: var(--color-primary);
    transform: translateY(-50%) translateX(3px);
}

.expertise-section__list-link svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   TAGS
   ============================================================ */

.expertise-section__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.expertise-section__tag {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary);
    color: var(--color-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.expertise-section__tag:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   RECRUTEMENT
   ============================================================ */

.expertise-section__recruitment {
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: 1rem;
    color: var(--color-text);
    font-family: var(--font-primary);
}

.expertise-section__recruitment-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.expertise-section__recruitment-link:hover {
    color: var(--color-secondary);
    text-decoration: none;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (max-width: 767px) {
    .expertise-section {
        min-height: auto;
        padding: 4rem 1.5rem;
    }

    .expertise-section__container {
        min-height: auto;
        flex-direction: column;
    }

    /* Image en arrière-plan sur toute la section */
    .expertise-section__image-wrapper {
        position: relative;
        width: 100%;
        height: 300px;
        clip-path: none;
        order: 2;
        margin-top: 2rem;
    }

    /* Pas de liseré sur mobile */
    .expertise-section__image-wrapper::before {
        display: none;
    }

    /* Contenu sans débordement sur mobile */
    .expertise-section__content {
        position: relative;
        margin: 0;
        padding: 2rem 1.5rem;
        max-width: 100%;
        order: 1;
    }

    .expertise-section__title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .expertise-section__description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .expertise-section__list {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .expertise-section__list-item {
        font-size: 0.95rem;
    }

    .expertise-section__list-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        margin-right: 0.625rem;
        padding: 5px;
    }

    .expertise-section__cross-left,
    .expertise-section__cross-right,
    .expertise-section__cross-image {
        width: 60px;
        height: 60px;
    }

    .expertise-section__cross-left {
        top: 1rem;
        left: 1rem;
    }

    .expertise-section__cross-right {
        bottom: 1rem;
        right: 1rem;
    }

    .expertise-section__cross-image {
        top: 50%;
        right: 10%;
        width: 70px;
        height: 70px;
    }
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .expertise-section {
        min-height: 600px;
    }

    .expertise-section__container {
        min-height: 600px;
    }

    .expertise-section__image-wrapper {
        width: 50%;
        clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 0% 100%);
    }

    /* Ajuster le liseré pour tablette */
    .expertise-section__image-wrapper::before {
        clip-path: polygon(10% 0%, 10.5% 0%, 0.5% 100%, 0% 100%);
    }

    .expertise-section__content {
        padding: 3rem;
        margin: 3rem 0 3rem 2rem;
        margin-right: -50px;
        max-width: 550px;
    }

    .expertise-section__title {
        font-size: 2.5rem;
    }

    .expertise-section__description {
        font-size: 1.05rem;
    }

    .expertise-section__cross-image {
        width: 85px;
        height: 85px;
        right: 12%;
    }

    .expertise-section__cross-image::before {
        width: 2.5px;
    }

    .expertise-section__cross-image::after {
        height: 2.5px;
    }
}

/* ============================================================
   RESPONSIVE - LARGE DESKTOP
   ============================================================ */

@media (min-width: 1280px) {
    .expertise-section {
        min-height: 800px;
    }

    .expertise-section__container {
        max-width: 1800px;
        min-height: 800px;
    }

    .expertise-section__image-wrapper {
        width: 58%;
        clip-path: polygon(6% 0%, 100% 0%, 100% 100%, 0% 100%);
    }

    /* Ajuster le liseré pour large desktop */
    .expertise-section__image-wrapper::before {
        clip-path: polygon(6% 0%, 6.3% 0%, 0.3% 100%, 0% 100%);
    }

    .expertise-section__content {
        padding: 5rem;
        margin: 5rem 0 5rem 6rem;
        margin-right: -120px;
        max-width: 750px;
    }

    .expertise-section__title {
        font-size: 3.5rem;
        margin-bottom: 2.5rem;
    }

    .expertise-section__description {
        font-size: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .expertise-section__tag {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    .expertise-section__cross-image {
        width: 313px;
        height: 120px;
        right: 56%;
    }

    .expertise-section__cross-image::before {
        width: 2px;
    }

    .expertise-section__cross-image::after {
        height: 2px;
    }
}
