/* ========================================
   BASE STYLES (Desktop first approach)
   ======================================== */

.main-content {
    position: relative;
    z-index: 2;
}

header {
    height: 70px;
    width: 100vw;
}

.logo-container {
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 0 22px;
    gap: 0.25rem;
    user-select: none;
}

.logo-container img {
    height: 1.75rem;
    width: auto;
}

.logo-container span {
    font-weight: 600;
    color: var(--primary-500);
    font-size: 0.775rem;
    margin-left: 6px;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: calc(100vh - 140px);
    width: 60vw;
    margin: 0 auto;
    overflow-y: auto;
    padding: 2rem;
}

main .card {
    min-height: 100px;
    height: 100px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 22px;
    margin: 12px 0;
    background-color: var(--card);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

main .card:hover {
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

main .date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    opacity: 0.8;
    color: var(--muted-foreground);
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

main .date .day,
main .date .month,
main .date .year {
    font-weight: 600;
    opacity: 1;
    color: var(--primary-500);
}

main .card .separator {
    height: 80%;
    width: 1px;
    margin: 0 22px;
    background-color: var(--input);
}

main .card .content {
    flex: 1;
}

main .card .content h1 {
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 0.05rem;
    margin-bottom: 8px;
}

main .card .content .description {
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

footer {
    height: 70px;
    width: 100vw;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

a {
    color: var(--muted-foreground);
    margin: 0 2rem;
    transition: color 0.3s;
    text-decoration: none;
}

a:hover {
    cursor: pointer;
    color: var(--foreground);
}

.dot {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50vh;
    z-index: 1;
    mask-image: linear-gradient(to top, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 100%);
}

.grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    z-index: 1;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablette (landscape) et petits écrans desktop */
@media (max-width: 1024px) {
    main {
        width: 75vw;
        padding: 1.5rem;
    }

    main .card {
        padding: 18px;
    }

    main .card .separator {
        margin: 0 16px;
    }

    footer {
        flex-wrap: wrap;
        padding: 1rem 0;
    }

    a {
        margin: 0.5rem 1rem;
    }
}

/* Tablette (portrait) */
@media (max-width: 768px) {
    .logo-container {
        padding: 0 16px;
    }

    .logo-container img {
        height: 1.5rem;
    }

    .logo-container span {
        font-size: 0.7rem;
    }

    main {
        width: 90vw;
        height: calc(100vh - 140px);
        padding: 1rem;
    }

    main .card {
        min-height: 90px;
        height: auto;
        padding: 16px;
        margin: 10px 0;
    }

    main .card .separator {
        margin: 0 12px;
    }

    main .card .content h1 {
        font-size: 1.1rem;
    }

    main .card .content .description {
        font-size: 0.9rem;
    }

    footer {
        padding: 1rem;
    }

    a {
        margin: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .logo-container {
        padding: 0 12px;
    }

    .logo-container img {
        height: 1.25rem;
    }

    .logo-container span {
        font-size: 0.65rem;
        margin-left: 4px;
    }

    main {
        width: 100vw;
        height: calc(100vh - 140px);
        padding: 0.75rem;
    }

    footer {
        flex-direction: row;
        justify-content: space-around;
        padding: 1rem 0;
        gap: 0.5rem;
    }

    a {
        margin: 0.25rem 0;
        font-size: 0.85rem;
    }

    /* Ajustement des patterns pour mobile */
    .dot,
    .grid {
        height: 30vh;
    }
}

/* Très petits mobiles */
@media (max-width: 375px) {
    .logo-container span {
        display: none;
    }

    main .card {
        padding: 12px;
    }

    main .card .content h1 {
        font-size: 0.95rem;
    }

    main .card .content .description {
        font-size: 0.8rem;
    }
}

/* Support pour les écrans très larges */
@media (min-width: 1920px) {
    main {
        width: 50vw;
        max-width: 1200px;
    }
}