/* --- common_styles.css --- */

/* --- Couleurs du thème --- */
:root {
    --primary-color: #E74C3C; /* Rouge HexaCore */
    --secondary-color: #FFFFFF; /* Blanc */
    --accent-color: #C0392B; /* Rouge plus foncé pour les hover */
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --header-height: 80px; /* Hauteur de la barre de navigation */
}

/* --- CSS général pour le style --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Optionnel: Importez des polices Google Fonts ici si vous voulez */
    /* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); */
    /* font-family: 'Roboto', sans-serif; */
    background-color: var(--light-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #b91c1c; /* Rouge intense */
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar .logo {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    color: white;
    font-weight: bold;
    text-decoration: none;
    gap: 10px;
}

.navbar .logo img {
    height: 40px;
    width: auto;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.navbar-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05em;
    padding: 10px 16px;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-links li a:hover,
.navbar-links li a.active-link {
    background: #7f1d1d;
    transform: scale(1.05);
}

.icon {
    font-size: 1.2em;
}
/* Conteneur principal du contenu des pages */
.main-content {
    flex-grow: 1;
    padding-top: 20px;
}

.page-content {
    display: none;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
}
.page-content.active {
    display: block;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}
h1 {
    font-size: 2.5em;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
    letter-spacing: 1px;
}
h2 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-top: 40px;
    font-size: 1.8em;
}
h3 {
    font-size: 1.4em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th, td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: var(--light-bg);
}
tr:hover {
    background-color: #f0f0f0;
}

#loading-message, #error-message {
    text-align: center;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}
#loading-message {
    color: var(--primary-color);
    background-color: #ffebeb;
}
#error-message {
    color: var(--primary-color);
    background-color: #ffe0e0;
    border: 1px solid var(--primary-color);
}

/* --- Styles des Accordéons (Collapsibles) --- */
.accordion-header {
    background-color: var(--light-bg);
    color: var(--primary-color);
    cursor: pointer;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.1em;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    margin-bottom: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.accordion-header:hover {
    background-color: #e5e5e5;
    color: var(--accent-color);
}
.accordion-header.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--primary-color);
}
.accordion-header .icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}
.accordion-header.active .icon {
    transform: rotate(90deg);
}
.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 10px;
}
.accordion-content.active {
    max-height: 1500px;
    padding: 20px;
}

/* --- Styles des éléments de liste (Véhicules, Garages, Événements) --- */
.list-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}
.list-section li {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.list-section li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.list-section li strong {
    color: var(--primary-color);
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}
.list-section li span {
    color: var(--text-color);
    font-size: 0.95em;
}
 
/* Styles pour les éléments de job */
.job-item {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.job-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.job-item strong {
    color: var(--primary-color);
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}
.job-status {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-left: 10px;
    color: white;
}
.job-status.completed { background-color: green; }
.job-status.in-progress { background-color: orange; }
.job-status.canceled { background-color: red; }


/* Styles des contrôles et pagination */
.user-panel-controls, .job-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.user-panel-controls label, .job-filters label {
    font-weight: bold;
    color: var(--primary-color);
}
.user-panel-controls input[type="number"], 
.user-panel-controls input[type="date"],
.job-filters input[type="date"],
.job-filters select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    flex-grow: 1;
    min-width: 150px;
}
.user-panel-controls button, .job-filters button, .pagination-buttons button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.user-panel-controls button:hover, .job-filters button:hover, .pagination-buttons button:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}
.pagination-buttons {
    text-align: center;
    margin-top: 25px;
}
.pagination-buttons span {
    font-weight: bold;
    margin: 0 15px;
    color: var(--primary-color);
}

/* --- Améliorations spécifiques d'alignement et de logo --- */
.company-header, .user-header {
    justify-content: center;
    text-align: center;
    flex-direction: column;
}
.company-header .company-title, .user-header .user-title {
    align-items: center;
}

/* Logo rond et taille ajustée */
.company-header img.avatar, .user-header img.avatar {
    width: 150px; /* Taille augmentée pour plus d'impact */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color); /* Bordure rouge plus épaisse */
    box-shadow: 0 0 15px rgba(0,0,0,0.4); /* Ombre plus forte */
    margin-bottom: 20px; /* Espace sous le logo */
}

/* --- Hero Section spécifique pour l'accueil --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 450px; /* Hauteur fixe pour l'image de couverture */
    overflow: hidden;
    margin-bottom: 50px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.hero-section img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assure que l'image couvre la zone sans distorsion */
    filter: brightness(0.6); /* Assombrit l'image pour que le texte ressorte */
}
.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3); /* Légère superposition pour le contraste */
}
.hero-content h1 {
    color: white;
    font-size: 3.8em; /* Très grand titre */
    margin-bottom: 10px;
    border-bottom: none; /* Pas de bordure ici */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Ombre de texte */
}
.hero-content p {
    font-size: 1.5em;
    max-width: 700px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.hero-button {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: 2px solid white; /* Bordure blanche pour le contraste */
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 25px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.hero-button:hover {
    background-color: var(--accent-color);
    border-color: var(--light-bg);
    transform: translateY(-2px);
}

/* --- Actualités (News Section) --- */
.news-section {
    margin-top: 50px;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* Plus grand espace */
}
.news-card {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1); /* Ombre plus distincte */
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.news-card h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
}
.news-card p {
    font-size: 1em;
    color: var(--text-color);
}
.news-card p strong {
    color: var(--primary-color); /* Met en valeur le nom de la recrue */
}

.vehicle-icon {
    width: 80px; /* Ajustez la taille selon vos préférences */
    height: 80px; /* Assurez-vous que la hauteur correspond à la largeur pour les icônes carrées/rondes */
    object-fit: cover; /* Recadre l'image sans la déformer */
    margin-right: 10px; /* Espacement entre l'image et le texte */
    vertical-align: middle; /* Aligne l'image avec le texte au milieu */
    border-radius: 5px; /* Optionnel: si vous voulez des coins légèrement arrondis */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Optionnel: petite ombre pour un effet 3D */
}

/* Si les éléments de liste de véhicules ne sont pas flex ou grid, cela aide à l'alignement */
.list-section li {
    display: flex; /* Permet d'aligner l'image et le texte sur la même ligne */
    align-items: center; /* Centre verticalement les éléments dans le li */
    /* ... autres styles existants pour .list-section li ... */
}

/* Vous pourriez vouloir ajuster le strong à l'intérieur du li pour éviter qu'il ne prenne toute la largeur */
.list-section li strong {
    display: inline; /* ou inline-block */
    margin-bottom: 0; /* Supprimer la marge inférieure si elle était définie pour block */
}
.garage-icon {
    width: 60px; /* Ajustez la taille de l'icône de garage */
    height: 60px;
    object-fit: contain; /* Utiliser 'contain' si l'icône a des proportions spécifiques et ne doit pas être coupée */
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 3px; /* Légèrement moins arrondi que le camion, ou pas du tout */
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Assurez-vous que les éléments de liste parents sont configurés pour un alignement facile */
/* Si ce n'est pas déjà fait via .list-section li, vous pouvez l'ajouter ou le confirmer ici */
.list-section li {
    display: flex;
    align-items: center; /* Centre verticalement les icônes et le texte */
    /* ... autres styles de list-section li ... */
}

/* Ajustez le strong à l'intérieur du li si le display: flex pose problème de mise en page pour le texte */
.list-section li strong {
    display: inline; /* ou inline-block */
    margin-bottom: 0;
}

.member-avatar {
    width: 30px;  /* Taille de l'avatar */
    height: 30px;
    border-radius: 50%; /* Pour un avatar rond */
    object-fit: cover; /* S'assure que l'image remplit le cercle sans déformation */
    margin-right: 8px; /* Espacement entre l'avatar et le nom */
    vertical-align: middle; /* Aligne l'avatar verticalement avec le texte */
    border: 1px solid var(--border-color); /* Optionnel: petite bordure */
}

/* Vous pourriez avoir besoin d'ajuster le style des cellules du tableau si le contenu déborde */
#members-table td {
    white-space: nowrap; /* Empêche le texte de passer à la ligne si la cellule est trop étroite */
    padding-right: 5px; /* Ajustez le padding pour les petites marges */
}
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1em;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.stats-table thead {
    background-color: #2e3b55;
    color: white;
    text-align: left;
}

.stats-table th,
.stats-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.stats-table tr:hover {
    background-color: #f5f7fa;
}

.stats-table td:first-child {
    font-weight: 500;
    color: #333;
}

@media screen and (max-width: 600px) {
    .stats-table th, .stats-table td {
        padding: 10px 12px;
        font-size: 0.95em;
    }
}

.cta-wrapper {
    text-align: center;
    margin-top: 60px;
}

.call-to-action-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff0000, #f76565);
    color: #fff;
    font-size: 1.4em;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.call-to-action-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.45);
    background: linear-gradient(135deg, #b30000, #ff0000);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.contact-card {
    background: var(--light-bg, #f9f9f9);
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    flex: 1 1 320px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 3rem;
    background: #7289da;
    color: white;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(114, 137, 218, 0.4);
}

.discord-button {
    display: inline-block;
    background: #7289da;
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    font-size: 1.1em;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.discord-button:hover {
    background: #5b6eae;
    transform: scale(1.05);
}
.email-button {
    display: inline-block;
    background: #f97316; /* orange doux */
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    font-size: 1.1em;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.email-button:hover {
    background: #ea580c;
    transform: scale(1.05);
}
/* common_styles.css */

/* ... vos styles existants ... */

.role-name {
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap; /* Empêche le nom du rôle de se casser sur plusieurs lignes */
}

/* Styles pour la table des membres */
#members-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden; /* Pour que le border-radius s'applique aux en-têtes */
}

#members-table th,
#members-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0; /* Ligne de séparation subtile */
}

#members-table thead {
    background-color: #E44D26; /* Rouge pour l'en-tête */
    color: white;
}

#members-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
}

#members-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Bandes pour une meilleure lisibilité */
}

#members-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Styles pour l'avatar du membre dans la table */
.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* Pagination buttons */
.pagination-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination-buttons button {
    background-color: #E44D26;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.pagination-buttons button:hover:not(:disabled) {
    background-color: #C23E1D;
}

.pagination-buttons button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body { padding: 10px; }
    .container { padding: 15px; margin: 10px auto; border-radius: 10px; }
    h1 { font-size: 2em; margin-bottom: 20px; }
    h2 { font-size: 1.5em; margin-top: 30px; }
    .page-content { padding: 15px 0; border-radius: 8px; }
    .accordion-header { font-size: 1.1em; padding: 12px 15px; }
    .accordion-content { padding: 15px; }
    .stats-item strong { width: 100%; display: block; margin-bottom: 5px; }
    .user-panel-controls, .job-filters { flex-direction: column; align-items: stretch; padding: 10px; gap: 8px; }
    .user-panel-controls input, .job-filters input, .job-filters select, .user-panel-controls button, .job-filters button {
        width: 100%; box-sizing: border-box; 
    }
    .hero-section { height: 300px; margin-bottom: 30px; }
    .hero-content h1 { font-size: 2.5em; }
    .hero-content p { font-size: 1.1em; }
    .hero-button { padding: 12px 25px; font-size: 1.1em; }
    .news-grid { gap: 15px; }
    .news-card { padding: 20px; }
        .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-links {
        flex-direction: column;
        width: 100%;
    }

    .navbar-links li {
        width: 100%;
    }

    .navbar-links li a {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
}
