/* ============================= */
/*            GLOBAL             */
/* ============================= */

:root {
    --bg-color: #f4f7f6;
    --text-color: #333;
    --container-bg: white;
    --primary-color: #007bff;
    --button-hover: #0056b3;
    --tweet-bg: #ffffff;
    --tweet-border: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: rgb(47, 77, 188);
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* ============================= */
/*            NAVBAR             */
/* ============================= */

/* Styles pour la navbar */
/* Styles pour la navbar */
.navbar {
    display: flex;
    justify-content: space-between; /* Espacer logo et liens */
    align-items: center; /* Centrer verticalement les éléments */
    padding: 10px 20px; /* Ajouter du padding */
    background-color: #ffffff; /* Couleur de fond */
    border-bottom: 1px solid #e0e0e0; /* Légère bordure en bas */
}

/* Logo */
.navbar .logo {
    font-size: 1.4rem; /* Taille du texte du logo */
    font-weight: bold;
    color: #007bff; /* Couleur du logo */
    text-transform: uppercase; /* Mettre le texte en majuscules */
}

/* Liste des liens */
.nav-links {
    display: flex; /* Afficher les liens horizontalement */
    gap: 15px; /* Espacement entre les liens */
    list-style: none; /* Supprimer les puces de la liste */
    padding: 0; /* Supprimer le padding par défaut de la liste */
}

/* Style des liens */
.nav-links a {
    font-size: 1rem; /* Taille des liens */
    color: #555; /* Couleur des liens */
    text-decoration: none; /* Enlever le soulignement */
    padding: 8px 12px; /* Padding pour un peu d'espace autour du texte */
    border-radius: 4px; /* Coins arrondis */
    transition: background-color 0.3s ease, color 0.3s ease; /* Transition fluide */
}

/* Effet au survol des liens */
.nav-links a:hover {
    background-color: #f1f1f1; /* Changement de fond au survol */
    color: #007bff; /* Couleur au survol */
}

/* Responsivité : sur petits écrans */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column; /* Aligner les éléments en colonne sur les petits écrans */
        align-items: flex-start; /* Aligner les éléments à gauche */
        padding: 15px 20px; /* Ajuster le padding */
    }

    .nav-links {
        flex-direction: column; /* Empiler les liens en colonne */
        gap: 10px; /* Espacement réduit entre les liens */
        margin-top: 10px; /* Ajouter un peu d'espace entre le logo et les liens */
    }
}




/* ============================= */
/*           CONTAINER           */
/* ============================= */

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

h2 {
    color: #0056b3;
}

/* ============================= */
/*        SEARCH BAR             */
/* ============================= */

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#searchInput {
    flex-grow: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
    outline: none;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    border-color: var(--primary-color);
}

button {
    padding: 12px 20px;
    font-size: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--button-hover);
}

button:focus {
    outline: none;
}

/* ============================= */
/*         TWEET CARDS           */
/* ============================= */

#tweets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.tweet-card {
    background-color: var(--tweet-bg);
    border: 1px solid var(--tweet-border);
    border-radius: 8px;
    width: calc(50% - 10px);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    word-wrap: break-word;
}

.tweet-card:hover {
    transform: translateY(-5px);
}

.tweet-author {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tweet-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.tweet-media {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.tweet-media img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    margin-top: 10px;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}



/* ============================= */
/*         RESPONSIVE            */
/* ============================= */

@media (max-width: 768px) {
    .tweet-card {
        width: calc(100% - 10px);
    }
    
    .navbar {
        height: 45px;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    button {
        font-size: 0.9rem;
    }
}
