/* Réinitialisation légère */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Définition des variables */
:root {
    /* Couleurs principales */
    --main1: #004713;
    --main2: #007a00;
    --main3: #009033;
    --main4: #009600;
    --main5: #00aa45;
    --main6: #a4ff98;
    --main7: #e7ffe4;
    --main8: #fafff9;

    /* Couleurs d'alerte */
    --alert1: darkred;
    --alert2: red;
    --alert3: orange;
    --alert4: green;

    /* Couleurs neutres / autres */
    --other1: #444;
    --other2: #555;
    --other3: #ccc;
}

/* Styles globaux */
body {
    background-color: var(--main7);
    color: var(--main2);
    line-height: 1.6;
}

/* Structure principale pour un footer toujours en bas si nécessaire */
html, body {
    height: 100%; /* Utilisation de toute la hauteur de la fenêtre */
    display: flex;
    flex-direction: column;
}

/* Barre de navigation */
.top-bar {
    height: 56px; /* Fixe la hauteur */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 20px;
    background-color: var(--main6);
    color: var(--main1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Logo (Troc-Net) */
.logo {
    height: 50px;
    width: 50px;
}

/* Logo text (Troc-Net) */
.logot {
    height: 50px;
    width: 200px;
}

/* Section de gauche header top-bar */
.flex10 {
    display: flex;
    align-items: center; 
    gap: 10px;
}

/* Conteneur du header utilisateur */
.user-header {
    display: flex;
    align-items: center;
	justify-content: flex-end;
    gap: 15px;
    height: 56px; /* Aligné avec la hauteur du header */
}

.user-header-info {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
	text-align: left;
    justify-content: center; 
    gap: 1px; 
    line-height: 1; 
}

/* Conteneur des jetons */
.jetons-container {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    margin-left: 2px; /* Décalage léger pour aligner avec le username */
}

.token-icon {
    height: 18px;
    width: 18px;
    margin-left: 5px;
    position: relative;
    top: 1px; /* Ajustement fin pour l'alignement */
}

.jetons {
    font-weight: bold;
    font-size: 18px; /* Ajuste la taille si nécessaire */
}

/* Photo de profil */
.profil {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--main5);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre l'image et le texte */
    text-align: center;
    margin-bottom: 20px; /* Espacement sous l'avatar */
}

.profil-container {
    display: flex;
    align-items: center;
}

.profile-picture {
    width: 400px;
    height: 400px;
    border-radius: 50%; /* Rend l'image ronde */
    object-fit: cover; /* Ajuste l’image pour bien remplir */
    border: 4px solid var(--main5); /* Bordure verte */
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.username {
    font-size: 20px;
    font-weight: bold;
    color: var(--main1);
    margin-top: 5px;
}

.edit-profile-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: bold;
    color: var(--main4);
    text-decoration: none;
    background: var(--main6);
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.edit-profile-btn:hover {
    background: var(--main5);
    color: var(--main1);
}

/* Conteneur */
.container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 30px;
    background: var(--main8);
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
	flex: 1; /* Prend tout l’espace dispo entre header et footer */
}

.container p + p {
    margin-top: 10px;
}

/* Styles des boutons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease-in-out;
}

/* Bouton principal */
.btn-primary {
    background: var(--main4);
    color: var(--main8);
}

.btn-primary:hover {
    background: var(--main2);
}

/* Bouton secondaire */
.btn-secondary {
    background: var(--other2);
    color: var(--main8);
}

.btn-secondary:hover {
    background: var(--other1);
}

/* Bouton danger */
.btn-danger {
    background: var(--alert2);
    color: var(--main8);
}

.btn-danger:hover {
    background: var(--alert1);
}

/* Bouton Connexion/Inscription */
.btn-header {
    background: var(--main4); 
    color: var(--main8); 
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease-in-out;
}

.btn-header:hover {
    background: var(--main2); 
}

.header-with-return {
    display: flex;
    justify-content: center; /* Centre le titre */
    align-items: center;
    gap: 20px; /* Espacement entre le bouton et le titre */
    position: relative; /* Permet un meilleur contrôle */
}

.header-with-return h1 {
    font-size: 2em; /* Augmente la taille du titre */
    font-weight: bold; /* Renforce le contraste */
    flex: 1; /* Permet au titre de prendre plus d’espace */
    text-align: center; /* S'assure qu'il est bien centré */
}

/* Garde le bouton à gauche */
.retour-accueil {
    position: absolute;
    left: 0;
}

/* Liens */
a {
    color: var(--main5);
    text-decoration: underline;
}

a:hover {
    text-decoration: underline;
    color: var(--main3);
}

a img {
    border: none;
    display: block;
}

/* Texte utilisateur */
.user-section {
	display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    color: var(--main1);
    font-size: 16px;
    color: var(--main1) !important;
}

/* Icône des jetons */
.token-icon {
    height: 24px;
    width: 24px;
	margin-left: 5px;
}

.token-icon22 {
    height: 22px;
    width: 22px;
	position: relative;
    top: 2px;
	vertical-align: middle;
    display: inline-block;
}

.switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 20px;
}
.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.slider {
	position: absolute;
	cursor: pointer;
	background-color: #ccc;
	border-radius: 20px;
	width: 100%;
	height: 100%;
	transition: .4s;
}
.slider:before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 2px;
	bottom: 2px;
	background-color: white;
	border-radius: 50%;
	transition: .4s;
}
input:checked + .slider {
	background-color: var(--main5);
}
input:checked + .slider:before {
	transform: translateX(20px);
}

.tokens {
    color: var(--main1) !important;
	display: flex;
    align-items: center;
    font-weight: bold;
}

/* Formulaires */
form {
    margin-top: 20px;
    text-align: center;
	max-width: 600px;
    padding: 20px;
    background: var(--main8);
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

form button {
    display: block;
    margin: 20px auto;
}

form label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

form input, form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--other3);
    border-radius: 5px;
}

form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Titres */
h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
	text-align: center;
	color: var(--main1)
}

h2, h3 {
    font-size: 22px;
    font-weight: bold;
    margin-top: 25px;
	color: var(--main1)
}

/* Paragraphes */
p {
    font-size: 18px;
    margin-bottom: 15px;
    margin-top: 15px;
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid var(--other3);
    padding: 10px;
    text-align: center;
}

th {
    background: var(--main4);
    color: var(--main8);
}

.tm1 {
	color: var(--main1);
}

/* Messages d'alerte */
.error-message {
    color: var(--alert2);
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.success-message {
    color: var(--alert4);
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.warning-message {
    color: var(--alert3);
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.social-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.social-login button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* Icônes des boutons */
.social-icon {
    font-size: 20px;
    margin-right: 10px;
}

/* Style bouton Google */
.btn-google {
    background: white;
    color: #4285F4;
    border: 1px solid #4285F4;
}

.btn-google:hover {
    background: #4285F4;
    color: white;
}

/* Style bouton Facebook */
.btn-facebook {
    background: #1877F2;
    color: white;
    border: 1px solid #1877F2;
}

.btn-facebook:hover {
    background: #125abe;
}


/* Section utilisateur */
.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--main8);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}

/* Popups */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--main8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1000;
}

.popup button {
    margin: 10px;
}

/* Style du lien Contactez-nous */
.contact-link {
    text-decoration: underline;
    color: var(--main1);
}

.contact-link:hover {
    color: var(--main3);
}

.footer {
	font-size: 12px;
    font-weight: Thin;
	color: var(--main1);
}

/* Footer en bas */
.site-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--main3);
}

.big-link {
    cursor: pointer;
    color: var(--main5);
    font-weight: bold;
    text-decoration: underline;
    margin-left: 10px;
}

.big-link:hover {
    color: var(--main3);
}

.details-toggle {
    cursor: pointer;
    color: var(--main5);
    font-weight: bold;
    text-decoration: underline;
    margin-left: 10px;
}

.details-toggle:hover {
    color: var(--main3);
}


.bgt {
	background-color: var(--main6);
	color: var(--main1);
	padding: 1px 20px 20px 20px;
}

/* Conteneur du lien de parrainage */
.referral-container {
    background-color: var(--main6); /* Fond légèrement différent */
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
}

/* Champ du lien (occupe toute la largeur) */
.referral-link {
    width: 100%;
    padding: 10px;
    font-size: 18px;
    border: 1px solid var(--main4);
    border-radius: 5px;
    background: var(--main8);
    text-align: center;
}

/* Bouton Copier (plus large) */
.copy-button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    background: var(--main4);
    color: white;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease-in-out;
}

.copy-button:hover {
    background: var(--main2);
}

/* Styles spécifiques au formulaire de don de jetons */
.token-donation-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: var(--main8);
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.token-donation-form label {
    font-weight: bold;
    display: block;
    margin-top: 15px;
    color: var(--main1);
    text-align: left;
}

.token-donation-form input,
.token-donation-form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--other3);
    border-radius: 5px;
    font-size: 16px;
    background: var(--main8);
    color: var(--main1);
}

.token-donation-form button {
    margin-top: 20px;
    width: 100%;
}

.password-rules {
    font-size: 0.9em;
    color: var(--main4);
    margin-bottom: 10px;
	transition: all 0.3s ease-in-out;
}
.password-rules ul {
    margin: 5px 0 0;
    padding-left: 20px;
}
.password-rules li {
    list-style-type: disc;
}

.hidden {
    display: none !important;
}

.highlight {
    background-color: var(--main6);
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    color: var(--main1);
    margin-top: 15px;
    display: block;
    width: 100%;
    text-align: left !important;
    font-size: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    gap: 20px; /* Espacement entre les éléments */
    justify-content: center; /* Centrer les éléments */
    max-width: 1300px; /* Largeur max pour éviter que ça s'étire trop */
    margin: auto; /* Centrer la grille */
}

.grid-item {
    text-align: center;
}

.grid-item img {
    width: 100%; /* Ajuste à la taille de la case */
    max-width: 400px; /* Taille max pour ne pas exploser la mise en page */
    height: auto; /* Maintenir les proportions */
    border-radius: 10px; /* Coins arrondis pour un effet plus sympa */
}

.pack-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.intro {
    text-align: center;
    padding: 10px;
    margin-bottom: 10px;
}

.bigimg {
    max-width: 1024px; /* Taille max pour ne pas exploser la mise en page */
    height: auto; /* Maintenir les proportions */
    border-radius: 10px; /* Coins arrondis pour un effet plus sympa */
}

.note-service {
    margin-top: 2em;
    padding: 20px;
    background-color: var(--main7);
    border-left: 4px solid var(--main5);
    border-radius: 6px;
    color: var(--main1);
}

.note-service h2 {
    font-size: 22px;
    color: var(--main1);
    margin-bottom: 10px;
}

.note-service p {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.6;
}

.token-img {
    float: left;
    height: 150px;
    margin-right: 20px;
    margin-bottom: 10px;
}

.token-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 30px;
}

.token-description {
    content: "";
    display: block;
    clear: both;
}

.token-description::after {
    content: "";
    display: block;
    clear: both;
}

.token-description img {
    height: 250px;
    width: auto;
    flex-shrink: 0;
}

.token-description h2 {
    margin-top: 0;
}

.token-description ul {
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.token-description li {
    margin-bottom: 5px;
}

.image-disabled {
	filter: grayscale(100%) brightness(0.4);
	cursor: not-allowed;
	pointer-events: none;
}

.mini-card {
	width: 100px;
	height: 100px;
	border-radius: 4px;
	cursor: pointer;
	position: relative;
}

.mini-count {
	font-size: 14px;
	font-weight: bold;
	color: white;
	background: var(--main5);
	border-radius: 10px;
	padding: 3px 7px;
	position: absolute;
	right: -6px;
	top: -6px;
}

.clickable-wrapper {
	cursor: pointer;
}

.bggame-pc {
    width: 512px;
    height: 512px;
    background-image: url('../assets/imagesPC/bggame1.png');
    background-size: cover;
    background-position: center;
    margin: 20px auto;
    border-radius: 12px;
}

.bggame2-pc {
    width: 512px;
    height: 512px;
    background-image: url('../assets/imagesPC/bggame2.png');
    background-size: cover;
    background-position: center;
    margin: 20px auto;
    border-radius: 12px;
    position: relative; /* nécessaire pour placer les tickets en absolu */
}

.bggame-pc, .bggame-mobile {
    position: relative; /* nécessaire pour placer les cartes en absolu à l’intérieur */
}

/* Cartes */
#carte1, #carte2 {
	cursor: pointer;
    position: absolute;
    bottom: 30px;
	width: 256px;
    height: 256px;
}

#carte1 {
    left: -5px;
}

#carte2 {
    right: -5px;
}

/* Positionnement du bloc mise */
#mise-container {
    position: absolute;
    bottom: 120px; /* ajuste selon visuel */
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 10;
}

/* Empêche les champs de s’écraser */
#mise-container input[type="number"] {
    width: 100px;
}

#result-card {
	position: absolute;
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: pointer;
	left: 0;
	top: 0;
	z-index: 20;
}

.bggame3-pc {
    width: 512px;
    height: 512px;
    background-image: url('../assets/imagesPC/bggame3.png');
    background-size: cover;
    background-position: center;
    margin: 20px auto;
    border-radius: 12px;
    position: relative;
}

#chance-container {
    position: absolute;
    bottom: 120px; /* ou 60px sur mobile si tu veux */
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    max-width: 90%;
    box-sizing: border-box;
}