/* Grid Section */
.grid-section {
    padding: 5rem 2rem;
}

@keyframes sweep {
  0%   { background-position: 200% 50%; }
  100% { background-position: 0% 50%; }
}

.grid-title {
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 4rem;
    transform: rotate(-1deg);
    background: linear-gradient(
        120deg,
        rgb(255, 64, 160) 0%,
        rgb(255, 64, 160) 40%,
        rgb(0, 102, 255) 60%,
        rgb(255, 64, 160) 70%,
        rgb(255, 64, 160) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sweep 2.5s linear infinite;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    row-gap: 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-box {
    height: fit-content;
    width: fit-content;
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.2), rgba(125, 211, 252, 0.2));
    border-radius: 1rem;
    border: 2px solid;
    transition: transform 0.3s ease;
}

.grid-box:hover {
    transform: rotate(0deg) !important;
}

.grid-box-1 {
    border-color: #c77dff;
    transform: rotate(1deg);
}

.grid-box-2 {
    border-color: #7dd3fc;
    transform: rotate(-2deg) translateY(2rem);
}

.grid-box-3 {
    border-color: #fde047;
    transform: rotate(2deg);
}

.grid-box .emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.grid-box h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.grid-box-1 h4 { color: #c77dff; }
.grid-box-2 h4 { color: #7dd3fc; }
.grid-box-3 h4 { color: #fde047; }

.grid-box p {
    color: rgba(254, 247, 230, 0.8);
}

.grid-box img {
    min-height: 30em;
    border-radius: inherit;
    max-width: 100%;   /* l’image ne dépasse pas son parent */
    height: auto;      /* conserve le ratio */
    display: block;
    margin: 0 auto;    /* centre l’image */
}

/* Responsive */
@media (max-width: 768px) {
    .grid { grid-template-columns: repeat(1, 1fr); }
    .grid-box-2 { transform: rotate(-2deg) translateY(0); }
}