/* Réinitialisation des marges et des rembourrages */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
}

.custom-checkbox-label {
    cursor: pointer;
}

.custom-box {
    line-height: 2;
    padding: 20px 15px;
    border-radius: 10px;
    background-color: #f8f8f8;
    margin: 5px;
    display: inline-block;
    width: calc(50% - 10px); /* Ajuste la largeur pour compenser les marges */
    box-sizing: border-box; /* Inclut le padding et les bordures dans la largeur */
    white-space: nowrap; /* Empêche le retour à la ligne */
    overflow: hidden; /* Cache le contenu qui dépasse */
    text-overflow: ellipsis; /* Ajoute les ellipses */
}

/* Media query pour les écrans de 768px ou moins (mobiles et tablettes) */
@media (max-width: 768px) {
    .custom-box {
        width: calc(100% - 10px); /* 100% moins les marges */
    }
}

.custom-box:hover {
    cursor: pointer;
}

.custom-box.selected {
    outline: 1px solid #434343;
    animation: shrink 0.2s ease;
}

@keyframes shrink {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

.custom-box.disabled {
    background-color: #d3d3d3;
    color: #a9a9a9;
    cursor: not-allowed;
    border: 1px solid #a9a9a9;
    text-decoration: line-through;
}

.sortable {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.sortable li {
    margin: 0 3px 3px 3px;
    padding: 0.4em;
    padding-left: 1.5em;
    height: 18px;
}
.sortable li span {
    position: absolute;
    margin-left: -1.3em;
}
details {
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 0.5em 0.5em 0;
    margin-bottom: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
}

summary {
    font-weight: bold;
    cursor: pointer;
    padding: 0.5em 0.5em 1em;
    border-radius: 4px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.pagination button,
.pagination a {
    background-color: #fff;
    color: #585858; /* Bleu par défaut */
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.pagination button:hover,
.pagination a:hover {
    background-color: #dbdbdb;
    color: rgb(0, 0, 0);
}

.pagination button.active,
.pagination a.active {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: 1px solid #000000;
    font-weight: bold;
}

.carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.main-image-container {
    width: 80%;
    margin-bottom: 20px;
    text-align: center;
}
.main-image-container img {
    max-width: 100%; /* La largeur maximale de l'image sera de 100% de la largeur du conteneur */
    max-height: 300px; /* Vous pouvez ajuster la hauteur maximale selon vos besoins */
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* Pour centrer l'image horizontalement */
}
.thumbnails {
    display: flex;
    gap: 10px;
}
.thumbnails img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}
.thumbnails img:hover {
    transform: scale(1.1);
}

.btnp {
    cursor: pointer;
    top: 1rem;
    z-index: 5;
    padding: 1rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0.2rem;
}
.btnp.selected {
    background-color: #007bff;
    color: white;
    border: 1px solid #0056b3;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.cart-button {
    position: fixed;
    bottom: 20px; /* Ajuste la position verticale selon tes besoins */
    right: 20px; /* Ajuste la position horizontale selon tes besoins */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    z-index: 1;
    justify-content: center;
    align-items: center;
    text-decoration: none;
  }
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner i {
    display: inline-block;
    animation: spin 1s linear infinite;
}
.badge {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 3px 6px;
    font-size: 12px;
    position: absolute;
    top: -5px;
    right: -7px;
  }
  .badgemobile {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 3px 6px;
    font-size: 12px;
  }
  .badge0 {
    display: none;
  }
  
/* Styles pour le header */
/* Styles pour le header mobile, le reste est dans la classe head */

.overlay {
    height: 100%;
    width: 100%;
    position: fixed;
    z-index: 4;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    transition: 0.5s;
}

@media screen and (min-width: 769px) {
    .hide-on-desktop {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

/* Conteneur principal qui contient la barre de navigation et le contenu */
.main-container {
    display: flex;
    flex-direction: column; /* Par défaut, pour les petits écrans */
    width: 100%;
    height: auto; /* Permet d'adapter la hauteur en fonction du contenu */
}

/* Styles de base pour la barre de navigation */
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    width: 100%;
    background-color: #f8f8f8;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
}

.navbar {
    display: flex;
    justify-content: center;
    width: 100%; /* S'assure que la barre prend la largeur complète */
}

#nav-list {
    display: flex;
    overflow-x: auto;
    padding: 0;
    list-style: none;
    scrollbar-width: none; /* Firefox */
    margin: 0;
}

#nav-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

#nav-list li {
    display: inline-block;
}

#nav-list li button,
#nav-list li a {
    display: block;
    padding: 0px 20px;
    text-decoration: none;
    color: rgb(0, 0, 0);
    font-size: 1em;
}

#nav-list li button:hover,
#nav-list li a:hover,
#nav-list li p:hover {
    color: #3f3f3f;
}

#nav-list {
    flex-direction: row; /* Barre horizontale pour les petits écrans */
}

#nav-list li button,
#nav-list li a,
#nav-list li p {
    border-radius: 50px;
    border: 1px solid #e2e2e2;
    background-color: #f0f0f0;
    color: #313131;
    padding: 10px;
    margin-left: 10px;
    margin-right: 10px;
}


/* Media query pour les vues de bureau (desktop) */
@media (min-width: 769px) {
    .main-container {
        flex-direction: row; /* Affiche la barre de navigation à côté du contenu pour les grands écrans */
    }

    .content {
        flex-grow: 1; /* Permet à la section de contenu de prendre l'espace restant */
        padding: 20px; /* Ajoute un peu de marge autour du contenu */
    }
}

/* Styles pour le header pc */

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.large-container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Styles pour ajuster la taille du logo sur l'iamge de présentation */
.logo-presentation {
    max-width: 250px;
    width: auto;
    height: auto;
}
/* Pour les écrans de petite taille */
@media screen and (max-height: 600px) {
    .logo-presentation {
        max-width: 150px; /* Réduisez la largeur maximale pour les petits écrans */
    }
}

.logo {
    font-size: 24px;
    font-weight: bold;
}
.headernav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.headernav ul li {
    display: inline;
    margin-right: 20px;
    position: relative;
}

.headernav ul li a {
    text-decoration: none;
}

/* Dropdown */
.dropdown {
    display: inline-block;
    position: relative;
}

.dropdown .dropbtn {
    cursor: pointer;
}

.hidden {
    display: none;
}

input.simpletext {
    width: calc(100% - 40px); /* Occupe toute la largeur du conteneur parent */
    padding: 10px; /* Ajoute un espace intérieur pour le confort de saisie */
    font-size: 1rem; /* Taille de la police */
    border: none; /* Supprime toutes les bordures par défaut */
    border-bottom: 1px solid #ccc; /* Ajoute une bordure grise légère en dessous */
    outline: none;
    margin: 0px 10px 10px 10px;
}

input.simpletext:focus {
    border: none; /* Supprime la bordure par défaut */
    border-bottom: 1px solid; /* Ajoute une bordure grise légère en dessous lors du focus */
}

input[readonly] {
    cursor: not-allowed;
}

/* Media queries pour les écrans mobiles */
@media only screen and (max-width: 930px) {
    .panel ul li:not(.menu-toggle) {
        display: none; /* Cache les éléments de navigation sur les écrans mobiles par défaut */
    }
    
    .menu-toggle {
        display: block; /* Affiche le menu hamburger sur les écrans mobiles */
    }
}

/* FORMULAIRE AUTH */

.login-body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Form styling for login and signup */
.login-form, .signup-form {
    width: 100%;
    max-width: 435px;
    background: #fff;
    border-radius: 10px;
    padding: 36px 36px 66px 36px;
    box-shadow: 0 1px 4px rgba(146, 161, 176, 0.2);
}

/* Header styling for forms */
.login-form h3, .signup-form h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    font-weight: 700;
    position: relative;
}

/* Back to home icon */
.back-to-home {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
}

.back-to-home a {
    font-size: 24px;
    color: #0071e3;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-to-home a:hover {
    color: #005bb5;
}

.back-to-home i {
    display: flex;
    align-items: center;
}

/* Input box styling for forms */
.input-box {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

/* Label styling for input boxes */
.input-box label {
    color: #333;
    margin-bottom: 8px;
}

/* Input field styling for forms */
.input-box input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    font-size: 14px;
    color: #333;
    outline: none;
}

.input-box input:focus {
    border-color: #0071e3;
    box-shadow: 0 1px 4px rgba(0, 113, 227, 0.2);
}

/* Password title styling */
.password-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.password-title a {
    font-size: 14px;
    color: #0071e3;
    text-decoration: none;
}

.password-title a:hover {
    text-decoration: underline;
}

/* Button styling for forms */
.connexion-btn, .signup-btn {
    width: 100%;
    color: #fff;
    border: none;
    padding: 12px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* Sign-up link styling */
.sign-up {
    margin-top: 20px;
    text-align: center;
    color: #333;
}

.sign-up a {
    text-decoration: none;
    color: #0071e3;
    font-weight: 600;
}

.sign-up a:hover {
    text-decoration: underline;
}

/* h-captcha styling */
.h-captcha {
    margin-top: 20px;
    text-align: center;
}

/* FIN FORMULAIRE AUTH */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.show {
  display: block;
}

.center-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10vh; /* Ajuste la hauteur selon tes besoins */
}

.container2 {
    text-align: center;
    margin-top: 100px;
}

header h1 {
    margin: 0;
}

header nav ul {
    list-style-type: none;
}

header nav ul li {
    display: inline;
    margin-right: 10px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
}

.panelsidebar {
    width: 400px;
    background-color: #e3e3e3;
    color: rgb(0, 0, 0);
    padding: 20px;
    height: 100vh;
    position: relative; /* Changed to relative */
    overflow-y: auto;
}

.panelsidebar h2 {
    text-align: center;
}

.panelsidebar ul {
    list-style-type: none;
    padding: 0;
}

.panelsidebar ul li {
    margin: 15px 0;
}

.panelsidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.panelsidebar ul li a:hover {
    background-color: #575757;
}

/* Styles pour le contenu */
.content {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}
.large-content {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

/* Styles pour les paragraphes */
p {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

/* STYLES ARTICLES */
.article-container {
    position: relative;
    text-align: center;
    cursor: pointer;
    border-radius: 0.5rem;
    border: 1px solid #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    background-color: white;
}

.article-container:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
}

.article-image {
    width: 65%; /* Par défaut */
    height: auto;
    margin: auto;
    opacity: 0; /* L'image est invisible au départ */
    transition: opacity 0.3s ease-in-out; /* Effet de fondu */
}

.article-grid {
    display: grid;
    gap: 1rem;
    grid-auto-flow: dense;
    justify-content: center;
}

.article-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Minimum 250px */
}


.article-grid[data-disposition="2"] .article-image {
    width: 100%; /* Images à 100% de la largeur */
    margin: 0;
}

/* Media Queries */
@media screen and (max-width: 500px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr); /* Grille compacte sur petits écrans */
    }
    .article-grid[data-disposition="2"] .article-container {
        margin-bottom: 0.5rem; /* Ajustement spécifique */
    }
}

@media screen and (min-width: 769px) {
    .hide-on-desktop {
        display: none;
    }
}
@media screen and (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

/* Styles pour les images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}
.social-icons a {
    font-size: 24px;
    color: #333;
    margin-right: 10px;
    transition: color 0.3s ease;
}

/* Style pour les select */
select {
    width: 100%;
    padding: 10px 12px; /* Ajout de padding horizontal */
    font-size: 1rem;
    border: 1px solid #ccc;
    background-color: #fff; /* Couleur de fond */
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
    transition: border-color 0.3s, box-shadow 0.3s; /* Transitions douces */
    box-sizing: border-box;
    cursor: pointer; /* Curseur de souris */
}

/* Style pour les options du select */
select option {
    padding: 8px 10px; /* Augmentation du padding pour les options */
    font-size: 1rem;
}


/* Style pour les cases à cocher et les labels */
li {
    margin-top: 10px; /* Marge en haut de chaque élément de liste */
    margin-bottom: 10px; /* Marge en bas de chaque élément de liste */
    display: flex; /* Utilisation de flexbox pour aligner les éléments sur la même ligne */
    align-items: center; /* Aligner les éléments verticalement au centre */
}

input:not([type="checkbox"]):not([type="radio"]):not(input.simpletext) {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input:not([type="checkbox"]):focus:not([type="radio"]):focus {
    outline: none;
    border-color: #007bff;
}

input[type="checkbox"],
input[type="radio"] {
    width: 20px; /* Largeur de la case à cocher ou du bouton radio */
    height: 20px; /* Hauteur de la case à cocher ou du bouton radio */
    margin-right: 10px; /* Marge à droite pour l'espace entre la case à cocher et le label */
    appearance: none; /* Suppression du style natif du navigateur */
    border: 2px solid #333; /* Bordure de la case à cocher ou du bouton radio */
    border-radius: 4px; /* Bordure arrondie */
    cursor: pointer; /* Curseur de souris au survol */
    position: relative; /* Pour positionner la coche ou le point */
    background-color: #fff; /* Couleur de fond par défaut */
    transition: all 0.3s ease; /* Transition douce pour tous les changements */
}

/* Style du bouton radio coché */
input[type="radio"]:checked::after {
    content: '\2022'; /* Symbole de point */
    color: #fff; /* Couleur du point */
    font-size: 1rem; /* Taille du point */
    position: absolute; /* Positionnement absolu */
    top: 50%; /* Centrage vertical */
    left: 50%; /* Centrage horizontal */
    transform: translate(-50%, -50%); /* Centrage par transformation */
}

/* Style de la coche de la case à cocher cochée */
input[type="checkbox"]:checked::after {
    content: '\2713'; /* Symbole de coche */
    color: #fff; /* Couleur de la coche */
    font-size: 1rem; /* Taille de la coche */
    position: absolute; /* Positionnement absolu */
    top: 50%; /* Centrage vertical */
    left: 50%; /* Centrage horizontal */
    transform: translate(-50%, -50%); /* Centrage par transformation */
}

/* Effet au survol pour les cases à cocher et les boutons radio */
input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: #777; /* Couleur de bordure au survol */
}

/* Effet quand on clique pour les cases à cocher et les boutons radio */
input[type="checkbox"]:active,
input[type="radio"]:active {
    transform: scale(0.95); /* Légère réduction de taille au clic */
}

/* Style de fond quand la case à cocher est cochée */
input[type="checkbox"]:checked {
    background-color: #333; /* Couleur de fond de la case à cocher cochée */
}

/* Style de fond quand le bouton radio est sélectionné */
input[type="radio"]:checked {
    background-color: #333; /* Couleur de fond du bouton radio sélectionné */
}
input[type="checkbox"],
input[type="radio"] {
    display: inline-block; /* Assurez-vous que les checkboxes sont affichées en ligne */
    vertical-align: middle; /* Alignement vertical au milieu */
}

.barre-horizontale {
    width: 100%; /* Définit la largeur de la barre horizontale à 100% de son conteneur */
    height: 2px; /* Hauteur de la barre horizontale */
    background-color: #333; /* Couleur de la barre horizontale */
    margin-top: 20px; /* Marge en haut de la barre horizontale */
    margin-bottom: 20px; /* Marge en bas de la barre horizontale */
}

/* Style du tableau */
.table {
    width: 100%;
    border-collapse: collapse;
	background-color: rgba(255, 255, 255);
}

/* Style du tableau */
.table {
    margin-bottom: 30px;
    margin-top: 10px;
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto; /* Ajout d'un défilement horizontal pour les petits écrans */
}

/* Style de l'en-tête */
.table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
    color: #495057;
}

/* Style des lignes de données */
.table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle; /* Centrer le contenu verticalement */
}
td {
    word-wrap: break-word; /* Force la coupure des longs mots */
    word-break: break-all; /* Facultatif pour plus de contrôle sur les chaînes longues */
}

/* Style des lignes au survol */
.table tr:hover {
    background-color: #f2f2f2;
}

/* Style des boutons dans le tableau */
.table button {
    border: none;
    cursor: pointer;
}

/* Style des icônes */
.table i {
    font-size: 1.2rem;
}

/* Styles de base pour les colonnes */
.col-id {
    width: 10%;
}
.col-category {
    width: 20%;
}
.col-name {
    width: 30%;
}
.col-price {
    width: 20%;
}
.col-action {
    width: 20%;
}

/* Media query pour les petits écrans */
@media only screen and (max-width: 768px) {
    /* Réduire la taille des cellules du tableau */
    .table th, .table td {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    /* Cacher les colonnes prix et id sur les petits écrans */
    .col-price, .col-id {
        display: none;
    }

    /* Ajuster les largeurs des colonnes restantes */
    .col-category {
        width: 30%;
    }
    .col-name {
        width: 40%;
    }
    .col-action {
        width: 30%;
    }
}


/* Contenu de la fenêtre modale */
.modal {
    display: none; /* Initialement cachée */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fond semi-transparent pour l'arrière-plan */
    overflow: auto;
    animation-name: fadeInModal;
    animation-duration: 0.3s;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 10px;
}

.modal-content-full {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    margin: auto;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    animation-duration: 0.5s;
    animation-name: slideInModal;
}
@keyframes fadeInModal {
    from {
        opacity: 0; /* Démarre transparent */
    }
    to {
        opacity: 1; /* Devient opaque */
    }
}

/* Animation de glissement depuis le haut */
@keyframes slideInModal {
    from {
        top: -100%; /* Démarre hors de l'écran */
    }
    to {
        top: 0%; /* Arrive à 10% du haut de l'écran */
    }
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}



.footer-quote {
    margin-top: 20px;
}
