@font-face {
    font-family: "Coluna";
    src: url("public/fonts/Coluna.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --container-width: 1400px;
    --gap: 16px;
    --radius: 0.9375rem;

    --blue: #5DC2EE;
    --white: #ffffff;

    --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: var(--white);
    background: url("public/img/background.jpg") center center / cover no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
}

main {
    display: block;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

.home-grid {
    width: min(calc(100% - 32px), var(--container-width));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.grid-links {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap);
}

.card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    isolation: isolate;
    background-color: #0b203d;
    transform: translateY(0);
    transition: transform 0.2s ease;
}

.card img {
    transition: transform 0.25s ease;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transition: background 0.2s ease;
}

.card h2 {
    color: var(--white);
    font-size: 2.8rem;
    font-family: "Coluna";
    line-height: 3rem;
    margin : 20px 0;
}

.card h2 span{
    color: var(--blue);
}

.card-large .card-bloc, .card-medium .card-bloc{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.card-small .card-bloc{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    z-index: 2;
}

.ligue-logo{
    position: absolute;
    left: 20px;
    top: 20px;
    display: flex;
    gap : 20px;
    z-index: 3;
}

.ligue-logo img{
    max-height: 70px;
    width: auto;
}

.card-bloc img{
    max-width: 110px;
    object-fit: contain;
}

.card-large {
    grid-column: span 7;
    height: 300px;
}

.card::after {
    background: radial-gradient(
            34.37% 19.44% at 50% 80.56%,
            rgba(28, 36, 74, 0.28) 0%,
            rgba(28, 36, 74, 0.40) 100%
    );
}

.card:hover::after {
    background:
            linear-gradient(
                    180deg,
                    rgba(28, 36, 74, 0.025) 50%,
                    rgba(28, 36, 74, 0.26) 100%
            ),
            radial-gradient(
                    24.92% 19.7% at 50% 80.3%,
                    rgba(28, 36, 74, 0.13) 0%,
                    rgba(28, 36, 74, 0.25) 100%
            );
}


.card-medium {
    grid-column: span 5;
    height: 300px;
}

.card-small {
    grid-column: span 4;
    height: 300px;
}

.card:hover img {
    transform: scale(1.04);
}

.card:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .home-grid {
        width: min(calc(100% - 24px), var(--container-width));
        padding: 24px 0 40px;
    }

    .grid-links {
        gap: 14px;
    }

    .card-large,
    .card-medium {
        grid-column: span 12;
        min-height: 300px;
    }

    .card-small {
        grid-column: span 6;
        min-height: 240px;
    }

    .card-bloc img {
        width: 100px;
    }
}

@media (max-width: 640px) {
    body {
        background-attachment: scroll;
    }

    .home-grid {
        width: min(calc(100% - 20px), var(--container-width));
        padding: 20px 0 28px;
    }

    .grid-links {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-large,
    .card-medium,
    .card-small {
        grid-column: span 1;
        min-height: 210px;
    }

    .card-bloc img {
        max-width: 200px;
    }

    .card-bloc h2{
        font-size: 2.2rem;
    }

    .ligue-logo {
        left: 12px;
        top: 12px;
        gap: 10px;
    }

    .ligue-logo img {
        max-height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .card img,
    .card::after {
        transition: none;
    }

    .card:hover {
        transform: none;
    }

    .card:hover img {
        transform: none;
    }
}