/* ------------------- Variables Noir & Violet ------------------- */
:root {
    --violet: #8a2be2;           /* Violet principal */
    --violet-hover: #6F1DB3;     /* Violet foncé au survol */
    --danger: #e0245e;           /* Pour les boutons "supprimer" etc. */
    --danger-hover: #c21b51;
    --text-white: #fff;
    --subtext: #bbb;             /* Si besoin de texte plus clair */
    --bg-black: #000;
    --border-violet: #6F1DB3;    /* Pour bordures et séparations */
    --light-black: #111;         /* Pour surfaces un peu moins noires */
    --lighter-black: #222;       /* Optionnel, etc. */
    --transition-speed: 0.3s;    /* Vitesse des transitions */
    --font-family: 'Roboto', sans-serif; /* Police de caractère */
    --shadow-color: rgba(138, 43, 226, 0.5); /* Ombre pour les éléments */
}

/* Reset et styles globaux */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-black);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    line-height: 1.6;
}

/* Typographie */
h1, h2, h3 {
    text-align: center;
    color: var(--violet);
    text-shadow: 0 0 10px var(--violet);
    margin: 20px 0;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
    color: var(--subtext);
    max-width: 800px;
    text-align: center;
}

/* Liens */
a {
    color: var(--violet);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed), text-shadow var(--transition-speed);
}

a:hover {
    color: var(--violet-hover);
    text-shadow: 0 0 10px var(--violet-hover);
}

/* Header */
.header {
    width: 100%;
    padding: 20px 40px;
    background: var(--light-black);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-violet);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--violet);
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    font-size: 1rem;
}

/* Boutons */
button,
.button {
    padding: 12px 24px;
    background: var(--violet);
    color: var(--text-white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-speed), transform 0.2s;
    display: inline-block;
    text-align: center;
}

button:hover,
.button:hover {
    background: var(--violet-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Boutons Danger */
.button-danger {
    background: var(--danger);
}

.button-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Formulaires */
form {
    margin: 20px auto;
    padding: 30px 25px;
    background: var(--light-black);
    border: 2px solid var(--border-violet);
    border-radius: 10px;
    box-shadow: 0 0 15px var(--shadow-color);
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

input,
textarea {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid var(--border-violet);
    border-radius: 5px;
    background: var(--lighter-black);
    color: var(--text-white);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

input:focus,
textarea:focus {
    border-color: var(--violet-hover);
    box-shadow: 0 0 5px var(--violet-hover);
    outline: none;
}

/* Profil */
.profile-container {
    margin: 20px;
    padding: 25px;
    background: var(--light-black);
    border: 2px solid var(--border-violet);
    border-radius: 10px;
    box-shadow: 0 0 15px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-container img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border-violet);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--violet-hover);
}

.profile-container h2 {
    color: var(--text-white);
    font-size: 2rem;
    margin-bottom: 10px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.profile-details p {
    text-align: left;
    color: var(--subtext);
}

/* Footer */
footer {
    width: 100%;
    padding: 15px 20px;
    background: var(--light-black);
    color: var(--violet);
    text-align: center;
    border-top: 2px solid var(--border-violet);
    margin-top: auto;
    font-size: 0.95rem;
}

footer a {
    color: var(--violet-hover);
    margin: 0 5px;
}

footer a:hover {
    text-decoration: underline;
}

/* Contenu principal */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 3fr 1fr;
    }
}

/* Posts */
.post {
    background: var(--light-black);
    border: 1px solid var(--border-violet);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-violet);
    margin-right: 15px;
}

.post-content {
    color: var(--subtext);
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    gap: 15px;
}

.post-actions button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Responsivité */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px 20px;
    }

    .nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }

    .nav a {
        font-size: 1.1rem;
    }

    form {
        padding: 20px;
    }

    .profile-container {
        margin: 10px;
        padding: 15px;
    }

    footer {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1, h2, h3 {
        font-size: 1.5rem;
    }

    button,
    .button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .profile-container img {
        width: 100px;
        height: 100px;
    }

    .profile-container h2 {
        font-size: 1.5rem;
    }

    .header .logo {
        font-size: 1.2rem;
    }

    .nav a {
        font-size: 1rem;
    }
}
