html, body {	
	margin: 0;
	padding: 0;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
	font-size: 14px;
	background-color: #f9f9f9;
	text-align: justify;
}

h2, h3 {
  color: #843a40;

}

p {
  margin-bottom: 1em;
}

hr {
	border: 1px solid #795b5d;
}

button {
	background: #843a40;
	color: #fff;
	font-size: 14px;
	padding: 2px 6px;
	border-radius: 5px;
	border: none;
}

button:hover {
	cursor: pointer;
	background: #422906;

}
.error {
	color: red;
	font-size: 13px;
	width: 100%;
}

/* === BANNER === */
#banner {
	width: 100%;
	margin-bottom: 10px;
	background: #843a40;
	text-align: center;
}

#banner img {
	width: 50%;
}

/* === MENU Principale === */
nav {
    background: #843a40;
    border-radius: 10px;
    text-transform: uppercase;
    height: 40px;
	margin-bottom: 10px;
}

nav::after {
  content: "";
  display: table;
  clear: both;
}

#menuPrincipal {
  float: left;
  padding-top: 5px;
  padding-left: 10px;
}

#menuUser {
  float: right;
  padding-top: 5px;
  padding-right: 10px;
}

.menu ul li {
	display: inline-block;
}

.menu a {
	color: #fff;
	text-decoration: none;
	display: inline-block;
	text-align: center;
	padding: 5px;
}

.menu a:hover {
	background: #422906;
	transition: background-color 750ms linear;
	border-radius: 3px;
	color: #fff;
}

/* === MAIN CONTENT === */

.main {
    max-width: 1145px;   /* ou la largeur que tu veux */
    padding: 10px;
	width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dddddd;
}

.presentation-article {
    box-sizing: border-box;
    padding: 5px;
}

.article-large {
	font-family: inherit;
	line-height: 1.6em;
}

.article-large h2 {
	font-size: 1.5em;
	text-align: center;
}


/* === ARTICLES (Index.php) === */

.boutons {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
}

.articles {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 5px;
	width: 100%;
	margin: auto;
}

.article_link {
	width: calc(25% - 5px);
	text-decoration: none;
	color: inherit;
	display: block;
}

.article_link:hover {
	text-decoration: none;
	color: #000;
	font-weight:bolder;
}


.article {
	background: #f9f9f9;
	border-radius: 10px;
	border: 2px solid #843a40;
	padding: 3px;
	box-sizing: border-box;
	height: 100%;
	transition: 0.2s ease;
}

.article:hover {
	box-shadow: 0 0 150px rgba(0,0,0,0.2);
}

.article .image-wrapper {
	width: 100%;
	overflow: hidden;
}

.article img {
	width: 100%;
	border-radius: 8px;
	object-fit: cover;
}

.article h3 {
	text-align: center;
	
	margin: 5px 0;
	padding: 5px;
	color: #fff;
}

.article .categorie,
.article .date,
.article p {
	margin: 5px 0;
	padding: 5px;
	font-size: 14px;
	font-weight: 300;
}

.article h3,
.article_unique h3 {
  background-color: #843a40; /* ou un ton plus doux si trop sombre */
}

/* === ARTICLE UNIQUE (article.php) === */
.sgrille {
	margin-top: 10px;
	display: flex;
	justify-content: center;
}

.grille {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 5px;
}

.article_unique {
    display: flex;
    flex-direction: column; /* <-- changez 'row' pour 'column' */
    align-items: center;    /* centre l'image et le texte */
    gap: 50px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #843a40;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
	min-height: 350px; /* ou la valeur souhaitée */
}

.article_unique:hover {
	box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.article_unique img {
	width: 200px;
	height: auto;
	border-radius: 4px;
	object-fit: cover;
}

.article_unique_content {
    width: 100%;
    flex: unset;
}

.article_unique_content h3 {
	text-align: center;
	font-size: 1.1em;
	padding: 3px;
	color: #fff;
}

.article_unique_content .description {
	font-size: 10px;
	width: 100%;
	padding-right: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.5em; 
    max-height: 9.3em;  /* 5 lignes x 1.5em */
}

.article_unique_content .prix {
	font-size: 14px;
}

.article_unique_content .button {
	display: flex;
	margin-top: 8px;
	padding-left: 10px;
}

.article_unique_content .details {
	background: #843a40;
	color: #fff;
	margin-right: 10px;
}

.article_unique h3{
	color: #fff;
}

.article_unique .categorie,
.article_unique .date,
.article_unique p {
	margin: 5px 0;
	padding: 5px;
	font-weight: 300;
}

/* Réajustement des articles pour les petits écrans */
@media (max-width: 1024px) {
    .articles {
        flex-direction: column;
        align-items: center; /* Centrer les articles */
    }

    .article_link {
        width: 90%; /* Réduit la largeur de chaque article sur mobile */
        font-size: 1.2em; /* Augmenter la taille du texte sur mobile */
        margin-bottom: 20px; /* Ajouter un espacement entre les articles */
    }

    .article {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrer le contenu de l'article */
        padding: 10px;
        justify-content: flex-start;
    }

    .article .image-wrapper {
        width: 100%; /* Utiliser toute la largeur de l'article */
        display: flex; /* Appliquer flexbox sur le conteneur de l'image */
        justify-content: center; /* Centrer l'image horizontalement */
    }

    .article img {
        width: 50%; /* Réduire la taille de l'image */
        height: auto; /* Assurer que l'image garde ses proportions */
        object-fit: contain; /* Garder l'image contenue sans la déformer */
    }

    .article h3 {
        text-align: center;
        font-size: 1.5em; /* Réduire la taille du titre pour mieux s’adapter à l’écran */
    }

    .article .categorie,
    .article .date,
    .article p {
        font-size: 1.1em; /* Augmenter légèrement la taille du texte pour les paragraphes */
    }
}

/* === FORMULAIRES === */
input {
	outline: none;
	background: #fff;
	border: 1px solid gray;
}

input[type=text] {
	padding: 4px 8px;
	width: 78%;
	height: 28px;
}

input[type=submit] {
	width: auto;
	height: 28px;
	background: #843a40;
	color: #fff;
	font-size: 14px;
	position: relative;
	left: -3px;
	top: 1px;
}

input[type=submit]:hover {
	background: #422906;
}

/* === ADMIN & LOGIN === */
/* Conteneur principal pour centrer horizontalement */
section.Administration {
    display: flex;
    justify-content: center; /* Centre horizontalement */
}

.login form {
    max-width: 400px;
    margin: 0 auto;
    font-family: sans-serif;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-group label {
    width: 100px;
    font-weight: bold;
    text-align: right;
    margin-right: 10px;
}

.form-group input {
    flex: 1;
    padding: 6px;
    font-size: 1em;
    box-sizing: border-box;
}

.error {
    color: red;
    margin-bottom: 10px;
    text-align: center;
}
/* bouton et lien connexion */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
	padding-right: 10px;
	padding-left: 10px;
}

.form-actions button {
    height: 40px;
    padding: 0 20px;
    font-size: 1em;
    line-height: 1;
    background-color: #843a40;
    border-radius: 4px;
    cursor: pointer;
}

.form-actions button:hover {
	cursor: pointer;
	letter-spacing: 1px;
	background: #422906;
}

/* Formulaire de contact */
.form-contact {
    width: 100%;
    margin: 30px auto 0 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dddddd;
    padding: 25px 30px 20px 30px;
    box-shadow: 0 2px 12px rgba(132,58,64,0.07);
}

.form-contact label {
    font-weight: bold;
    color: #000;
    margin-bottom: 3px;
}

.form-contact input[type="text"],
.form-contact input[type="email"],
.form-contact textarea {
    border: 1px solid #843a40;
    border-radius: 5px;
    padding: 8px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    background: #f9f9f9;
    margin-bottom: 8px;
}

.form-contact textarea {
    resize: vertical;
    min-height: 80px;
}

.form-contact button[type="submit"] {
    background: #843a40;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 0;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.form-contact button[type="submit"]:hover {
    background: #422906;
}

/* === FOOTER === */
footer {
	text-align: center;
	background: #843a40;
	color: #fff;
}