/* CSS Document */

body, div {
    width: 100%;
    padding: 0;
    margin: 0;
}

.head-h {
    color: #ffeaea;
    padding: 5px;
    background-color: #3b3b3b;
    height: 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    box-sizing: border-box;
}

.head-h h2 {
    padding-left: 15px;
}

#contener {
    position: relative;
    left: 35%;
}

.nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 0;
}

.nav li,
.nav a {
    display: inline;
    list-style: none inside;
    margin: 0 10px;
}

.nav a {
    text-decoration: none;
    color: #3b3b3b;
    font-size: 18pt;
    transition: color 0.3s, box-shadow 0.3s;
}

.nav a:hover {
    color: gold;
    box-shadow: 20px -10px gold;
}

.login-container label,
.login-container input {
    display: grid;
    padding: 2px;
    margin-left: 100px;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 2em;
}

.login-container label {
    align-self: center;
}

.hero {
    margin-left: 75px;
}

img {
    max-width: 100%;
    height: auto;
}
.detenteur{
	width:50%;
}
.footer {
    padding: 0;
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #ffeaea;
    background-color: #3b3b3b;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styling for main page */
#data_toys img {
    box-shadow: 8px 8px 10px 0 rgba(0, 0, 0, 0.5);
}

.norm a {
    text-decoration: none;
    color: white;
    font-size: 18pt;
}

.grid-container {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Responsiveness for grid */
    gap: 10px;
    border: 2px solid #333;
    padding: 10px;
    background-color: #fff;
}

/* Connection */
.buttons-container {
    text-align: center;
    margin-top: 50px;
}

.btn {
    margin: 10px;
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Media query for responsiveness on smartphones */
@media (max-width: 640px) {
    * {
        box-sizing: border-box;
    }

    body {
        width: auto;
        margin: 0;
        padding: 0;
    }

    img,
    table,
    td,
    blockquote,
    code,
    pre,
    textarea,
    input,
    iframe,
    object,
    embed,
    video {
        max-width: 100%;
    }

    img {
        height: auto;
    }
	
    .tbimg img {
        width: 50%; /* Réduire la largeur des images à 50% de la largeur du conteneur */
        height: auto; /* Assurer la hauteur proportionnelle */
    }

    textarea,
    table,
    td,
    th,
    code,
    pre,
    samp {
        -webkit-hyphens: auto; /* césure propre */
        -moz-hyphens: auto;
        hyphens: auto;
        word-wrap: break-word; /* passage à la ligne forcé */
    }

    code,
    pre,
    samp {
        white-space: pre-wrap; /* passage à la ligne spécifique pour les éléments à châsse fixe */
    }

    .element1,
    .element2 {
        float: none;
        width: auto;
    }

    .u-mobile {
        display: block;
        display: revert !important; /* affichage des éléments */
    }

    .u-no-mobile {
        display: none !important; /* masquage des éléments */
    }

    body:before {
        content: "Version mobile du site";
        display: block;
        text-align: center;
        font-style: italic;
        color: #777;
    }

    .head-h {
        height: auto;
        padding: 15px;
        flex-direction: column;
        align-items: center;
    }

    .head-h h2 {
        padding-left: 0;
        text-align: center;
    }

    #contener {
        left: 0;
        text-align: center;
    }

    .nav {
        flex-direction: column;
    }

    .nav li,
    .nav a {
        display: block;
        text-align: center;
        margin: 5px 0;
    }

    .login-container {
        margin-left: 0;
        gap: 10px;
    }

    .login-container label,
    .login-container input {
        grid-template-columns: 1fr;
    }

    .hero {
        margin-left: 0;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .footer {
        padding: 10px;
        height: auto;
    }

    /* Reducing images in #nav_detenteur */
    #nav_detenteur img {
        width: 100%;
        max-width: 200px; /* Adjust as needed */
        height: auto;
    }

    #nav_detenteur {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #nav_detenteur form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #nav_detenteur form input[type="text"] {
        width: 80%;
        margin: 5px 0;
    }

    #nav_detenteur form input[type="submit"] {
        width: 50%;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    td, th {
        padding: 8px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    .total {
        text-align: center;
        padding: 10px 0;
    }
}

@media (max-device-width: 768px) and (orientation: landscape) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
}
