#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.birthday-card {
    max-width: 1200px;
    width: 90%;
    margin: 2rem auto;
    background-color: var(--blanc);
    border-radius: 2rem;
    box-shadow: var(--shadow-hover);
    padding: 2.8rem 2.5rem;
    position: relative;
    z-index: 20;
    border: 1px solid var(--gris-border);
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
    /* Correction pour éviter le décalage sur mobile */
    box-sizing: border-box;
    overflow-x: hidden;
}

.zeag-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.zeag-logo {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--bleu-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-right: 3px solid var(--jaune-orange);
    padding-right: 1.2rem;
}

.birthday-badge {
    background: var(--jaune-orange-gradient);
    color: var(--bleu);
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.2rem);
    padding: 0.5rem 1.3rem;
    border-radius: 40px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.birthday-badge i {
    font-size: 1.3rem;
}

.wish-text {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--bleu);
    font-weight: 500;
    margin: 1rem 0 2.5rem;
    background: var(--gris-pale);
    padding: 1rem 2rem;
    border-radius: 40px;
    display: inline-block;
    border: 1px dashed var(--gris-border);
}

.birthday-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2.5rem 0 2rem;
}

.birthday-item {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gris-border);
    transition: var(--transition);
    cursor: default;
    animation: float-in 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    width: 100%;
    /* Correction pour éviter les débordements */
    max-width: 100%;
}

.birthday-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--jaune-orange);
}

.birthday-item:hover::after {
    content: "\f0a2";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    font-size: 2.5rem;
    top: 15px;
    right: 15px;
    color: var(--jaune-orange);
    transform: rotate(15deg);
    opacity: 0.9;
    animation: wiggle 0.3s infinite alternate;
    pointer-events: none;
    z-index: 5;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

 .birthday-item .birthday-share {
    position: absolute;
    display: flex;
    gap: 15px;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: white;
    z-index: 10;
}

 .birthday-share i {
    font-size: 18px;
 }

.birthday-flyer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.birthday-item:hover .birthday-flyer {
    transform: scale(1.1);
}

.person-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(10, 44, 117, 0.9) 0%, transparent 100%);
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.person-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    display: block;
    line-height: 1.3;
}

.person-role {
    font-size: 0.85rem;
    opacity: 0.9;
    display: block;
    line-height: 1.3;
}

.birthday-item:hover .person-info {
    background: linear-gradient(to top, rgba(10, 44, 117, 0.98) 0%, rgba(225, 6, 0, 0.8) 70%, transparent 100%);
    padding-bottom: 1.5rem;
}

.footer-note {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--bleu);
    border-top: 2px solid var(--jaune-orange);
    padding-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-note span:last-child {
    background: var(--jaune-orange-gradient);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    color: var(--bleu);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.emoji-big {
    font-size: 1.2rem;
}

.bg-bubble {
    position: absolute;
    background: radial-gradient(circle, rgba(250, 207, 15, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.mini-confetti {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.mini-confetti i {
    position: absolute;
    display: block;
    opacity: 0.7;
    color: var(--jaune-orange);
    font-size: 1.4rem;
    animation: fall 6s linear infinite;
    user-select: none;
}

@keyframes float-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(10deg) scale(1);
    }
    100% {
        transform: rotate(20deg) scale(1.1);
    }
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0.8;
    }
    80% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 992px) {
    .birthday-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .birthday-card {
        padding: 2rem 1.5rem;
    }

    .person-name {
        font-size: 1rem;
    }

    .person-role {
        font-size: 0.75rem;
    }

    .person-info {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .birthday-card {
        width: 92%;
        padding: 1.5rem 1rem;
        margin: 1rem auto;
    }

    .zeag-header {
        justify-content: center;
        text-align: center;
    }

    .zeag-logo {
        border-right: none;
        border-bottom: 3px solid var(--jaune-orange);
        padding-right: 0;
        padding-bottom: 0.5rem;
        width: 100%;
    }

    .birthday-badge {
        width: auto;
        margin: 0 auto;
    }

    .wish-text {
        padding: 0.8rem 1.2rem;
        width: 100%;
        text-align: center;
        font-size: 0.95rem;
        box-sizing: border-box;
    }
}

@media (max-width: 576px) {
    .birthday-card {
        width: 95%;
        padding: 1.2rem 0.8rem;
    }
    
    .birthday-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    .birthday-item {
        aspect-ratio: 1 / 1;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .person-name {
        font-size: 1.1rem;
    }

    .person-role {
        font-size: 0.8rem;
    }

    .person-info {
        padding: 0.8rem;
    }

    .footer-note {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-note span:first-child {
        order: 2;
    }

    .footer-note span:last-child {
        order: 1;
        width: fit-content;
        margin: 0 auto;
    }
}

@media (max-width: 380px) {
    .birthday-card {
        padding: 1rem 0.75rem;
        width: 96%;
    }

    .birthday-grid {
        gap: 1rem;
    }

    .person-name {
        font-size: 1rem;
    }

    .person-role {
        font-size: 0.7rem;
    }

    .person-info {
        padding: 0.6rem;
    }

    .wish-text {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .birthday-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
}

/* Support pour les écrans très larges */
@media (min-width: 1400px) {
    .birthday-card {
        max-width: 1400px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .birthday-item,
    .birthday-item:hover,
    .birthday-flyer,
    .mini-confetti i {
        animation: none;
        transition: none;
    }

    .birthday-item:hover::after {
        animation: none;
    }
}

@media print {
    #confetti-canvas,
    .mini-confetti,
    .bg-bubble {
        display: none;
    }

    .birthday-card {
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
    }
}