/* Accueil équipements (lits, pesons, …) — grille 4 colonnes sur ordinateur */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-image: url(/img/poids3.png);
    background-size: 20%;
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 90px auto;
    padding: 20px;
    padding-top: 80px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.header-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.chooser-intro {
    text-align: center;
    color: #4b5563;
    margin: -10px 0 28px;
    font-size: 1rem;
}

.chooser-back {
    text-align: center;
    margin-top: 30px;
}

.chooser-back .back-link {
    color: #0cb166;
    text-decoration: none;
    font-weight: 600;
}

.section-header {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0cb166;
    margin-top: 30px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.section-header i {
    margin-right: 10px;
    font-size: 1.6rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.btn-login-redirect {
    color: #203cad;
    text-decoration: none;
    font-size: x-large;
}

.unauthorized-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40vh;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .container {
        margin: 90px 10px 20px 10px;
        padding: 15px;
    }

    .card-link {
        padding: 15px 10px;
    }

    .card-link p {
        font-size: 0.9rem;
    }

    .grid .card-link-wide {
        grid-column: 1 / -1;
        padding: 20px;
    }

    .grid .card-link-wide .icon-placeholder i {
        font-size: 20px;
    }

    .grid .card-link-wide p {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 767.98px) {
    .container {
        margin: 0 10px 16px 10px;
        padding: 20px 15px 18px;
    }

    .header-title {
        font-size: 2.2rem;
        margin-bottom: 16px;
        padding-bottom: 6px;
    }
}

.card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;
    background-color: #edf4f79c;
    color: black;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    min-height: 120px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-link:hover {
    border-color: #367fc4ff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    transform: translateY(-3px);
}

.card-link img,
.card-link .icon-placeholder {
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.0));
}

.card-link img {
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    height: auto;
}

.card-link .icon-placeholder i {
    font-size: 30px;
    color: #0cb166;
}

.card-link p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    white-space: nowrap;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.card-link-marque p {
    text-transform: uppercase;
}

.icon-placeholder {
    font-size: 2rem;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.error-box {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
