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

.container {
    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);
}

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

.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 {
    /* Configuration par défaut pour grand écran */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 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 Query pour forcer 2 colonnes sur les petits écrans (téléphones) */
@media (max-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 colonnes égales sur mobile */
        gap: 10px;
        /* Réduire l'espacement pour gagner de la place */
    }

    .container {
        margin: 90px 10px 20px 10px;
        /* 90px en haut pour la navbar, 10px sur les côtés */
        padding: 15px;
        /* Petit padding intérieur */
    }

    .card-link {
        padding: 15px 10px;
        /* Réduire le padding des cartes */
    }

    .card-link p {
        font-size: 0.9rem;
        /* Réduire la taille du texte de la carte */
    }


    /* La carte "Créer Nouveau Lit" prend toute la largeur (2 colonnes) */
    .grid a[href="creationLit.php"] {
        grid-column: 1 / -1;
        /* S'étale du début (colonne 1) à la fin (dernière colonne) */
        padding: 20px;
        /* Augmenter un peu le padding pour qu'elle soit plus visible */
    }

    .grid a[href="creationLit.php"] .icon-placeholder i {
        font-size: 20px;
        /* Rendre l'icône plus grande */
    }

    .grid a[href="creationLit.php"] p {
        font-size: 1.2rem;
        /* Rendre le texte plus grand */
    }
}

.card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;

    /*background-color: #cbcbcb14;*/
    background-color:#edf4f79c;
    color: black;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    /*color: #1f2937;*/

    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);
}

/* Ajustement des icônes et logos pour être plus grands */
.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;
    /* Applique un rayon de 8px aux images */
    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;
}

/* Cible la balise <i> à l'intérieur de .icon-placeholder pour la taille de police */
.card-link .icon-placeholder i {
    font-size: 30px;
    color: #0cb166;
}

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

/* Icône de la carte d'action (MISE À JOUR pour l'ombre et l'arrondi) */
.icon-placeholder {
    font-size: 2rem;
    margin-bottom: 10px;

    /* Ajout de l'ombre et de l'arrondi pour les icônes de police */
    display: inline-flex;
    /* Permet d'encadrer l'icône proprement */
    align-items: center;
    justify-content: center;
    padding: 8px;
    /* Espace autour de l'icône */
    background-color: #ffffff;
    /* Fond blanc pour que l'ombre ressorte */
    border-radius: 8px;
    /* Ombre personnalisée par l'utilisateur */
    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;
}