/*Body*/
body {
    width: 100%;
    height: 100vh;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #ffffff;
    overflow: hidden;
    margin: 0;
}

a {
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 8px;
    margin-bottom: 8px;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 0.75rem;
}
/*texte*/
.text {
    display: inline-block;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.text p {
    font-size: 1.2rem;
    text-align: center;
}
/*footer*/
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    text-align: center;
}
/*Menu sidebar*/
.menu-sidebar {
    position: fixed;
    z-index: 9999;
    max-width: 250px;
}

.hover-effect {
    transition: background-color 0.3s, color 0.3s;
  }
  
.hover-effect:hover {
    background-color: rgba(0, 0, 0, 0.247);
}
/*resource bar*/
.resource-icon {
    width: 25px; 
    height: 25px; 
    border-radius: 25%;
    padding-right: 1px; 
}

.res-width {
    min-width: 8%;
}

.aps-icon {
    width: 60px; 
    height: 60px; 
    border-radius: 25%;
    padding-right: 1px;
}

/* Style pour la sidebar */
.side-panel {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0;
    position: fixed;
    overflow-y: auto;
}

/* Style pour les détails des attaques */
.attack-details {
    background-color: #00000036;
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.attack-details p {
    margin: 0;
    padding: 5px 0;
}

/* Séparation visuelle entre les attaques */
hr {
    border: 0;
    border-top: 2px solid #000000;
    margin: 15px 0;
}

.forget {
    border: 1px solid #fff;
    border-radius: 3px;
    padding: 2px;
    background-color: #0000007c;
}

.title-form h2 {
    font-weight: bold;
    box-shadow: 0 0.5em 0.5em -0.4em;
}

.btn {
    background-color: rgb(36, 30, 58);
    color: #ffffff;
}

.btn:hover {
    background: rgb(0,0,0);
    background: linear-gradient(90deg, rgb(6, 34, 3) 0%, rgb(0, 141, 31) 50%, rgb(6, 34, 3) 100%);
    color: #ffffff;
}
/* Homepage */
.main-title .title-wargame {
    font-weight: bold;
    color: #000000;
}

.homepage {
    background-color: #000000;
    color: #ffffff;
}

.para-desc {
    font-style: italic;
    font-family: sans-serif;
}

.important-text {
    font-weight: bold;
    color: #ff0000;
}

.screenshot {
    font-weight: bold;
    font-family: sans-serif;
    color: #000000;
}

.screenshot-img {
    gap: 20px;
}

.container {
    display: grid;
    place-items: center; /* On centre horizontalement et verticalement */
    height: 100vh; /*On met une hauteur de conteneur de 100 par rapport à la taille de l'écran*/
    max-width: 70vw; /* Une largeur de 70 par rapport à la taille de l'écran pour éviter les débordements */
    min-height: 50vh;
    min-width: 50vw;
}

/* Styles pour ranking */
table {
    color: #fff; /* Texte en blanc */
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 8px;
}

thead {
    background-color: rgba(0, 123, 255, 0.9); /* Bleu légèrement transparent */
    color: white;
}

tbody tr:nth-child(even) {
    background-color: rgba(22, 20, 20, 0.8); /* Gris clair transparent */
}

tbody tr:nth-child(odd) {
    background-color: rgba(70, 70, 70, 0.8); /* Gris encore plus clair */
}

tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.2); /* Surbrillance */
    transition: background-color 0.3s;
}

th, td {
    text-align: center;
    padding: 12px;
}

/* Style pour les liens des utilisateurs */
.user-link {
    color: #00d1ff; /* Bleu clair */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s, text-decoration 0.3s;
}

.user-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Icône des points */
.resource-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Texte de titre */
.ranking-title {
    color: #00d1ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/*Style army*/
.card-section {
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color:rgba(0, 0, 0, 0.4);
}

.form-control {
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/*Style grade*/

.resource-icon-lg {
    border: solid 2px white;
    width: 50px; /* Taille de l'icône */
    height: 50px; /* Taille de l'icône */
    border-radius: 50%;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2); /* Ombre ajustée */
    margin-left: 15px;
}

.rank-title {
    font-size: 1.4rem; /* Taille de la police du titre */
    font-weight: bold;
    color: #1fc927;
}
.rank-details {
    font-size: 0.9rem; /* Taille de la police des détails */
    color: #7f8c8d;
}

.rank-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px; /* Padding ajusté */
    text-align: center;
    position: relative; /* Assure le bon positionnement */
}
.rank-card img {
    margin: 10px 0; /* Espacement autour de l'image */
    width: 45px; /* Taille de l'image */
    height: 45px; /* Taille de l'image */
}
.rank-highlight {
    font-size: 1.2rem; /* Taille de la police */
    font-weight: bold;
    color: #2980b9;
}

.ranking-container {
    max-height: 50vh; /* Hauteur visible */
    padding-bottom: 25px;
    overflow-y: auto; /* Barre de défilement verticale */
    overflow-x: hidden; /* Empêche le défilement horizontal */
}
.row {
    margin-right: -15px; /* Supprime les marges négatives pour éviter le débordement horizontal */
    margin-left: -15px;
}
.col-md-6 {
    padding-right: 15px; /* Assure un padding droit approprié */
    padding-left: 15px; /* Assure un padding gauche approprié */
}
/*Style user*/
.card-title {
    text-align: center;
}

.admin-badge {
    font-size: 0.8rem;
    color: red;
}

.bot-badge {
    font-size: 1.2rem;
    color: goldenrod;
    font-weight: bold;
    border: 1px solid white;
    border-radius: 25%;
    padding: 3px;
}

.profile-badge img {
    max-width: 50px;
    height: auto;
}

/* Réduire la taille des icônes d'action */
.action-icon {
    width: 30px; /* Ajustez selon vos préférences */
    height: auto;
}

.distinctions .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 colonnes */
    gap: 10px;  /* Espace entre les éléments */
    overflow: auto;  /* Pour permettre un scroll si nécessaire */
}

.distinction {
    display: flex;
    justify-content: center;
    align-items: center;
}

.distinction-icon {
    position: relative;
    display: inline-block;
    width: 60px;  /* Ajustez la taille de l'icône */
    height: 60px; /* Ajustez la taille de l'icône */
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.distinction-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ajoutez un style pour la carte de distinctions */
.distinctions-card {
    background-color: #3333334f;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.distinction[data-description]:hover::after {
    content: attr(data-description);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: visible;
}

.marketCard {
    border: #757575 solid 2px;
    background-color: #00000091;
    color: #ffffff;
    width: 80%;
    height: 50%;
    max-height: 50%;
    padding: 10px;
    overflow-y: scroll;
}

.forFlex {
    display: flex;
    align-items: center;
    justify-content: center;
}

#toBuy, #toSell, #toOffer {
    display: flex;
    justify-content: center;
    width: 10%;
    padding: 6px;
    margin: 10px;
    background-color: rgba(0, 0, 0, 0.336);
    color: white;
    border: #ffffff 1px solid;
    border-radius: 10px;
}

.marketBtn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
}

.resourceType .priceAmount {
    width: 250px;
}

.resourceSellType {
    width: 250px;
}

.priceAmount {
    width: 250px;
    border: #ffffff solid 1px;
    border-radius: 10px;
    padding: 5px;
}

#percentPrice {
    width: 250px;
}

.marketSellBtn {
    width: 250px;
    background-color: #0000008e;
    border-color: white;
    color: white;
    margin-top: 5px;
    border-radius: 5px;
}

.marketSearchBtn {
    width: 250px;
    background-color: #0000008e;
    border-color: white;
    color: white;
    border-radius: 5px;
}

.offer {
    margin-top: 10px;
}

.toBuy {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.toSell {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.toOffer {
    display: none;
    justify-content: center;
    align-items: center;
}

.offers-container {
    margin-top: 15px;
}

.offer-card {
    flex: 1 1 calc(33% - 20px); /* Chaque carte prend environ 33% de la largeur */
    border: 1px solid #ccc;
    padding: 15px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    border-radius: 8px; /* Coins arrondis */
}

#search-results table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background-color: #00000056;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#search-results th,
#search-results td {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    color: #ffffff;
}

#search-results th {
    background-color: #464646de;
    color: #ffffff;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#search-results td {
    background-color: #888888d5;
    border-bottom: 1px solid #e0e0e0;
}

#search-results tr:nth-child(even) td {
    background-color: #424242de;
}

#search-results tr:hover {
    background-color: #685e5e;
}

#search-results td:last-child {
    border-bottom-left-radius: 8px;
}

#search-results td:first-child {
    border-bottom-right-radius: 8px;
}

.messageCard {
    border: #757575 solid 2px;
    background-color: #00000091;
    color: #ffffff;
    width: 80%;
    height: 50%;
    max-height: 50%;
    padding: 10px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.messageBtn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
}

#toRC, #toRE, #toVente {
    display: flex;
    justify-content: center;
    text-wrap: nowrap;
    width: auto;
    padding: 6px;
    margin: 10px;
    background-color: rgba(0, 0, 0, 0.336);
    color: white;
    border: #ffffff 1px solid;
    border-radius: 10px;
}

.RC {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.RE {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.Vente {
    display: none;
    justify-content: center;
    align-items: center;
}





  /*en dessous code non sur*/

/*building*/
.card {
    background-color: #0000006e;
    border: 1px solid #fff;
    overflow: hidden;
    padding-left: 200px; /* La même largeur que la barre de navigation */
    padding: 20px;
    box-sizing: border-box;
}

/* Principal card can be used to add a scroll on all main card*/
.main-card {
    max-height: 60vh; /* set max height for scroll */
    overflow: auto;
}

.building-card {
    width: 300px;
    height: auto;
    border: 2px solid #000000;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin: 0 auto;

}

.building-card img.building-img {
    height: 175px; /* Adjusted height for building images */
    border: 1px solid #fff;
    width: auto;
}

.building-card .card-body {
    background-color: rgba(14, 14, 14, 0.548);
    color: #ffffff;
    padding: 10px;
}

.card-title {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ffffff;
    border-radius: 5px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.building-card .card-text {
    display: flex;
    align-items: center;
    border: 1px solid #fff;
    border-radius: 3px;
    background-color: #000000;
    padding: 2px;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

img .resource-icon-card {
    display: flex;
    align-items: center;
}

.building-card .form-group {
    margin-bottom: 0.5rem;
}

.building-card .btn-primary {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.building-card .resource-icon {
    width: 20px; /* Increased size for resource icons */
    height: 20px;
}

.btn {
    width: 100%;
}

#factory-container,
#house-container,
#family-house-container,
#gold-mine-container,
#refinery-container,
#ammunition-factory-container {
    padding: 5px; /* Espacement interne */
    margin: 10px 0; /* Espacement externe */
    display: flex;
    justify-content: center;
    align-items: center; /* Centrer verticalement */
}

.succes-message {
    display: flex;
    justify-content: center;
    align-items: center; /* Centrer verticalement */
    font-family: 'Arial', sans-serif; /* Police personnalisée */
    font-size: 16px; /* Taille de police */
    font-weight: bold;
    background-color: #5eff0080;
    border: 1px solid #000000;
    border-radius: 10px;
    color: #000000; /* Couleur du texte noir */
    padding: 2px;
}

.succes-message p {
    margin: 0; /* Supprimer les marges */
}

.error-message {
    display: flex;
    justify-content: center;
    align-items: center; /* Centrer verticalement */
    font-family: 'Arial', sans-serif; /* Police personnalisée */
    font-size: 16px; /* Taille de police */
    font-weight: bold;
    background-color: #ff00003f;
    color: #ffffff; /* Couleur du texte blanc*/
    padding: 2px;
}

.error-message p {
    margin: 0; /* Supprimer les marges */
}

.time {
    font-weight: bold; /* Texte en gras */
    font-size: 18px; /* Taille de police augmentée */
    color: #000000; /* Couleur du texte noir */
    padding-left: 5px; /* Espacement à gauche */
    padding-right: 5px; /* Espacement à droite */
    border: 2px solid #ff00004d; /* Bordure rouge */
    border-radius: 3px; /* Coins arrondis */
    background-color: #0000008f; /* Fond noir transparent */
    transition: background-color 0.3s; /* Animation de transition */
}

.time:hover {
    background-color: #00000054; /* Fond plus clair au survol */
}

.card-text {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.resource-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

.btn-primary {
    border-color: #007bff;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004080;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.time {
    font-weight: bold;
}

.unit-card {
    display: none;
}

/* Styles supplémentaires pour les détails */
.card-text p {
    margin: 0;
}

.card-text span {
    font-weight: bold;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.filter-btn {
    margin: 0 10px;
}

.custom-card {
    border-radius: 15px;
    border: 1px solid #000000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: block;
}

.custom-card h2 {
    font-weight: bold;
}

.distinction-item {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.distinction-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.distinction-item img.aps-icon {
    width: 60px;
    height: 60px;
}

.distinction-desc {
    font-style: italic;
    font-weight:bold;
    font-size: 0.8rem;
    color: #2ac836;
}

.badge {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.toast-container {
    z-index: 1055;
}

.toast-body {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.toast.bg-danger {
    background-color: #e74c3c !important;
}

.toast.bg-success {
    background-color: #2ecc71 !important;
}

.need-bold {
    font-weight: bold;
    color: #e74c3c;
}

/* Media Queries */
/* Styles pour mobile - empilement des éléments */
@media screen and (max-width: 768px) {
    body {
        background-image: url('../images/background.jpg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center center;
        height: 100%;
        overflow: visible;
    }

    /* Barre de navigation et ressources */
    .navbar-toggler {
        background-color: #00000091;
        color: #000000;
    }
    
    .navbar-resources {
        position: static;
        height: auto;
        margin: 0;
        display: flex;
        flex-direction: column; /* Empilement en colonne */
        align-items: center;
        width: 100%;
        overflow: visible;
    }

    .navbar-resources .row {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .navbar-resources .col {
        width: 100%;
        margin-bottom: 10px;
    }

    .resources-bar {
        position: static;
        display: flex;
        flex-direction: column;
        padding: 2px;
        margin: 1px;
        font-size: 0.9rem;
    }

    .resource-item {
        padding: 2px;
        margin: 1px;
        width: 100%; /* Largeur complète pour chaque ressource */
    }

    /* Formulaire */
    .form-reg-log {
        width: 90%; /* Largeur maximale pour mobile */
        padding: 20px;
        margin: 10px auto;
        font-size: 1rem;
        display: flex;
        flex-direction: column; /* Empilement vertical */
        gap: 10px;
        border-radius: 10px;
    }

    /* Sidebar */
    .sidebar {
        width: 100%; /* Pleine largeur */
        margin-top: 0;
        position: relative;
        margin-bottom: 1rem;
    }

    /* Contenu principal */
    .content {
        margin-left: 0; /* Supprime le décalage gauche */
        width: 100%; /* Utilise toute la largeur */
    }

    /* Cartes des bâtiments */
    .building-cards {
        display: flex;
        flex-direction: column; /* Empilement vertical */
        align-items: center;
        margin-top: 20px; /* Espace au-dessus des cartes */
    }

    .building-cards .card {
        width: 100%; /* Pleine largeur pour chaque carte */
        margin-bottom: 20px; /* Espacement entre les cartes */
    }

    /* Pied de page */
    footer {
        position: static;
        margin-top: 10px;
    }
}

/* Tablettes */
@media screen and (min-width: 769px) and (max-width: 1023px) {
    .form-reg-log {
        width: 50%;
        padding: 20px;
        margin: 20px auto;
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        gap: 20px;
        border-radius: 10px;
    }
}

/* Ordinateurs */
@media screen and (min-width: 1024px) {
    .form-reg-log {
        width: 30%;
        padding: 20px;
        margin: 20px auto;
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        gap: 20px;
        border-radius: 10px;
    }
}