:root {
    --navbar-height: 110px; /* Définit la hauteur de la navbar */
}

body {
    background: linear-gradient(to right, #ffcc00, #ff6600);
    font-family: Arial, sans-serif;
    color: #333;
    margin: 0;
    padding-top: var(--navbar-height); /* Compensation pour la navbar fixe */
}

/* ========= NAVBAR FIXE - MODIFICATIONS ========= */
nav {
    background: linear-gradient(to right, #ffcc00, #ff6600);
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed; /* Rend la navbar fixe */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* Place au-dessus du contenu */
    height: var(--navbar-height);
    box-sizing: border-box; /* Inclut le padding dans la hauteur */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%; /* Pour alignement vertical */
}

/* Protection des titres contre la navbar */
h1, h2, h3 {
    scroll-margin-top: var(--navbar-height);
 text-align: center;
    width: 100%;

}

/* ========= CORRECTION CADRES (FEATURE) ========= */
.feature {
    width: 27%; /* Légère réduction par rapport au 30% original */
    min-width: 240px; /* Légère réduction */
    /* Toutes vos autres propriétés existantes conservées */
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========= TOUT LE RESTE DE VOTRE CSS EXISTANT ========= */
.logo {
    max-width: 100px;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-button {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

.main-content {
    margin-top: 20px;
}

.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 10px;
}

form {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
}

form input, form textarea, form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.submit-button {
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: #cc5200;
}

.post h1, 
.post h2, 
.post h3 {
    text-align: center;
}

.post {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post p {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.username-link {
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

.username-link:hover {
    color: #ff6600;
    text-decoration: underline;
}

.attached-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

.attached-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
}

a {
    color: #ff6600;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.flash-messages {
    background: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    color: #000;
    text-align: center;
}

.flash-messages p {
    margin: 0;
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

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

#load-more-button {
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    display: block;
    margin: 20px auto;
    text-align: center;
    outline: none;
}

#load-more-button:hover {
    background: #cc5200;
}

#load-more-container {
    text-align: center;
    margin-top: 20px;
}

.messages-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.message {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-header strong {
    color: #ff6600;
}

.message-header small {
    color: #666;
    font-size: 0.9em;
}

.message p {
    margin: 0;
    color: #333;
}

.message.received {
    border-left: 5px solid #ff6600;
}

.message.sent {
    border-left: 5px solid #007bff;
}

.message-button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.messages-section {
    margin-bottom: 40px;
}

.messages-section h2 {
    text-align: center;
    color: #ff6600;
    margin-bottom: 20px;
}

.messages-list {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.explore-button {
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 16px;
    display: inline-block;
    margin-top: 20px;
}

.explore-button:hover {
    background: #cc5200;
}

.comments {
    margin-top: 20px;
}

.comment {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comment small {
    color: #666;
    font-size: 0.9em;
}

.send-button {
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    outline: none;
    width: 100%;
    margin-top: 10px;
}

.send-button:hover {
    background: #cc5200;
}

.attached-audio {
    width: 100%;
    max-width: 500px;
    margin: 10px 0;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.file-container {
    margin: 15px 0;
    max-width: 100%;
}

.attached-file {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    display: block;
}

.audio-player {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.audio-info {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

.audio-filename {
    font-style: italic;
}

.download-link {
    display: inline-block;
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

.download-link:hover {
    background: #45a049;
}

audio::-webkit-media-controls-panel {
    background-color: #f5f5f5;
    border-radius: 8px;
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    filter: brightness(0.8);
}

.container h1, 
.container h2, 
.container h3,
.messages-section h2 {
    text-align: center;
}

/* Media Queries existants */
@media (max-width: 768px) {
    .features {
        flex-direction: column;
        align-items: center;
    }
    .feature {
        width: 85%; /* Légère réduction pour mobile */
    }
}
.logo {
    max-width: 100px;
    height: auto;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2px, 2px) rotate(1deg); }
    50% { transform: translate(0, 0) rotate(0deg); }
    75% { transform: translate(-2px, 2px) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
