@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --font-stack: 'Montserrat', sans-serif;
}

/* Couleur pour le background global */
body {
    background-color: #1b1c1d;
    color: #dee3e7; 
    font-family: Arial, sans-serif;
    margin: 0;
}

/* Couleur pour le texte */
h1, h2, h3, h4, h5, h6, p, span, a {
    color: #dee3e7;
}

h1{
    background: linear-gradient(90.01deg, #636aca -8.79%, #dee3e7 51.99%, rgba(255, 255, 255, 0) 109.94%) text;
    color: transparent;
}


/* Couleur pour les boutons */
button, .btn {
    background-color: #636aca;
    color: #dee3e7;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

button:hover, .btn:hover {
    background-color: #dee3e7;
    color: #1b1c1d;
}

/* Couleur des bordures */
.border {
    border: 1px solid #636aca;
}

/* Couleur des éléments spécifiques */
header, footer, nav {
    background-color: #1b1c1d;
    color: #dee3e7;
}

/* Formulaires */
input, textarea, select {
    background-color: #1b1c1d;
    color: #dee3e7;
    border: 1px solid #636aca;
}

input::placeholder, textarea::placeholder {
    color: #dee3e7;
}

input:focus, textarea:focus {
    outline: 2px solid #636aca;
}

.credit {
    padding-bottom: 3px;
    border-bottom: 1px solid #636aca;
}

.big-text-hero {
    background: linear-gradient(90.01deg, #636aca -8.79%, #dee3e7 51.99%, rgba(255, 255, 255, 0.232) 109.94%) text;
    color: transparent;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

main {
    padding: 4%;

}

.hero_section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: #1b1c1d;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: absolute;
    top: 0;
}

.title h1 {
    font-size: 6rem;
    margin-bottom: 40px;
    text-align: center;
    text-transform: uppercase;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 2;
    height: 60px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin-left: 11rem;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.1rem;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

.right-nav {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.right-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.right-nav li {
    padding-right: 14px;
}

.right-nav a {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.hero_text_container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12rem;
}
.hero_img_container > img {
    margin-top: 2rem;
}

.hero_title_container {
    width: 35%;
    margin-left: 6rem;
}
.hero_title_container > h1 {
    text-transform: uppercase;
    font-size: 5rem;
}
p {
    font-size: 1.5rem;
}



/* Big TEXT SECTION */
.recent_post {
    height: 80vh;
}
.big_text {
    font-size: 5rem;
    font-weight: 700;
}

/* Blog Section */
.blog_section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 20px;
    margin-bottom: 4rem;
}

/* Post Card */
.post {
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #6060605e;
    transition: transform 0.3s ease;
}

.post:hover {
    transform: scale(1.05);
}

.post h2 {
    margin: 0 0 30px;
    font-size: 1.6rem;
}

.post p {
    margin: 0 0 15px;
    line-height: 1.6;
    font-size: 0.9rem;
    font-weight: 400;
}

.post small {
    display: block;
    margin-top: 20px;
    font-size: 0.8rem;
    padding-top: 10px;
}

.small_post_date {
    padding-bottom: 3px;
    border-bottom: 1px solid #636aca;
}

/* Style for the Date */
.post small::before {
    content: "| ";
}

a {
    display: inline-block;
    margin: 5px 0;
    text-decoration: none;
}

.thanks {
    font-size: 5rem;
    margin-top: 6rem;
    text-transform: uppercase;
    letter-spacing: 10px;
    background: linear-gradient(90.01deg, #636aca -8.79%, #dee3e7 51.99%, rgba(255, 255, 255, 0) 109.94%) text;
    color: transparent;
    margin-bottom: 2rem;
}

/* BLOG DETAILS */
.introduction {
    margin-top: 7rem;
    width: 50%;
}
.introduction > p {
    font-size: 1.1rem;
    line-height: 28px;
}

.post-detail {
    padding-left: 3rem;
    margin-bottom: 5rem;
    width: 75%;
    border-left: 1px solid rgba(255, 255, 255, 0.508);
}
.post-detail > h2 {
    font-size: 2rem;
}
.post-detail > p {
    font-size: 1.2rem;
}

.h2_post {
    background: linear-gradient(90.01deg, #636aca -8.79%, #dee3e7c1 51.99%, rgba(255, 255, 255, 0) 109.94%) text;
    color: transparent;
}


/* PAGE PROFILE */

.bodyProfile {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.profile-container {
    background-color: #2b3a47;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    width: 760px;
    display: flex;
    gap: 8rem;
    align-items: center;
}

.profile_img > img {
    width: 200px;
}

.profile-title {
    font-size: 26px;
    margin-bottom: 25px;
}

.profile-info {
    margin-bottom: 25px;
    text-align: left;
}

.profile-detail {
    margin: 15px 0;
    font-size: 1.2rem;
}

.detail-label {
    font-weight: bold;
}

.logout-link {
    display: inline-block;
    margin-top: 25px;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}


.profile-subtitle {
    margin: 30px 0 20px;
}

.file-input {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    background-color: #34495e;
    border: 1px solid #3a4a5a;
    width: 100%;
    max-width: 300px;
}

.upload-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 150px;
}

/* LOGIN */

.login-body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.login-form {
    background-color: #2b3a47;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    width: 350px;
    text-align: center;
}

.login-title {
    font-size: 26px;
    margin-bottom: 35px;
}

.login-label {
    display: block;
    font-weight: bold;
    text-align: left;
    margin-bottom: 8px;
    font-size: 14px;
}

.login-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.login-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

/* SIGNUP */

.signup-body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.signup-form {
    background-color: #2b3a47;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    width: 400px;
    text-align: center;
}

.signup-title {
    font-size: 26px;
    color: var(--title-color);
    margin-bottom: 25px;
}

.signup-label {
    display: block;
    font-weight: bold;
    text-align: left;
    margin-bottom: 8px;
    font-size: 14px;
}

.signup-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.signup-input::placeholder {
    color: #a1a1a1;
}

.signup-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* CRÉER UN POST */

.create-post-body {
    background-color: #1b1c1d;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.create-post-form {
    background-color: #2b3a47;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    width: 400px;
    text-align: center;
}

.create-post-title {
    font-size: 26px;
    margin-bottom: 25px;
}

.create-post-label {
    display: block;
    font-weight: bold;
    text-align: left;
    margin-bottom: 8px;
    font-size: 14px;
}

.create-post-input,
.create-post-textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.create-post-input::placeholder,
.create-post-textarea::placeholder {
    color: #a1a1a1;
}

.create-post-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* COMMENTAIRE */

.comment_part {
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    font-family: Arial, sans-serif;
}

.comment_part h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.comment_part form {
    margin-bottom: 30px;
}

.comment_part label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.comment_part textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 15px;
    resize: vertical;
}

.comment_part textarea::placeholder {
    color: #a1a1a1;
}

.comment_part button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#commentContent {
    background-color: #a1a1a14d;
}


/* Section des commentaires existants */
.comments-section {
    margin-top: 20px;
}

.comment {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    gap: 10px;
}

.profile-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment p {
    margin: 0 0 10px;
}

.comment small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
}

.comment a {
    display: inline-block;
    font-size: 12px;
    color: #e63946;
    text-decoration: none;
    margin-top: 5px;
}

.comment a:hover {
    text-decoration: underline;
}

/* ARCHIVES */

.archive-container {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    max-width: 1140px;
    padding: 20px;
    margin: auto;
    gap: 2rem;
}

/* Chaque élément de billet */
.post-item {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff20;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-basis: 32%; 
}

/* Effet au survol */
.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Conteneur du titre et de la photo */
.post-header {
    text-align: center;
    margin-bottom: 16px;
}

/* Photo du billet */
.post-photo-container {
    margin-top: 12px;
    text-align: center;
}

.post-photo {
    max-width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.post-body {
    margin-bottom: 16px;
    text-align: justify;
    flex-grow: 2;
}

.post-header, .post-body, .post-actions {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Texte du billet */
.post-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #dee3e7; 
}

/* Date du billet */
.post-date {
    font-size: 14px;
    color: #999; /* Gris clair */
    display: block;
    margin-top: 10px;
}

/* Section d'actions pour l'admin */
.post-actions {
    text-align: right;
    margin-top: auto;
}

.delete-button {
    color: #ff4d4d; /* Rouge vif pour la suppression */
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    margin-left: 1rem;
}

.delete-button:hover {
    text-decoration: underline;
}
/* BACKOFFICE */

.backoffice-container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: #1b1c1d; /* Fond presque noir */
    color: #fff; /* Texte blanc */
}

/* Colonne de gauche */
.left-column, .right-column, .last-column {
    width: 30%;
    background-color: #ffffff20; /* Fond légèrement transparent */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.left-column {
    margin-right: 20px;
}

.right-column {
    margin-right: 20px;
}

/* Titre des sections */
.section-title {
    color: #636aca; /* Violet pour les titres */
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Liste des utilisateurs, billets et commentaires */
.user-item, .post-item, .comments-item {
    margin-bottom: 20px;
}

.user-info, .post-title, .post-content, .comment-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #fff; /* Texte blanc */
}

.post-date, .user-info small {
    font-size: 12px;
    color: #aaa; /* Gris clair pour la date et petites infos */
}

/* Liens */
.delete-user, .delete-post, .delete-comment {
    color: rgb(255, 48, 48); /* Violet pour les liens */
    text-decoration: none;
    font-size: 14px;
    margin-right: 10px;
}

.delete-user:hover, .delete-post:hover, .delete-comment:hover {
    color: #575db3; /* Violet plus foncé au survol */
}

/* Boutons */
.edit-button, .btnComment {
    background-color: #636aca; /* Violet pour les boutons */
    color: #fff;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.edit-button:hover, .btnComment:hover {
    background-color: #575db3; /* Violet plus foncé au survol */
}

/* Formulaire de mise à jour */
.update-form, .update-form-post, .updateComments {
    background-color: #f4f4f43b;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.update-title {
    color: #636aca; /* Violet pour les titres de formulaire */
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.update-label, .update-label-post, .update-label-comment {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #fff; /* Texte blanc pour les labels */
}

.update-input, .update-input-post, .contenu {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Boutons de mise à jour */
.update-button, .update-button-post {
    background-color: #636aca; /* Violet pour les boutons */
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.update-button:hover, .update-button-post:hover {
    background-color: #575db3; /* Violet plus foncé au survol */
}

/* Boutons d'annulation */
.update-cancel-button, .update-cancel-button-post, .cancel-button {
    background-color: #ddd;
    color: #000;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.update-cancel-button:hover, .update-cancel-button-post:hover, .cancel-button:hover {
    background-color: #bbb;
}

.edit-button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.update-form {
    margin-top: 10px;
}

.error-message {
    color: #ff4d4d; 
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.updateComments {
    display: none;
}

.post-image {
    border-radius: 5px;
    margin-bottom: 15px;
    object-fit: cover;
}

.post-photo {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

/* Container global des posts */
.post-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6rem;
    justify-content: center;
    padding: 20px;
    background-color: #1b1c1d;
}

/* Chaque carte de post */
.post-card {
    width: 350px;
    height: 400px;
    background-color: #2b2c2f;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    color: #dee3e7;
    text-decoration: none;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Image du post */
.post-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    object-fit: cover;
}

/* Contenu du post */
.post-content-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-title {
    font-size: 18px;
    font-weight: bold;
    color: #dee3e7;
    margin: 0;
}

.post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #b0b3b8;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Footer du post */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #636aca;
}

.post-read-more {
    font-weight: bold;
    color: #636aca;
    cursor: pointer;
    transition: color 0.3s;
}

.post-read-more:hover {
    color: #dee3e7;
}

.post-date {
    font-size: 12px;
    color: #b0b3b8;
}