.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    gap: 60px;
    min-height: 70vh;
}

.image-section {
    flex: 1;
    position: relative;
}

.team-illustration {
    width: 100%;
    height: 400px;
    background: #2c251e;

    background: #1a2c41;
    background: linear-gradient(
        180deg,
        rgba(26, 44, 65, 1) 39%,
        rgba(2, 6, 13, 1) 100%
    );

    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.celebration-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
}

.person {
    width: 60px;
    height: 80px;
    position: relative;
    animation: celebrate 2.5s ease-in-out infinite;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        box-shadow 0.3s ease;
}

.person:hover {
    transform: scale(1.2) translateY(-20px);
    z-index: 10;
}

.person:not(.selected) {
    opacity: 1;
}

.celebration-scene:has(.person.selected) .person:not(.selected) {
    opacity: 0.5;
}

.person.selected {
    transform: scale(1.3) translateY(-25px);
    z-index: 15;
}

.person:nth-child(1) {
    animation-delay: 0s;
}

.person:nth-child(2) {
    animation-delay: 0.3s;
}

.person:nth-child(2).face-image {
    top: 60%;
}

.person:nth-child(3) {
    animation-delay: 0.6s;
}

.person:nth-child(4) {
    animation-delay: 0.9s;
}

.person:nth-child(5) {
    animation-delay: 1.2s;
}

.person-head {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 5px;
    position: relative;
    animation: headBob 1.5s ease-in-out infinite;
    overflow: hidden;
}

.face-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 85%;
    border-radius: 15px;
    object-fit: cover;
    object-position: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.face-image:not([src]),
.face-image[src=''] {
    display: none;
}

.hair {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    animation: hairSway 2s ease-in-out infinite;
    z-index: 3;
    /* Au-dessus de l'image */
}

.person:nth-child(1) .hair {
    width: 30px;
    height: 15px;
    background: #8b4513;
    clip-path: polygon(
        0% 100%,
        20% 0%,
        40% 50%,
        60% 0%,
        80% 50%,
        100% 0%,
        100% 100%
    );
}

.person:nth-child(2) .hair {
    width: 25px;
    height: 12px;
    background: #2c5282;
    clip-path: polygon(
        0% 100%,
        10% 0%,
        30% 60%,
        50% 0%,
        70% 60%,
        90% 0%,
        100% 100%
    );
}

.person:nth-child(3) .hair {
    width: 35px;
    height: 18px;
    background: #ed8936;
    clip-path: polygon(0% 100%, 25% 0%, 50% 50%, 75% 0%, 100% 100%);
}

.person:nth-child(4) .hair {
    width: 28px;
    height: 14px;
    background: #ed8936;
    clip-path: polygon(0% 100%, 0% 0%, 50% 20%, 100% 0%, 100% 100%);
}

.person:nth-child(5) .hair {
    width: 32px;
    height: 16px;
    background: #2c5282;
    clip-path: polygon(
        0% 100%,
        20% 20%,
        40% 0%,
        60% 20%,
        80% 0%,
        100% 20%,
        100% 100%
    );
}

.person:hover .hair {
    animation-duration: 1s;
    transform: translateX(-50%) scale(1.1);
}

.person.selected .hair {
    transform: translateX(-50%) scale(1.2);
}

/* Garde les yeux et la bouche pour les cas où il n'y a pas d'image */
.face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Sous l'image */
}

.eye {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #333;
    border-radius: 50%;
    top: 20px;
    animation: eyeBlink 4s infinite;
}

.eye.left {
    left: 8px;
}

.eye.right {
    right: 8px;
}

.mouth {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    border: 1.5px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    animation: smile 3s ease-in-out infinite;
}

.cheek {
    position: absolute;
    width: 6px;
    height: 4px;
    background: rgba(255, 182, 193, 0.7);
    border-radius: 50%;
    top: 25px;
    animation: blush 4s ease-in-out infinite;
}

.cheek.left {
    left: 2px;
}

.cheek.right {
    right: 2px;
}

.person-body {
    width: 35px;
    height: 55px;
    margin: 0 auto;
    border-radius: 10px;
    background: white;

    position: relative;
    overflow: hidden;
}

.person:nth-child(1) .person-body {
    background: linear-gradient(135deg, #ed8936, #d77547);
}

.person:nth-child(2) .person-body {
    background: linear-gradient(135deg, #2c5282, #3182ce);
}

.person:nth-child(3) .person-body {
    background: white;
}

.person:nth-child(4) .person-body {
    background: linear-gradient(135deg, #2c5282, #3182ce);
}

.person:nth-child(5) .person-body {
    background: linear-gradient(135deg, #ed8936, #d77547);
}

.person-arms {
    position: absolute;
    top: 10px;
    width: 100%;
    height: 20px;
}

.person-arm {
    position: absolute;
    width: 8px;
    height: 20px;
    background: #fdbf47;
    border-radius: 4px;
    animation: waveArms 1.8s ease-in-out infinite;
}

.person-arm.left {
    left: -5px;
    transform-origin: top center;
}

.person-arm.right {
    right: -5px;
    transform-origin: top center;
    animation-delay: 0.3s;
}

.phone {
    position: absolute;
    top: -8px;
    right: -12px;
    width: 6px;
    height: 10px;
    background: #333;
    border-radius: 2px;
    animation: phoneGlow 2s ease-in-out infinite;
}

.phone::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 4px;
    height: 6px;
    background: #4ade80;
    border-radius: 1px;
    animation: screenFlicker 1.5s infinite;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: fall 4s linear infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.confetti:nth-child(6) {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    top: 5%;
    left: 15%;
    animation-delay: 0s;
}

.confetti:nth-child(7) {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    top: 8%;
    left: 85%;
    animation-delay: 0.5s;
}

.confetti:nth-child(8) {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    top: 12%;
    left: 35%;
    animation-delay: 1s;
}

.confetti:nth-child(9) {
    background: linear-gradient(45deg, #10b981, #059669);
    top: 18%;
    left: 75%;
    animation-delay: 1.5s;
}

.confetti:nth-child(10) {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    top: 22%;
    left: 25%;
    animation-delay: 2s;
}

.confetti:nth-child(11) {
    background: linear-gradient(45deg, #f97316, #ea580c);
    top: 28%;
    left: 65%;
    animation-delay: 2.5s;
}

.confetti:nth-child(12) {
    background: linear-gradient(45deg, #ec4899, #db2777);
    top: 32%;
    left: 45%;
    animation-delay: 3s;
}

.confetti:nth-child(13) {
    background: linear-gradient(45deg, #06b6d4, #0891b2);
    top: 38%;
    left: 90%;
    animation-delay: 3.5s;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
    box-shadow: 0 0 10px #fff;
}

.sparkle:nth-child(14) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.sparkle:nth-child(15) {
    top: 60%;
    left: 70%;
    animation-delay: 0.7s;
}

.sparkle:nth-child(16) {
    top: 40%;
    left: 10%;
    animation-delay: 1.4s;
}

.sparkle:nth-child(17) {
    top: 70%;
    left: 50%;
    animation-delay: 2.1s;
}

.balloon {
    position: absolute;
    width: 25px;
    height: 35px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.9;
    animation: floatBalloon 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: #333;
}

.balloon.left {
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation-delay: 0s;
}

.balloon.right {
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation-delay: 1.5s;
}

.balloon.center {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    animation-delay: 3s;
}

.title-banner {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #2c3e50;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.text-section {
    flex: 1;
    padding-left: 40px;
}

.profile-card {
    background: #e9913a;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.avatar {
    width: 60px;
    height: 60px;
    background: #fdbf47;
    border-radius: 50%;
    position: relative;
}

.profile-name {
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

.profile-description {
    color: white;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

/* Animations */
@keyframes celebrate {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-15px) rotate(-3deg) scale(1.05);
    }

    50% {
        transform: translateY(-25px) rotate(3deg) scale(1.1);
    }

    75% {
        transform: translateY(-15px) rotate(-2deg) scale(1.05);
    }

    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

@keyframes headBob {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-3px) rotate(2deg);
    }
}

@keyframes hairSway {
    0%,
    100% {
        transform: translateX(-50%) rotate(0deg);
    }

    50% {
        transform: translateX(-50%) rotate(3deg);
    }
}

@keyframes waveArms {
    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-25deg);
    }

    75% {
        transform: rotate(25deg);
    }
}

@keyframes phoneGlow {
    0%,
    100% {
        box-shadow: 0 0 5px rgba(74, 222, 128, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 1);
    }
}

@keyframes screenFlicker {
    0%,
    100% {
        background: #4ade80;
    }

    50% {
        background: #22c55e;
    }
}

@keyframes floatBalloon {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-10px) rotate(2deg);
    }

    66% {
        transform: translateY(-5px) rotate(-2deg);
    }
}

@keyframes sparkle {
    0%,
    100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
        box-shadow: 0 0 20px #fff;
    }
}

@keyframes fall {
    0% {
        transform: translateY(-120px) rotate(0deg) scale(1);
        opacity: 1;
    }

    25% {
        transform: translateY(-60px) rotate(90deg) scale(1.2);
        opacity: 1;
    }

    50% {
        transform: translateY(0px) rotate(180deg) scale(0.8);
        opacity: 0.8;
    }

    75% {
        transform: translateY(60px) rotate(270deg) scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: translateY(450px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes eyeBlink {
    0%,
    85%,
    100% {
        height: 3px;
        opacity: 1;
    }

    90%,
    95% {
        height: 0.5px;
        opacity: 0.8;
    }
}

@keyframes smile {
    0%,
    100% {
        width: 20px;
        height: 8px;
        border-radius: 0 0 8px 8px;
    }

    50% {
        width: 22px;
        height: 10px;
        border-radius: 0 0 10px 10px;
    }
}

@keyframes blush {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 20px;
        padding: 20px 10px;
        min-height: auto;
    }

    .image-section {
        width: 100%;
        margin-bottom: 10px;
    }

    .team-illustration {
        height: 300px;
        border-radius: 15px;
        margin: 0 auto;
    }

    .celebration-scene {
        padding: 15px 10px;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .person {
        width: 45px;
        height: 65px;
        flex-shrink: 0;
    }

    .person-head {
        width: 50px;
        height: 50px;
        margin-bottom: 3px;
    }

    .person-body {
        width: 28px;
        height: 40px;
    }

    .person-arms {
        top: 8px;
        height: 15px;
    }

    .person-arm {
        width: 6px;
        height: 15px;
    }

    .person-arm.left {
        left: -3px;
    }

    .person-arm.right {
        right: -3px;
    }

    .phone {
        width: 4px;
        height: 7px;
        top: -6px;
        right: -8px;
    }

    .phone::before {
        width: 2px;
        height: 4px;
    }

    /* Ajustement des cheveux pour mobile */
    .person:nth-child(1) .hair {
        width: 22px;
        height: 11px;
    }

    .person:nth-child(2) .hair {
        width: 18px;
        height: 9px;
    }

    .person:nth-child(3) .hair {
        width: 25px;
        height: 13px;
    }

    .person:nth-child(4) .hair {
        width: 20px;
        height: 10px;
    }

    .person:nth-child(5) .hair {
        width: 23px;
        height: 12px;
    }

    /* Ballons plus petits sur mobile */
    .balloon {
        width: 18px;
        height: 25px;
    }

    .balloon::after {
        height: 15px;
        bottom: -12px;
    }

    .balloon.left {
        top: 10px;
        left: 10px;
    }

    .balloon.right {
        top: 10px;
        right: 10px;
    }

    .balloon.center {
        top: 8px;
    }

    /* Confettis adaptés */
    .confetti {
        width: 6px;
        height: 6px;
    }

    .sparkle {
        width: 3px;
        height: 3px;
    }

    /* Banner titre */
    .title-banner {
        font-size: 16px;
        padding: 10px 20px;
        bottom: -18px;
        letter-spacing: 1px;
    }

    /* Section texte */
    .text-section {
        padding-left: 0;
        width: 100%;
    }

    .profile-card {
        padding: 20px;
        border-radius: 15px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .profile-image {
        width: 60px;
        height: 60px;
    }

    .profile-name {
        font-size: 24px;
    }

    .profile-description {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Animations adaptées pour mobile */
    @keyframes celebrate {
        0% {
            transform: translateY(0) rotate(0deg) scale(1);
        }
        25% {
            transform: translateY(-8px) rotate(-2deg) scale(1.03);
        }
        50% {
            transform: translateY(-15px) rotate(2deg) scale(1.06);
        }
        75% {
            transform: translateY(-8px) rotate(-1deg) scale(1.03);
        }
        100% {
            transform: translateY(0) rotate(0deg) scale(1);
        }
    }

    .person:hover {
        transform: scale(1.15) translateY(-10px);
    }

    .person.selected {
        transform: scale(1.2) translateY(-15px);
    }

    /* Fallback pour les téléphones très petits */
    @media (max-width: 480px) {
        .celebration-scene {
            padding: 10px 5px;
        }

        .person {
            width: 38px;
            height: 55px;
        }

        .person-head {
            width: 42px;
            height: 42px;
        }

        .person-body {
            width: 24px;
            height: 35px;
        }

        .title-banner {
            font-size: 14px;
            padding: 8px 15px;
        }
    }
}

/* Tablettes en mode portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        gap: 40px;
        padding: 30px 15px;
    }

    .team-illustration {
        height: 350px;
    }

    .person {
        width: 55px;
        height: 75px;
    }

    .person-head {
        width: 60px;
        height: 60px;
    }

    .title-banner {
        font-size: 20px;
        padding: 12px 30px;
    }
}
