		footer {
			text-align: center;        /* Centrage du texte */
			padding: 10px 0;           /* Espacement en haut et en bas */
			position: relative;        /* Position relative pour ne pas chevaucher le contenu */
			width: 100%;               /* Prendre toute la largeur */
			font-size: 14px;           /* Taille de la police */
			color: #333;               /* Couleur du texte */
			margin-top: 20px;          /* Espace au-dessus du footer */
		}
		
	   .tablevisu {
            border-collapse: collapse;
		    table-layout: fixed; /* Forcer la largeur fixe des colonnes */
		    width: auto;
			height: auto;
            max-width: auto;
			min-height: auto;
            margin: 0 auto;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .tdvisu {
            width: 40px;
            height: 40px;
            padding: 0;
            margin: 0;
            position: relative;
            border: 1px solid #ccc;
            text-align: center;
            border-radius: 8px;  
        }
		
		/* Quadrillage plus discret en mode nuit */
		.tdvisu.night-cell {
			border-color: rgba(80, 80, 80, 0.65);
		}

		/* Éclaircissement nuit uniquement sur téléphone */
		@media screen and (max-width: 768px) {
			.night-cell .terrain-container {
				filter: brightness(2.10) !important;
			}
		}
		
		/* Pour les fentres dans visu */
		.tooltip {
			position: absolute;
			display: none;
			width: 200px;
			height: auto;
			background-image: url('../interface/fondbg3a.jpg'); /* Changez le chemin vers votre image */
			color: #000000;
			padding: 5px;
			border-radius: 5px;
			border: 1px solid #000000;
			font-size: 12px;
			z-index: 1000;
			font-weight: bold; /* Texte en gras */

		}		
		.tooltip img {
			display: block;
			margin-bottom: 5px;
		}
		

		
        .coord-x {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 12px;
            font-weight: bold;
        }
        .coord-y {
            position: absolute;
            top: 50%;
            left: -20px;
            transform: translateY(-50%);
            font-size: 12px;
            font-weight: bold;
            writing-mode: vertical-lr;
        }
		.matricule {
			position: absolute;
			bottom: 0;
			left: 50%;
			transform: translateX(-50%);
			font-size: 10px;
			color: #fff; /* Texte en blanc */
			background-color: rgba(0, 0, 0, 0.5); /* Fond noir avec 60% d'opacité */
			padding: 0px 0px; /* Réduire le padding pour réduire le cadre */
			border-radius: 2px; /* Réduire le rayon des coins pour un cadre plus compact */
			pointer-events: none;
		}
		.matricule-black {
			background-color: #000; /* Fond noir opaque */
			color: #fff; /* Texte en blanc */
		}
        .terrain-container,
        .unit-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
			display: inline-block;
			
        }
		
		.terrain-container {
			z-index: 0;
			overflow: hidden;
			background-repeat: no-repeat;
			background-position: center center;
			background-size: 40px 40px;
			transform-origin: center center;
			pointer-events: none;
		}

		.batiment-capture-container {
			position: absolute;
			top: 0;
			left: 0;
			width: 40px;
			height: 40px;
			z-index: 1;
			pointer-events: none;
		}

		.batiment-capture-container img {
			width: 40px;
			height: 40px;
			object-fit: cover;
			display: block;
		}

		.unit-container {
			z-index: 2;
		}
		.unit-container img {
		  width: 40px;
		  height: 40px;
		  object-fit: cover;
		}
		.unit-container {
			z-index: 2;
			width: 40px; /* Ajuste selon la taille de tes images */
			height: 40px;
		}

		.unit-image {
			width: 100%; /* L'image de l'unité prend toute la taille du conteneur */
			height: auto;
		}
		
		.unit-image-deroute {
			filter: grayscale(100%);
		}

		.flag-image {
			position: absolute;
			left: 50%;
			transform: translateX(-50%); /* Centrer l'image du drapeau */
			width: 40px; /* Taille du drapeau */
			height: auto;
		}
		
		.tdvisu,
		.unit-container,
		.flag-image {
			transition: width 0.3s ease, height 0.3s ease;
		}
		
		.unit-highlight {
			background-color: yellow; /* Change la couleur pour une surbrillance visible */
			border: 2px solid red;
		}
        .center-coordinates {
            background-color: #D3D3D3;
            font-weight: bold;
        }
		
		.officier-marker {
			position: absolute;
			top: 2px;
			right: 2px;
			width: 14px;
			height: 14px;
			border-radius: 50%;
			background: #fff;
			border: 1px solid #777;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: center;

			/* Au-dessus ZOC 1500, en dessous fog 3000 */
			z-index: 2500;

			pointer-events: none;
			box-shadow: 0 0 2px rgba(0, 0, 0, 0.45);
		}

		.officier-marker img {
			width: 9px;
			height: 9px;
			object-fit: contain;
			display: block;
		}
		
		.formation-marker {
			position: absolute;
			top: 2px;
			right: 2px;
			width: 14px;
			height: 14px;
			border-radius: 50%;
			background: #fff;
			border: 1px solid #777;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: center;

			/* Au-dessus du fog */
			z-index: 2500;

			pointer-events: none;
			box-shadow: 0 0 2px rgba(0, 0, 0, 0.45);
		}

		.formation-marker.has-officier-marker {
			top: 16px;
		}

		.formation-marker img {
			width: 10px;
			height: 10px;
			object-fit: contain;
			display: block;
		}
		
		.avatar {
        width: 67px;
        height: 67px;
        border-radius: 50%;
        overflow: hidden;
		}
		
		.avatar img {
			width: 100%;
			height: auto;
		}
		.fondfaction {
			background-size: cover;
			height: 6%;
			width: 100%;
			padding: 0px;
			border-radius: 13px;
			-moz-border-radius: 13px;
			-webkit-border-radius: 13px;
			box-shadow: 5px 5px 10px 2px rgba(0, 0, 0, 0.70);
		}
		
		/* Animation de clignotement */
		@keyframes blinkCell {
		  0%   { opacity: 1; }
		  50%  { opacity: 0.3; }
		  100% { opacity: 1; }
		}

		/* Classe appliquée temporairement à la case */
		.cell-blink {
		  animation: blinkCell 0.6s ease-in-out;
		  animation-iteration-count: 3; /* clignote 3 fois */
		}
		
			/* Pour le tir */
		/* Pour le pourcentage du moral */
		
		.green {
            color: green;
        }
        .orange {
            color: orange;
        }
        .red {
            color: red;
        }
		
		.blue {
            color: #1E90FF; /* Bleu foncé pour Daltonien */
		}

		.yellow {
			color: #FFD700; /* Jaune pour Daltonien */
		}

		.gray {
			color: #A9A9A9; /* Gris pour Daltonien */
		}

		.faction-1 { color: blue; } /* Bleu foncé pour les daltoniens */
		.faction-2 { color: #E5C100; } /* Or pour les daltoniens */
		.faction-3 { color: black; } /* Gris pour les daltoniens */
		.faction-4 { color: #FFA500; } /* Orange pour les daltoniens */
		
		.formation-icon {
            cursor: pointer;
        }
		
		/* Pour le changement de formation */

		.popup_formation {
			display: none; /* Masqué par défaut */
			position: absolute; /* Absolu pour placement dynamique */
			z-index: 500;
			width: auto;
			background-image: url('../interface/fondbg3a.jpg'); /* Chemin de l'image */
			border: 1px solid #000;
			padding: 10px;
			border-radius: 5px;
			text-align: center;
		}
		.popup_formation .close-btn {
            display: block;
            text-align: right;
            cursor: pointer;
        }
		.popup_formation-overlay {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 500;
        }

        .popup {
            display: none;
            position: fixed;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            padding: 20px;
            background-color: #fff;
            border: 1px solid #ccc;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
        }
        .popup .close-btn {
            display: block;
            text-align: right;
            cursor: pointer;
        }
        .popup-overlay {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 500;
        }
		


		/* POUR PROFIL.PHP */
		
		        .avatar {
            max-height: 200px;
            display: inline-block;
            vertical-align: top;
        }
		
        .mail-icon {
            width: 16px;
            height: 16px;
            vertical-align: middle;
            margin-right: 5px; /* Ajout d'un espace entre l'image et le texte */
            display: inline;
        }
        .mail-icon-read {
            opacity: 0.3;
        }
        .faction-1 {
            color: blue;
            font-weight: bold;
        }
		/* Mode Daltonien pour faction 1 */
		.daltonien .faction-1 {
			color: #1E90FF; /* Bleu foncé */
			font-weight: bold;
		}
        .faction-2 {
            color: red;
            font-weight: bold;
        }
		/* Mode Daltonien pour faction 2 */
		.daltonien .faction-2 {
			color: #FF8C00; /* Orange foncé */
			font-weight: bold;
		}
		.container {
			display: flex;
			flex-direction: column;
		}

		.container form {
			order: 1; /* Par défaut, tous les formulaires ont cet ordre */
		}

		.container form.first {
			order: -1; /* Formulaire spécifique à mettre en premier */
		}

		.container form.last {
			order: 2; /* Formulaire spécifique à mettre en dernier */
		}

		.container2 {
			display: flex;
			justify-content: center;
			align-items: stretch; /* Ajustement pour étirer les enfants */
			width: 1200px; /* Largeur totale */
			margin: 0 auto; /* Centrer le conteneur */
		}

		.left-section, .right-section {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
		}

		.left-section {
			width: 20%; /* Largeur de la section gauche */
			height: 500px;
		}

		.main-section {
			min-width: 57%; /* Largeur de la section principale */
			min-height: 500px; /* Hauteur minimale de 500px */
			width: auto; /* Hauteur automatique si nécessaire */
			height: auto; /* Hauteur automatique si nécessaire */
			display: flex; /* Assurez-vous que la section principale prend la hauteur complète */
			flex-direction: column; /* Utiliser la direction colonne */
		}
		
		#visu-container {
			width: 100%;
			padding: 30px 0;
		}

		.right-section {
			width: 23%; /* Largeur de la section droite */
			height: 500px;
		}

		.box {
			border: 0px solid black;
			margin: 5px;
			flex: 1;
		}
		
		.highlight-border {
			border: 5px solid red;
			padding: 5px;
			border-radius: 5px;
			animation: blinker 1s linear infinite;
		}
			
		.highlight-table {
			border: 5px solid red;
			padding: 5px;
			border-radius: 5px;
			animation: blinker 1s linear infinite;
		}
		
		.highlight-table-daltonien {
			border: 5px solid blue;
			padding: 5px;
			border-radius: 5px;
			animation: blinker 1s linear infinite;
		}

		@keyframes blinker {
			50% {
				border-color: transparent;
			}
		}
		
	   /* Pour les succes en bas à droite */
		#notificationContainer {
			position: fixed;
			bottom: 20px;
			right: 20px;
			z-index: 1000;
			display: flex;
			flex-direction: column-reverse;
			align-items: flex-end;
			pointer-events: none; /* Allows clicking through to underlying content */
		}

		.notification {
			background-image: url('../interface/fondbg3a.jpg');
			border: 1px solid #ddd;
			padding: 10px;
			margin-top: 10px;
			border-radius: 5px;
			box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
			width: 300px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			animation: slideIn 0.5s ease-out;
			pointer-events: auto; /* Allows interacting with the notification */
			z-index: 99000;
		}

		@keyframes slideIn {
			from {
				opacity: 0;
				transform: translateY(100%);
			}
			to {
				opacity: 1;
				transform: translateY(0);
			}
		}

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

		.notification-content img {
			margin-right: 10px;
		}

		.notification-close {
			color: #888;
			cursor: pointer;
			font-size: 18px;
			margin-left: 10px;
		}

		.notification-close:hover {
			color: #555;
		}
		
		.modal_expire {
			display: none; /* Masqué par défaut */
			position: fixed; 
			z-index: 1000; 
			left: 0; 
			top: 0; 
			width: 100%; 
			height: 100%; 
			background-color: rgba(0, 0, 0, 0.8); /* Fond noir transparent */
		}

		/* Style pour le contenu de la fenêtre modale */
		.modal_expire-content {
			position: fixed; 
			width: 250px;
			top: 50%; 
			left: 50%; 
			transform: translate(-50%, -50%); /* Centrer la fenêtre */
			background-image: url('../interface/fondbg3a.jpg'); 
			border: 1px solid #ddd;
			padding: 20px; 
			border-radius: 8px;
			text-align: center;
		}
		
		/* Pour une DIV desactivé */
		.disabled-div {
			pointer-events: none; /* Désactiver les interactions (clic, survol, etc.) */
			opacity: 0.5; /* Rendre la div grise */
			background-color: #f0f0f0; /* Couleur de fond grise légère */
			filter: grayscale(100%); /* Appliquer un filtre de niveaux de gris */
		}
		
			/* Pour l'affichage des unités avec image */
			#unitSelectionPopup {
				display: none;
				position: fixed;
				top: 0;
				bottom: 0;
				left: 0;
				right: 0;
				margin: auto; /* Centre l'élément */
				background-image: url('../interface/fondbg3a.jpg');
				padding: 5px; /* Réduit le padding */
				border: 2px solid #ccc;
				z-index: 1000;
				max-width: 40%;
				max-height: 270px; /* Limite la hauteur maximale pour éviter de sortir de la fenêtre */
				width: auto;
				min-height: 180px;
				height: auto;
				overflow-y: auto;
				border-radius: 10px;
				z-index: 10011;
			}


			#unitSelectionPopup h3 {
				text-align: center;
				color: black;
				margin-bottom: 10px; /* Ajuste la marge en bas pour un meilleur espacement */
			}

			.conversion-table {
				display: flex;
				flex-wrap: wrap;
				justify-content: center;
				gap: 5px; /* Réduit l'espace entre les éléments */
			}

			.conversion-item {
				display: inline-block;
				width: 120px;
				text-align: center;
				cursor: pointer;
				background-color: rgba(255, 255, 255, 0.8);
				padding: 5px; /* Réduit le padding interne */
				border-radius: 8px;
				box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); /* Réduit l'ombre */
				transition: transform 0.3s, border-color 0.3s; /* Ajoute une transition douce */
			}

			.conversion-item:hover {
				transform: scale(1.05); /* Effet de zoom au survol */
				border-color: #007bff; /* Change la couleur de la bordure au survol */
			}

			.conversion-item img {
				width: 40px;
				height: auto;
				border: 2px solid #ccc;
				border-radius: 8px;
				margin-bottom: 5px;
			}

			.conversion-text {
				margin-top: 3px; /* Réduit la marge supérieure */
				color: #000;
				font-size: 12px; /* Taille de texte plus petite */
			}

			#popupBackground {
				display: none;
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background-color: rgba(0, 0, 0, 0.5);
				z-index: 10010;
			}
			
			#objectif-image {
			width: 15px; /* Taille spécifique pour l'image d'objectif */
			height: auto; /* Maintenir le ratio d'aspect */
			border: none; /* Pas de bordure pour cette image */
			margin: 0; /* Pas de marge si vous ne souhaitez pas d'espacement */
			border-radius: 0; /* Pas de coin arrondi */
			}
			
			.notification-icon {
				position: absolute;
				top: 0; /* Positionner en haut */
				right: 0; /* Positionner à droite */
				background-color: red;
				color: white;
				border-radius: 50%;
				width: 23px;
				height: 23px;
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 12px; /* Ajustez la taille de la police selon vos préférences */
				font-weight: bold;
				z-index: 10; /* Assure que l'icône est au-dessus de l'image */
				transform: translate(50%, -50%); /* Positionne l'icône à moitié en dehors de l'image */
			}

		/* POUR LA FATIGUE */
		
		.fatigue-bar-container {
			display: flex;
			gap: 2px;
			width: 100px; /* Ajuster si nécessaire */
		}

		.fatigue-bar {
			width: 10px;
			height: 20px;
			background-color: grey;
		}
		
		#tuto_table6 {
			position: relative; /* Conteneur pour le positionnement absolu */
			overflow: visible;
		}

		.statut-joueur {
			position: absolute;
			top: -25px;  /* À cheval sur le bord supérieur */
			left: -25px; /* À moitié sur le bord gauche */
			display: flex;
			align-items: center;
			z-index: 10; /* Assure que l'élément est bien visible au-dessus du tableau */
		}
		
		#pa-used-value {
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			bottom: 100px; /* Position initiale juste au-dessus du cercle PA */
			color: red;
			font-size: 20px;
			opacity: 0;
			transition: opacity 1s ease-out, transform 1s ease-out;
			z-index: 3; /* Assurez-vous qu'il soit au-dessus du cercle */
		}

		/* Styles pour le cercle PA avec fond, contour et ombrage */
		.cercle-pa {
			width: 60px;
			height: 60px;
			border: 2px solid #333333; /* Bordure subtile */
			border-radius: 50%;
			background-image: url('../interface/fondbg3a.jpg'); /* Conserve votre image de fond */
			box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Ombre pour relief */
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 22px; /* Taille de police plus grande pour plus de visibilité */
			font-weight: bold;
			z-index: 2;
			color: white; /* Valeur par défaut du texte (blanc) */
			transition: transform 0.3s ease; /* Animation douce au survol */
		}

		/* Effet de survol pour rendre le cercle interactif */
		.cercle-pa:hover {
			transform: scale(1.1); /* Légère augmentation de la taille au survol */
			box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Accentuation de l'ombre au survol */
		}

		/* Classe pour la couleur rouge (PA = 0) */
		.cercle-pa.red {
			color: red;
		}

		/* Classe pour la couleur verte (PA >= 1) */
		.cercle-pa.green {
			color: green;
		}
		
.barre-xp {
    background-color: #ddd;
    background-image: url('../interface/fondbg3a.jpg'); /* Image de fond pour la barre XP */
    width: 940px; /* Largeur par défaut sur grand écran */
    max-width: 100%; /* Empêche l'élargissement au-delà de la largeur de l'écran */
    height: 30px;
    border-radius: 10px;
    margin-left: -20px; /* Espace entre le cercle et la barre */
    border: 1px solid #333333; /* Bordure subtile */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Ombre pour relief */
    position: relative;
    padding: 2px;
    z-index: 1;
    display: flex; /* Flexbox pour gérer la disposition */
    justify-content: space-between; /* Aligner XP à gauche et barre premium à droite */
    align-items: center; /* Centrer verticalement les éléments */
}

/* Adaptation pour les petits écrans (moins de 940px) */
@media screen and (max-width: 940px) {
    .barre-xp {
        width: 100%; /* Prend toute la largeur de l'écran */
        margin-left: 0; /* Évite un décalage indésirable */
    }
}

		/* Aligner le texte XP à gauche */
		.barre-xp .xp {
			font-family: Verdana, sans-serif;
			font-size: 14px;
			color: #333;
			margin-bottom: 5px;
			font-weight: bold;
			margin-left: 25px;
			position: relative;
		}

		/* Styles pour la barre premium */
		.barre-premium {
			display: flex; /* Flexbox pour aligner les éléments de la barre premium */
			justify-content: flex-end; /* Aligner les éléments premium à droite */
			align-items: center; /* Centrer verticalement les éléments */
			margin-left: auto; /* Pousse la barre premium à droite */
		}

		.barre-premium a {
			margin-left: 10px; /* Espace entre les icônes premium */
		}
		
		/* VITRINE PREMIUM */

		.vitrine-premium {
			width: 100%;
			border-collapse: collapse;
			margin-top: 10px;
			text-align: center;
		}

		.vitrine-premium td {
			border: 1px dashed #ddd;
			padding: 10px;
			font-style: italic;
		}

		.vitrine-premium h3 {
			text-align: center;
			margin-bottom: 10px;
			font-weight: bold;
		}

.table-container2 {
    position: relative;
    margin-bottom: 0px;
    display: flex;
    align-items: center; /* Alignement vertical du cercle et de la cartouche */
}

.circle-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    background-image: url('../interface/fondbg3a.jpg');
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0; /* Empêche le cercle de se réduire */
    margin-right: -25px; /* Chevauche le cercle sur le bord gauche de la cartouche */
    z-index: 1; /* Assure que le cercle est au-dessus de la cartouche */
}

.circle-logo img {
    max-width: 70%;
    max-height: 70%;
    border-radius: 50%;
}

.table_capsule {
    width: 100%;
    padding: 10px;
    border-radius: 13px;
    box-shadow: 5px 5px 10px 2px rgba(0, 0, 0, 0.70);
    position: relative;
    margin-left: 63px; /* Décalage pour éviter que le texte touche le cercle */
    display: flex;
    align-items: center; /* Assure l'alignement vertical du texte */
    min-height: 30px;
    margin-right: 10px; /* Ajustez si nécessaire pour équilibrer le design */
    padding-left: 44px; /* Décalage du texte vers la droite pour compenser l'extension */
    margin-left: -15px; /* Élargit la cartouche vers la gauche sans déplacer le texte */
}

/* Conteneur pour le tooltip */
.tooltip_cartouche {
    position: relative;
    cursor: pointer; /* Indique que l'élément est interactif */
}

/* Style du contenu du tooltip */
.tooltip_cartouche .tooltip-content {
    display: none;
    position: absolute;
    top: 0%;          /* Aligner verticalement par rapport à l'élément parent */
    left: 100%;        /* Placer le tooltip à droite de l'élément parent */
    transform: translateY(-50%); /* Centrer verticalement par rapport à l'élément parent */
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-left: 0px; /* Décalage supplémentaire pour éviter un chevauchement direct */
}

/* Affiche le tooltip lorsque l'on survole le logo */
.tooltip_cartouche:hover .tooltip-content {
    display: block;
}

.fog {
    position: relative;
	z-index: 2000;
}

.fog::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); /* Un voile sombre */
    pointer-events: none; /* Permettre quand même le survol si nécessaire */
}

.blink-soldier {
  animation: blinkSoldier 1s infinite;
}

/* Animation "blinkSoldier" simple : opacity 0/1 */
@keyframes blinkSoldier {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0.2;
  }
}

    #fenetre_message {
        display: none; /* Masquée par défaut */
        position: fixed; 
        z-index: 11111; /* Au-dessus de tout */
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto; /* Défilement si contenu trop grand */
        background-color: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
    }
    
    /* Contenu de la fenêtre */
    .fenetre_message-content {
        background-color: #fefefe;
        margin: 5% auto; /* Centrer verticalement */
        padding: 20px;
        width: 70%;
        max-width: 800px;
        position: relative;
        border-radius: 5px;
        background-image: url('../interface/fondbg3a.jpg'); 
        border: 1px solid #ddd;
    }

/*Poisson d'avril */
	.mode-avril .unit-image {
		transform: rotate(180deg);
	}

/* -----------------------------------------------------
   MALUS TERRAIN VISUEL
   Sous le popup unité / badge-container-visu
----------------------------------------------------- */

.tdvisu {
    overflow: visible;
}

.terrain-malus-cell {
    position: relative;
    overflow: visible;
}

.terrain-malus-bois {
    box-shadow: inset 0 0 0 2px rgba(40, 120, 40, 0.45);
}

.terrain-malus-marker-mur,
.terrain-malus-batiment,
.terrain-malus-blocked {
    box-shadow: inset 0 0 0 2px rgba(150, 0, 0, 0.65);
}

.terrain-malus-marker {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 26px;
    height: 26px;
    min-width: 26px;
    max-width: 26px;

    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #8a8a8a;

    box-sizing: border-box;

    color: #666;
    font-size: 10px;
    font-weight: 800;
    text-align: center;

    z-index: 9000;
    pointer-events: none;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.38),
        0 0 2px rgba(255, 255, 255, 0.95);
}

/* Aucun malus = vert */
.terrain-malus-marker-zero,
.terrain-malus-marker-neutre,
.terrain-malus-marker-cible {
    color: #008000 !important;
}

/* Malus terrain = rouge */
.terrain-malus-marker-penalty,
.terrain-malus-marker-bois,
.terrain-malus-marker-mur,
.terrain-malus-marker-batiment {
    color: #c00000 !important;
}

/* Tir bloqué = croix rouge parfaitement centrée */
.terrain-malus-marker-blocked {
    color: #e00000 !important;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

/* Ancienne flèche : désactivée */
.terrain-malus-arrow {
    display: none !important;
}

/* Quand le popup unité est ouvert, les pastilles terrain passent dessous */
#popup-unit.unit-popup-opened ~ .terrain-malus-marker,
#popup-unit-background[style*="display: block"] ~ .terrain-malus-marker {
    z-index: 9000 !important;
}

/* Mobile */
@media screen and (max-width: 768px) {
    .terrain-malus-marker {
        right: -3px;
        bottom: -3px;

        width: 28px;
        height: 28px;
        min-width: 28px;
        max-width: 28px;

        font-size: 10px;

        /*
           Important :
           inférieur à popup-unit-background 10005
           et inférieur à badge-container-visu 10010
        */
        z-index: 9000 !important;
    }

    .terrain-malus-marker-blocked {
        font-size: 26px;
        line-height: 1;
    }
}

/* =====================================================
   MÉTÉO GLOBALE DE LA VISU
   Un seul calque pour toute la grille
===================================================== */

.weather-visu {
    position: relative;
    isolation: isolate;
}

/* Éclair couvrant toute la visu */
.weather-visu.weather-storm::after {
    content: "";

    position: absolute;
    inset: 0;

    background: rgba(235, 245, 255, 0.95);
    opacity: 0;

    pointer-events: none;
    z-index: 2600;

    /*
     * Seule l'opacité est modifiée.
     * steps() évite une animation progressive permanente.
     */
    animation: weather-lightning 11s steps(1, end) infinite;
    will-change: opacity;
    transform: translateZ(0);
}

@keyframes weather-lightning {
    0%,
    86%,
    100% {
        opacity: 0;
    }

    86.2% {
        opacity: 0.9;
    }

    86.45% {
        opacity: 0.12;
    }

    86.7% {
        opacity: 0.72;
    }

    87.05% {
        opacity: 0;
    }

    87.35% {
        opacity: 0.48;
    }

    87.65% {
        opacity: 0;
    }
}

/* =====================================================
   RAPPORT COMBAT SERVEUR 1 - VERSION FINALE
===================================================== */

.fenetre_message-content {
    box-sizing: border-box;
}

/* -----------------------------------------------------
   FENÊTRE
----------------------------------------------------- */

.fenetre_message-content.rapport-combat-serv1 {
    position: relative;
    border: 2px solid rgba(45, 45, 45, 0.75);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.35) inset,
        0 8px 22px rgba(0, 0, 0, 0.45);
    padding-top: 66px;
    overflow: visible;
    box-sizing: border-box;
}

.fenetre_message-close {
    float: right;
    margin-top: -10px;
    margin-right: 0;
    margin-left: 10px;

    min-height: 28px;
    padding: 3px 3px 3px 9px;

    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    color: #777777;
    font-size: 0;
    font-weight: normal;
    line-height: 1;
    text-decoration: none;

    border-radius: 999px;
    cursor: pointer;

    transition:
        background 0.18s ease,
        transform 0.18s ease,
        color 0.18s ease;
}

.fenetre_message-close::before {
    content: "Fermer";
    color: #777777;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
}

.fenetre_message-close::after {
    content: "";
    width: 22px;
    height: 22px;
    min-width: 22px;

    background-image: url('../interface/menu/interdit.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    display: block;
}

.fenetre_message-close:hover,
.fenetre_message-close:focus {
    color: #555555;
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
    text-decoration: none;
}

.fenetre_message-close:hover::before,
.fenetre_message-close:focus::before {
    color: #555555;
}

/* -----------------------------------------------------
   HEADER
----------------------------------------------------- */

.rapport-combat-header {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: min(780px, calc(100% + 80px));
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 50;
    pointer-events: none;
}

.rapport-combat-player {
    position: relative;
    width: 226px;
    min-width: 226px;
    height: 100px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.rapport-combat-player-attaquant {
    justify-content: flex-end;
}

.rapport-combat-player-cible {
    justify-content: flex-start;
}

/* -----------------------------------------------------
   AVATARS
----------------------------------------------------- */

.rapport-combat-avatar {
    position: relative;
    z-index: 6;
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid rgba(130, 130, 130, 0.90);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.rapport-combat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* -----------------------------------------------------
   PSEUDOS
----------------------------------------------------- */

.rapport-combat-pseudo {
    position: relative;
    z-index: 4;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    height: 34px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid rgba(130, 130, 130, 0.85);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: bold;
    color: #222222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.80) inset;
}

.rapport-combat-pseudo-texte {
    display: block;
    min-width: 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rapport-combat-pseudo-attaquant {
    margin-right: -24px;
    padding: 0 38px 0 12px;
    justify-content: flex-start;
    text-align: left;
}

.rapport-combat-pseudo-cible {
    margin-left: -24px;
    padding: 0 12px 0 38px;
    justify-content: flex-end;
    text-align: right;
}

/* -----------------------------------------------------
   DRAPEAUX
----------------------------------------------------- */

.rapport-combat-ornement {
    position: absolute;
    top: -57px;
    height: 117px;
    object-fit: contain;
    display: block;
    z-index: 10;
    pointer-events: none;
}

.rapport-combat-ornement-faction-1 {
    width: 61px;
    --rapport-hampe-x: 61px;
}

.rapport-combat-ornement-faction-2 {
    width: 64px;
    --rapport-hampe-x: 0px;
}

.rapport-combat-ornement-inverse {
    transform: scaleX(-1);
}

.rapport-combat-ornement-inverse.rapport-combat-ornement-faction-1 {
    --rapport-hampe-x: 0px;
}

.rapport-combat-ornement-inverse.rapport-combat-ornement-faction-2 {
    --rapport-hampe-x: 64px;
}

.rapport-combat-player-attaquant .rapport-combat-ornement {
    left: calc(130px - var(--rapport-hampe-x));
}

.rapport-combat-player-cible .rapport-combat-ornement {
    left: calc(96px - var(--rapport-hampe-x));
}

/* -----------------------------------------------------
   CARTOUCHE RAPPORT
----------------------------------------------------- */

.rapport-combat-cartouche {
    position: relative;
    z-index: 5;
    min-width: 230px;
    max-width: 310px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px 0 48px;
    background: #ffffff;
    border: 2px solid rgba(45, 45, 45, 0.85);
    border-radius: 999px;
    box-sizing: border-box;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.rapport-combat-icone {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(45, 45, 45, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.rapport-combat-icone img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.rapport-combat-titre {
    font-weight: bold;
    font-size: 14px;
    color: #1f1f1f;
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

/* -----------------------------------------------------
   CARTOUCHE UNITÉS
----------------------------------------------------- */

.rapport-combat-unites {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    box-sizing: border-box;
    margin: 0 auto 24px auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.rapport-combat-faceoff {
    width: 100%;
    height: 40px;
    max-height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0;
    background: #ffffff;
    border: 1px solid rgba(45, 45, 45, 0.45);
    border-radius: 8px;
    overflow: hidden;
}

.rapport-combat-side {
    min-width: 0;
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.rapport-combat-side-attaquant {
    justify-content: flex-start;
}

.rapport-combat-side-cible {
    justify-content: flex-end;
    text-align: right;
}

.rapport-combat-unite-image {
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rapport-combat-unite-image img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.rapport-combat-identite {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 40px;
    line-height: 1.05;
    padding: 0 4px;
    overflow: hidden;
}

.rapport-combat-unite-nom {
    max-width: 210px;
    font-weight: bold;
    font-size: 12px;
    color: #1f1f1f;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rapport-combat-matricule {
    max-width: 210px;
    margin-top: 2px;
    font-size: 10px;
    font-style: italic;
    color: rgba(90, 90, 90, 0.70);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rapport-combat-versus {
    flex: 0 0 auto;
    padding: 0 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(40, 40, 40, 0.75);
    background: transparent;
    border: none;
    box-shadow: none;
}

/* -----------------------------------------------------
   CARTOUCHE FORMATIONS
----------------------------------------------------- */

.rapport-combat-formations {
    width: 72%;
    height: 34px;
    box-sizing: border-box;
    margin: 5px auto 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid rgba(45, 45, 45, 0.35);
    border-radius: 8px;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.75) inset;
    pointer-events: none;
}

.rapport-combat-formation-zone {
    flex: 1;
    display: flex;
    align-items: center;
}

.rapport-combat-formation-zone-attaquant {
    justify-content: flex-start;
    padding-left: 10px;
}

.rapport-combat-formation-zone-cible {
    justify-content: flex-end;
    padding-right: 10px;
}

.rapport-combat-formation-badge {
    position: static;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(120, 120, 120, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.rapport-combat-formation-badge img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* -----------------------------------------------------
   MOBILE
----------------------------------------------------- */

@media screen and (max-width: 600px) {
    .fenetre_message-content {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        margin: 42px auto 12px auto;
        padding: 14px;
        box-sizing: border-box;
    }

    .fenetre_message-content.rapport-combat-serv1 {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        padding-top: 72px;
        box-sizing: border-box;
    }

    .rapport-combat-header {
        top: -31px;
        left: 50%;
        transform: translateX(-50%);

        width: calc(100% - 4px);
        height: 86px;

        display: grid;
        grid-template-columns: 82px minmax(92px, 1fr) 82px;
        align-items: start;
        justify-items: center;
        column-gap: 4px;

        z-index: 50;
        pointer-events: none;
    }

    .rapport-combat-player {
        position: relative;

        width: 82px;
        min-width: 82px;
        height: 86px;

        display: block;
    }

    .rapport-combat-player-attaquant,
    .rapport-combat-player-cible {
        justify-content: initial;
    }

    .rapport-combat-avatar {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);

        width: 62px;
        height: 62px;
        min-width: 62px;

        border-width: 1px;
        z-index: 6;
    }

    .rapport-combat-pseudo {
        position: absolute;
        top: 49px;
        left: 50%;
        transform: translateX(-50%);

        width: 108px;
        min-width: 108px;
        max-width: 108px;
        height: 24px;

        font-size: 10px;
        line-height: 24px;

        border-width: 1px;
        border-radius: 6px;

        z-index: 9;
    }

    .rapport-combat-pseudo-attaquant,
    .rapport-combat-pseudo-cible {
        margin-left: 0;
        margin-right: 0;
        padding: 0 10px;
        justify-content: center;
        text-align: center;
    }

	.rapport-combat-ornement {
		top: -30px;
		height: 73px;
		z-index: 12;
	}

	.rapport-combat-ornement-faction-1 {
		width: 45px;
		--rapport-hampe-x: 45px;
	}

	.rapport-combat-ornement-faction-2 {
		width: 47px;
		--rapport-hampe-x: 0px;
	}

	.rapport-combat-ornement-inverse.rapport-combat-ornement-faction-1 {
		--rapport-hampe-x: 0px;
	}

	.rapport-combat-ornement-inverse.rapport-combat-ornement-faction-2 {
		--rapport-hampe-x: 47px;
	}

	.rapport-combat-player-attaquant .rapport-combat-ornement {
		left: calc(117px - var(--rapport-hampe-x));
		transform: scaleX(-1);
	}

	.rapport-combat-player-cible .rapport-combat-ornement {
		left: calc(-35px - var(--rapport-hampe-x));
		transform: scaleX(-1);
	}

    .rapport-combat-cartouche {
        min-width: 0;
        width: 100%;
        max-width: 132px;
        height: 34px;

        margin-top: 14px;

        padding: 0 8px 0 36px;
        border-width: 1px;
        justify-self: center;
    }

    .rapport-combat-icone {
        width: 34px;
        height: 34px;
        border-width: 1px;
    }

    .rapport-combat-icone img {
        width: 21px;
        height: 21px;
    }

    .rapport-combat-titre {
        font-size: 10px;
        letter-spacing: 0.15px;
    }

    .rapport-combat-faceoff {
        gap: 3px;
        border-radius: 7px;
    }

    .rapport-combat-side {
        gap: 3px;
    }

    .rapport-combat-unite-nom {
        max-width: 78px;
        font-size: 9.5px;
    }

    .rapport-combat-matricule {
        max-width: 78px;
        font-size: 8px;
        margin-top: 1px;
    }

    .rapport-combat-versus {
        padding: 0 2px;
        font-size: 7.5px;
        letter-spacing: 0;
    }

    .rapport-combat-unites {
        margin-bottom: 20px;
    }

    .rapport-combat-formations {
        width: 74%;
        height: 30px;
        margin-top: 4px;
        padding: 0 14px;
        border-radius: 7px;
    }

    .rapport-combat-formation-zone-attaquant {
        padding-left: 4px;
    }

    .rapport-combat-formation-zone-cible {
        padding-right: 4px;
    }

    .rapport-combat-formation-badge {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .rapport-combat-formation-badge img {
        width: 19px;
        height: 19px;
    }

    .fenetre_message-close {
        float: right;
        margin-top: -8px;
        margin-right: 0;
        margin-left: 8px;
        min-height: 26px;
        padding: 3px 3px 3px 8px;
    }

    .fenetre_message-close::before {
        font-size: 11px;
    }

    .fenetre_message-close::after {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }
}

/* -----------------------------------------------------
   RÉSUMÉ FINAL RAPPORT COMBAT OPÉRATIONNEL
----------------------------------------------------- */

.rapport-resultat-final {
    margin: 18px auto 0 auto;
    padding: 14px;
    width: min(620px, calc(100% - 20px));

    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(45, 45, 45, 0.35);
    border-radius: 10px;

    box-sizing: border-box;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.75) inset;
}

.rapport-resultat-titre {
    margin: 0 0 12px 0;
    padding: 0;

    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #1f1f1f;
    text-transform: uppercase;
}

.rapport-resultat-cartes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.rapport-resultat-carte {
    min-height: 58px;
    padding: 8px 6px;

    background: #ffffff;
    border: 1px solid rgba(80, 80, 80, 0.30);
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}

.rapport-resultat-carte-label {
    margin-bottom: 4px;

    font-size: 11px;
    font-weight: bold;
    color: #555555;
    text-align: center;
    text-transform: uppercase;
}

.rapport-resultat-carte-valeur {
    font-size: 20px;
    font-weight: bold;
    color: #1f1f1f;
    line-height: 1;
}

.rapport-carte-xp .rapport-resultat-carte-valeur,
.rapport-carte-xp-officier .rapport-resultat-carte-valeur {
    color: #1f7a1f;
}

.rapport-carte-morts .rapport-resultat-carte-valeur {
    color: #8b1a1a;
}

.rapport-carte-blesses .rapport-resultat-carte-valeur {
    color: #b36b00;
}

.rapport-resultat-details {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(80, 80, 80, 0.20);
}

.rapport-resultat-details summary {
    cursor: pointer;

    width: fit-content;
    margin: 0 auto;
    padding: 7px 14px;

    background: #f3f3f3;
    border: 1px solid rgba(80, 80, 80, 0.35);
    border-radius: 999px;

    font-size: 12px;
    font-weight: bold;
    color: #222222;
    text-align: center;

    user-select: none;
}

.rapport-resultat-details-contenu {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.rapport-resultat-detail-ligne {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    padding: 6px 8px;

    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(80, 80, 80, 0.15);
    border-radius: 6px;

    font-size: 12px;
}

.rapport-resultat-detail-label {
    font-weight: bold;
    color: #333333;
}

.rapport-resultat-detail-valeur {
    color: #111111;
    text-align: right;
}

@media screen and (max-width: 600px) {
    .rapport-resultat-final {
        width: calc(100% - 12px);
        margin-top: 14px;
        padding: 10px;
        border-radius: 8px;
    }

    .rapport-resultat-titre {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .rapport-resultat-cartes {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .rapport-resultat-carte {
        min-height: 50px;
        padding: 7px 5px;
    }

    .rapport-resultat-carte-label {
        font-size: 10px;
    }

    .rapport-resultat-carte-valeur {
        font-size: 18px;
    }

    .rapport-resultat-detail-ligne {
        flex-direction: column;
        gap: 2px;
        font-size: 11px;
    }

    .rapport-resultat-detail-valeur {
        text-align: left;
    }
}


/* -----------------------------------------------------
   V2 RAPPORT COMBAT : MORAL + RÉSUMÉ / GAINS SÉPARÉS
----------------------------------------------------- */

.rapport-combat-formations {
    gap: 8px;
}

.rapport-combat-formation-zone {
    gap: 8px;
}

.rapport-combat-moral-badge {
    position: static;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--rapport-moral-color, #555555);
    border: 1px solid rgba(120, 120, 120, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.70) inset;
    overflow: hidden;
}

.rapport-combat-moral-badge img {
    position: absolute;
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    opacity: 0.34;
    filter: brightness(0) invert(1);
}

.rapport-combat-moral-badge span {
    position: relative;
    z-index: 1;
    font-size: 10px;
    font-weight: bold;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.70);
}

.rapport-resultat-cartes-resume {
    grid-template-columns: repeat(3, 1fr);
}

.rapport-resultat-carte {
    flex-direction: row;
    gap: 8px;
    justify-content: flex-start;
    padding: 8px 10px;
}

.rapport-resultat-carte-icone {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 1px solid rgba(80, 80, 80, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.rapport-resultat-carte-icone img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.rapport-resultat-carte-texte {
    min-width: 0;
    flex: 1;
}

.rapport-resultat-carte-label {
    margin-bottom: 3px;
    text-align: left;
}

.rapport-resultat-carte-valeur {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rapport-resultat-gains {
    margin-top: 12px;
    padding: 10px;
    background: rgba(245, 255, 245, 0.86);
    border: 1px solid rgba(31, 122, 31, 0.25);
    border-radius: 9px;
    box-sizing: border-box;
}

.rapport-resultat-gains-titre {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #1f7a1f;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.25px;
}

.rapport-resultat-cartes-gains {
    grid-template-columns: repeat(2, 1fr);
}

.rapport-resultat-phrases {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(80, 80, 80, 0.16);
    border-radius: 8px;
    box-sizing: border-box;
}

.rapport-resultat-phrases p {
    margin: 0 0 6px 0;
    font-size: 12px;
    line-height: 1.35;
    color: #222222;
}

.rapport-resultat-phrases p:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 600px) {
    .rapport-combat-formations {
        width: 82%;
        gap: 5px;
    }

    .rapport-combat-formation-zone {
        gap: 5px;
    }

    .rapport-combat-moral-badge {
        width: 26px;
        height: 26px;
        min-width: 26px;
        border-width: 1px;
    }

    .rapport-combat-moral-badge img {
        width: 21px;
        height: 21px;
    }

    .rapport-combat-moral-badge span {
        font-size: 9px;
    }

    /* Mobile : dans le résumé, seules les cartes Morts + Blessés restent côte à côte. */
    .rapport-resultat-cartes-resume {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rapport-resultat-cartes-resume .rapport-resultat-carte {
        grid-column: 1 / -1;
        min-width: 0;
        padding: 7px 6px;
        gap: 6px;
    }

    .rapport-resultat-cartes-resume .rapport-carte-morts {
        grid-column: 1 / 2;
    }

    .rapport-resultat-cartes-resume .rapport-carte-blesses {
        grid-column: 2 / 3;
    }

    /* Mobile : dans les gains, XP unité + XP officier restent côte à côte. */
    .rapport-resultat-cartes-gains {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rapport-resultat-cartes-gains .rapport-resultat-carte {
        min-width: 0;
        padding: 7px 6px;
        gap: 6px;
    }

    .rapport-resultat-cartes-resume .rapport-resultat-carte-label,
    .rapport-resultat-cartes-gains .rapport-resultat-carte-label {
        font-size: 9px;
    }

    .rapport-resultat-cartes-resume .rapport-resultat-carte-valeur,
    .rapport-resultat-cartes-gains .rapport-resultat-carte-valeur {
        font-size: 16px;
    }

    .rapport-resultat-carte {
        min-height: 46px;
    }

    .rapport-resultat-gains {
        margin-top: 10px;
        padding: 8px;
    }

    .rapport-resultat-phrases {
        padding: 8px;
    }

    .rapport-resultat-phrases p {
        font-size: 11px;
    }
}


/* -----------------------------------------------------
   V4 RAPPORT COMBAT : MORAL SANS CHIFFRE + DISTANCE
----------------------------------------------------- */

.rapport-combat-moral-badge {
    background: var(--rapport-moral-color, #555555) !important;
    border: 1px solid rgba(120, 120, 120, 0.75) !important;
}

.rapport-combat-moral-badge span {
    display: none !important;
}

.rapport-combat-moral-badge img {
    opacity: 0.82 !important;
    filter: brightness(0) invert(1) !important;
}

.rapport-carte-touches .rapport-resultat-carte-valeur {
    color: #5a3b12;
}

.rapport-combat-distance-badge {
    position: relative;
    width: 34px;
    height: 30px;
    min-width: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
}

.rapport-combat-distance-cercle {
    width: 30px;
    height: 30px;

    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(120, 120, 120, 0.75);

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.rapport-combat-distance-cercle img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    display: block;
}

.rapport-combat-distance-bulle {
    position: absolute;
    right: -6px;
    top: -6px;

    min-width: 16px;
    height: 16px;
    padding: 0 4px;

    border-radius: 999px;
    background: #222222;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 10px;
    font-weight: bold;
    line-height: 1;

    box-sizing: border-box;

    border: 1px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

@media screen and (max-width: 600px) {
    .rapport-combat-distance-badge {
        width: 30px;
        height: 26px;
        min-width: 30px;
    }

    .rapport-combat-distance-cercle {
        width: 26px;
        height: 26px;
    }

    .rapport-combat-distance-cercle img {
        width: 18px;
        height: 18px;
    }

    .rapport-combat-distance-bulle {
        min-width: 15px;
        height: 15px;
        font-size: 9px;
        right: -5px;
        top: -5px;
    }
}

/* -----------------------------------------------------
   V5 RAPPORT COMBAT : TOUCHÉS DISCRETS + RÉPLIQUES/REBONDS
----------------------------------------------------- */

.rapport-resultat-touches-discret {
    margin-top: 7px;
    padding: 4px 8px;
    width: fit-content;
    max-width: 100%;

    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(80, 80, 80, 0.14);
    border-radius: 999px;

    box-sizing: border-box;

    font-size: 11px;
    color: #555555;
    line-height: 1.2;
}

.rapport-resultat-touches-discret strong {
    color: #333333;
    font-weight: 700;
}

.rapport-resultat-lignes-secondaires {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.rapport-resultat-ligne-secondaire {
    padding: 8px 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(80, 80, 80, 0.18);
    border-radius: 8px;

    box-sizing: border-box;
}

.rapport-resultat-ligne-secondaire-texte {
    min-width: 0;
    flex: 1;
}

.rapport-resultat-ligne-secondaire-titre {
    font-size: 11px;
    font-weight: 800;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.rapport-resultat-ligne-secondaire-unite {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #151515;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rapport-resultat-ligne-secondaire-details {
    margin-top: 2px;
    font-size: 10.5px;
    color: #666666;
}

.rapport-resultat-ligne-secondaire-pertes {
    min-width: 126px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
}

.rapport-resultat-ligne-secondaire-pertes span {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    border: 1px solid rgba(80, 80, 80, 0.16);
    background: #ffffff;
}

.rapport-resultat-ligne-secondaire-morts {
    color: #8b1a1a;
}

.rapport-resultat-ligne-secondaire-blesses {
    color: #b36b00;
}

.rapport-ligne-rebonds-total {
    background: rgba(245, 245, 245, 0.86);
    border-style: dashed;
}

.rapport-ligne-replique-adversaire {
    background: rgba(250, 250, 250, 0.86);
}

.rapport-carte-pieces-artillerie .rapport-resultat-carte-valeur {
    color: #333333;
}

@media screen and (max-width: 600px) {
    .rapport-resultat-touches-discret {
        font-size: 10px;
        padding: 4px 7px;
    }

    .rapport-resultat-ligne-secondaire {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        padding: 7px 8px;
    }

    .rapport-resultat-ligne-secondaire-pertes {
        min-width: 0;
        justify-content: flex-start;
    }

    .rapport-resultat-ligne-secondaire-pertes span {
        font-size: 10px;
        padding: 4px 6px;
    }
}


/* -----------------------------------------------------
   V6 - Rebonds artillerie plus visibles
----------------------------------------------------- */
.rapport-resultat-ligne-secondaire-icone {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(110, 110, 110, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.rapport-resultat-ligne-secondaire-icone img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.rapport-ligne-rebond-artillerie,
.rapport-ligne-rebonds-total {
    padding: 11px 12px;
    min-height: 62px;
    border: 1px solid rgba(80, 60, 30, 0.35);
    background: rgba(255, 250, 238, 0.96);
}

.rapport-ligne-rebonds-total {
    background: rgba(250, 241, 220, 0.98);
    border-width: 2px;
    border-style: solid;
}

.rapport-ligne-rebond-artillerie .rapport-resultat-ligne-secondaire-titre,
.rapport-ligne-rebonds-total .rapport-resultat-ligne-secondaire-titre {
    font-size: 13px;
    color: #4b2d10;
}

.rapport-ligne-rebond-artillerie .rapport-resultat-ligne-secondaire-unite,
.rapport-ligne-rebonds-total .rapport-resultat-ligne-secondaire-unite {
    font-size: 13px;
}

.rapport-ligne-rebond-artillerie .rapport-resultat-ligne-secondaire-details,
.rapport-ligne-rebonds-total .rapport-resultat-ligne-secondaire-details {
    font-size: 11.5px;
    color: #4f4f4f;
}

.rapport-ligne-rebond-artillerie .rapport-resultat-ligne-secondaire-pertes span,
.rapport-ligne-rebonds-total .rapport-resultat-ligne-secondaire-pertes span {
    font-size: 12px;
    padding: 5px 8px;
}

@media screen and (max-width: 600px) {
    .rapport-resultat-ligne-secondaire-icone {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .rapport-resultat-ligne-secondaire-icone img {
        width: 22px;
        height: 22px;
    }
}


/* -----------------------------------------------------
   V8 RAPPORT COMBAT : ARTILLERIE / ÉLÉVATION / REBONDS
   À garder tout en bas du fichier.
----------------------------------------------------- */

.rapport-combat-effectif {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;

    min-width: 0;
    max-width: 100%;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    color: #3a3a3a;
}

.rapport-combat-effectif img {
    width: 14px;
    height: 14px;
    min-width: 14px;
    object-fit: contain;
    display: block;
}

.rapport-combat-effectif span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rapport-combat-elevation-zone {
    width: 72%;
    margin: 6px auto 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    box-sizing: border-box;
    pointer-events: none;
}

.rapport-combat-elevation-artillerie {
    width: 30px;
    height: 30px;
    min-width: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border: 1px solid rgba(120, 120, 120, 0.75);
    border-radius: 50%;

    box-sizing: border-box;

    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.rapport-combat-elevation-artillerie img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.rapport-carte-pieces-artillerie .rapport-resultat-carte-valeur {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;

    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;

    font-size: 16px;
    line-height: 1.05;
}

.rapport-carte-pieces-artillerie .rapport-carte-valeur-separateur {
    font-size: 10px;
    font-weight: 700;
    color: #777777;
    text-transform: uppercase;
}

.rapport-carte-pieces-artillerie .rapport-carte-valeur-ligne {
    display: block;
}

.rapport-carte-pieces-artillerie .rapport-carte-valeur-ligne-principale {
    color: #333333;
}

.rapport-carte-pieces-artillerie .rapport-carte-valeur-ligne-secondaire {
    color: #4b4b4b;
}

/* Rebonds artillerie : cadre neutre englobant les cartes */
.rapport-rebonds-artillerie {
    margin-top: 12px;
    padding: 10px;

    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(80, 80, 80, 0.18);
    border-radius: 10px;

    box-sizing: border-box;
}

.rapport-rebonds-artillerie-entete {
    margin-bottom: 9px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding-bottom: 8px;
    border-bottom: 1px solid rgba(80, 80, 80, 0.14);
}

.rapport-rebonds-artillerie-titre {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-size: 13px;
    font-weight: 800;
    color: #2f2f2f;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.rapport-rebonds-artillerie-icone {
    width: 30px;
    height: 30px;
    min-width: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border: 1px solid rgba(120, 120, 120, 0.55);
    border-radius: 50%;

    box-sizing: border-box;
}

.rapport-rebonds-artillerie-icone img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    display: block;
}

.rapport-rebonds-artillerie-total {
    font-size: 12px;
    font-weight: 800;
    color: #333333;
    text-align: right;
    line-height: 1.15;
}

.rapport-rebonds-artillerie-total span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #666666;
}

.rapport-rebonds-artillerie-cartes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.rapport-rebond-artillerie-carte {
    padding: 8px;

    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(80, 80, 80, 0.16);
    border-radius: 8px;

    box-sizing: border-box;
}

.rapport-rebond-artillerie-image {
    width: 40px;
    height: 40px;

    overflow: hidden;
    border-radius: 7px;
    border: 1px solid rgba(80, 80, 80, 0.22);
    background: #ffffff;

    box-sizing: border-box;
}

.rapport-rebond-artillerie-image img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.rapport-rebond-artillerie-contenu {
    min-width: 0;
}

.rapport-rebond-artillerie-numero {
    font-size: 10px;
    font-weight: 800;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.rapport-rebond-artillerie-nom {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 800;
    color: #202020;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rapport-rebond-artillerie-identite-ligne {
    margin-top: 2px;

    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;
}

.rapport-rebond-artillerie-identite-ligne .rapport-rebond-artillerie-nom {
    margin-top: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.rapport-rebond-artillerie-matricule {
    flex: 0 0 auto;

    padding: 2px 6px;
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.55);

    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.rapport-rebond-artillerie-details {
    margin-top: 2px;
    font-size: 10.5px;
    color: #666666;
}

.rapport-rebond-artillerie-pertes {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.rapport-rebond-artillerie-pertes span {
    padding: 4px 7px;

    background: #ffffff;
    border: 1px solid rgba(80, 80, 80, 0.16);
    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.rapport-rebond-artillerie-morts {
    color: #8b1a1a;
}

.rapport-rebond-artillerie-blesses {
    color: #b36b00;
}

/* On neutralise l'ancien style jaune/orange des rebonds V6 si encore présent */
.rapport-ligne-rebond-artillerie,
.rapport-ligne-rebonds-total {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(80, 80, 80, 0.16) !important;
}

@media screen and (max-width: 600px) {
    .rapport-combat-effectif {
        font-size: 10px;
        gap: 4px;
    }

    .rapport-combat-effectif img {
        width: 13px;
        height: 13px;
        min-width: 13px;
    }

    .rapport-combat-effectif-artillerie span,
    .rapport-combat-effectif-cible span {
        white-space: normal;
        line-height: 1.05;
    }

    .rapport-combat-elevation-zone {
        width: 74%;
        margin-top: 5px;
    }

    .rapport-combat-elevation-artillerie {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .rapport-combat-elevation-artillerie img {
        width: 19px;
        height: 19px;
    }

    .rapport-carte-pieces-artillerie .rapport-resultat-carte-valeur {
        font-size: 14px;
    }

    .rapport-carte-pieces-artillerie .rapport-carte-valeur-separateur {
        font-size: 9px;
    }

    .rapport-rebonds-artillerie {
        padding: 8px;
    }

    .rapport-rebonds-artillerie-entete {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .rapport-rebonds-artillerie-total {
        text-align: left;
    }

    .rapport-rebond-artillerie-carte {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 8px;
    }

    .rapport-rebond-artillerie-image {
        width: 40px;
        height: 40px;
    }

    .rapport-rebond-artillerie-pertes {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-left: 48px;
    }

    .rapport-rebond-artillerie-pertes span {
        font-size: 10px;
        padding: 4px 6px;
    }

    .rapport-rebond-artillerie-identite-ligne {
        gap: 5px;
    }

    .rapport-rebond-artillerie-matricule {
        padding: 2px 5px;
        font-size: 9px;
    }
}

/* -----------------------------------------------------
   CORRECTIONS V12 - DRAPEAUX V2, VICTOIRE, DRAPEAU UNITÉ
----------------------------------------------------- */

/* Nouveaux drapeaux d'entête : rapport_fr_v2.png / rapport_an_v2.png = 46x100 */
.rapport-combat-ornement {
    width: 46px !important;
    height: 100px !important;
    top: -46px !important;
    object-fit: contain !important;
}

.rapport-combat-ornement-faction-1,
.rapport-combat-ornement-faction-2 {
    width: 46px !important;
}

.rapport-combat-ornement-faction-1 {
    --rapport-hampe-x: 46px !important;
}

.rapport-combat-ornement-faction-2 {
    --rapport-hampe-x: 0px !important;
}

.rapport-combat-ornement-inverse.rapport-combat-ornement-faction-1 {
    --rapport-hampe-x: 0px !important;
}

.rapport-combat-ornement-inverse.rapport-combat-ornement-faction-2 {
    --rapport-hampe-x: 46px !important;
}

/* Ligne séparée sous formations : élévation + drapeau porté */
.rapport-combat-symboles-zone {
    width: 72%;
    margin: 6px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    pointer-events: none;
}

.rapport-combat-symboles-cote {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rapport-combat-symboles-attaquant {
    justify-content: flex-start;
    padding-left: 10px;
}

.rapport-combat-symboles-cible {
    justify-content: flex-end;
    padding-right: 10px;
}

.rapport-combat-elevation-zone {
    display: none !important;
}

.rapport-combat-elevation-artillerie,
.rapport-combat-drapeau-badge {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(120, 120, 120, 0.75);
    border-radius: 50%;
    box-sizing: border-box;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.rapport-combat-elevation-artillerie img,
.rapport-combat-drapeau-badge img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* Phrase de victoire / déroute en premier dans la zone texte */
.rapport-resultat-phrases .rapport-resultat-phrase-victoire {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 8px 0;
    padding: 8px 10px;
    background: rgba(255, 235, 235, 0.94);
    border: 1px solid rgba(150, 30, 30, 0.28);
    border-radius: 8px;
    color: #8b1a1a;
    font-weight: 700;
}

.rapport-resultat-phrase-victoire-icone {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(150, 30, 30, 0.32);
    border-radius: 50%;
    box-sizing: border-box;
}

.rapport-resultat-phrase-victoire-icone img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.rapport-resultat-phrase-victoire strong {
    color: #b00000;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

/* Icône déroute/repositionnement dans une carte de rebond */
.rapport-rebond-artillerie-numero-ligne {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rapport-rebond-artillerie-deroute {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(150, 30, 30, 0.30);
    border-radius: 50%;
    box-sizing: border-box;
}

.rapport-rebond-artillerie-deroute img {
    width: 15px;
    height: 15px;
    object-fit: contain;
    display: block;
}

@media screen and (max-width: 600px) {
    .rapport-combat-ornement {
        width: 32px !important;
        height: 70px !important;
        top: -29px !important;
    }

    .rapport-combat-ornement-faction-1,
    .rapport-combat-ornement-faction-2 {
        width: 32px !important;
    }

    .rapport-combat-ornement-faction-1 {
        --rapport-hampe-x: 32px !important;
    }

    .rapport-combat-ornement-faction-2 {
        --rapport-hampe-x: 0px !important;
    }

    .rapport-combat-ornement-inverse.rapport-combat-ornement-faction-1 {
        --rapport-hampe-x: 0px !important;
    }

    .rapport-combat-ornement-inverse.rapport-combat-ornement-faction-2 {
        --rapport-hampe-x: 32px !important;
    }

    .rapport-combat-symboles-zone {
        width: 74%;
        margin-top: 5px;
    }

    .rapport-combat-symboles-attaquant {
        padding-left: 4px;
    }

    .rapport-combat-symboles-cible {
        padding-right: 4px;
    }

    .rapport-combat-elevation-artillerie,
    .rapport-combat-drapeau-badge {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .rapport-combat-elevation-artillerie img,
    .rapport-combat-drapeau-badge img {
        width: 19px;
        height: 19px;
    }

    .rapport-resultat-phrases .rapport-resultat-phrase-victoire {
        align-items: flex-start;
        gap: 7px;
        padding: 7px 8px;
        font-size: 11px;
    }

    .rapport-resultat-phrase-victoire-icone {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .rapport-resultat-phrase-victoire-icone img {
        width: 17px;
        height: 17px;
    }
}


/* -----------------------------------------------------
   CORRECTIONS V13 - VICTOIRE NEUTRE, DRAPEAUX, CAPTURE DRAPEAU
----------------------------------------------------- */

/* Décalage précis des drapeaux d'entête PC :
   attaquant +11px à droite, cible -11px à gauche. */
.rapport-combat-player-attaquant .rapport-combat-ornement {
    left: calc(130px - var(--rapport-hampe-x) + 11px) !important;
}

.rapport-combat-player-cible .rapport-combat-ornement {
    left: calc(96px - var(--rapport-hampe-x) - 11px) !important;
}

/* Phrase victoire : plus de cadre rouge. */
.rapport-resultat-phrases .rapport-resultat-phrase-victoire {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(80, 80, 80, 0.22) !important;
    color: #222222 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

.rapport-resultat-phrase-victoire-icone {
    border: 1px solid rgba(120, 120, 120, 0.35) !important;
}

.rapport-resultat-phrase-victoire strong {
    color: #5b3b00 !important;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

/* Phrase capture de drapeau, placée juste sous la victoire si elle existe. */
.rapport-resultat-phrases .rapport-resultat-phrase-drapeau-capture {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 8px 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(80, 80, 80, 0.22);
    border-radius: 8px;
    color: #222222;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.rapport-resultat-phrase-drapeau-icone {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(120, 120, 120, 0.35);
    border-radius: 50%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
}

.rapport-resultat-phrase-drapeau-icone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

@media screen and (max-width: 600px) {
    /* Téléphone : attaquant -20px à gauche, cible +20px à droite. */
    .rapport-combat-player-attaquant .rapport-combat-ornement {
        left: calc(117px - var(--rapport-hampe-x) - 20px) !important;
    }

    .rapport-combat-player-cible .rapport-combat-ornement {
        left: calc(-35px - var(--rapport-hampe-x) + 20px) !important;
    }

    .rapport-resultat-phrases .rapport-resultat-phrase-drapeau-capture {
        align-items: flex-start;
        gap: 7px;
        padding: 7px 8px;
        font-size: 11px;
    }

    .rapport-resultat-phrase-drapeau-icone {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

	.rapport-resultat-phrase-drapeau-icone img {
		width: 100%;
		height: 100%;
	}
}


/* -----------------------------------------------------
   RAPPORT COMBAT : BADGE NOVICE + MÉDAILLES JOUEUR
----------------------------------------------------- */

.rapport-combat-novice-badge {
    position: static;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #b90000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.24),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
    overflow: hidden;
}

.rapport-combat-novice-badge img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.rapport-combat-medailles {
    position: absolute;
    top: 67px;
    width: 150px;
    max-width: 150px;
    height: 18px;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    overflow: hidden;
    white-space: nowrap;
    z-index: 12;
    pointer-events: none;
    box-sizing: border-box;
}

.rapport-combat-medailles-attaquant {
    left: 0;
    justify-content: flex-start;
}

.rapport-combat-medailles-cible {
    right: 0;
    justify-content: flex-end;
}

.rapport-combat-medailles img {
    width: 16px;
    height: 16px;
    min-width: 16px;
    object-fit: contain;
    display: block;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media screen and (max-width: 600px) {
    .rapport-combat-novice-badge {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .rapport-combat-novice-badge img {
        width: 19px;
        height: 19px;
    }

    .rapport-combat-medailles {
        top: 73px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 108px;
        max-width: 108px;
        height: 15px;
        gap: 1px;
    }

    .rapport-combat-medailles-attaquant {
        justify-content: flex-start;
    }

    .rapport-combat-medailles-cible {
        justify-content: flex-end;
    }

    .rapport-combat-medailles img {
        width: 14px;
        height: 14px;
        min-width: 14px;
    }
}

/* -----------------------------------------------------
   V13 - Rapport texte novice + médailles plus lisibles
----------------------------------------------------- */

.rapport-resultat-phrases-titre {
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    color: #333333;
    text-align: center;
}

.rapport-resultat-phrases .rapport-resultat-phrase-novice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px 0;
}

.rapport-resultat-phrase-novice-icone {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #b90000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.24),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.rapport-resultat-phrase-novice-icone img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.rapport-combat-medailles {
    height: 24px;
    gap: 0 !important;
}

.rapport-combat-medailles img {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    object-fit: contain;
}

@media screen and (max-width: 600px) {
    .rapport-resultat-phrases-titre {
        margin-bottom: 7px;
        font-size: 11px;
    }

    .rapport-resultat-phrases .rapport-resultat-phrase-novice {
        align-items: flex-start;
        gap: 7px;
    }

    .rapport-resultat-phrase-novice-icone {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .rapport-resultat-phrase-novice-icone img {
        width: 20px;
        height: 20px;
    }

    .rapport-combat-medailles {
        height: 21px;
        gap: 0 !important;
    }

    .rapport-combat-medailles img {
        width: 19px !important;
        height: 19px !important;
        min-width: 19px !important;
    }
}


/* -----------------------------------------------------
   V14 - Ajustements médailles + gain argent nul
----------------------------------------------------- */

.rapport-combat-medailles {
    gap: 0 !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    line-height: 0;
    flex-wrap: nowrap;
}

.rapport-combat-medailles img {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    flex: 0 0 auto;
}

@media screen and (max-width: 600px) {
    .rapport-combat-medailles {
        width: 82px !important;
        max-width: 82px !important;
        height: 24px !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        overflow: hidden !important;
        gap: 0 !important;
        column-gap: 0 !important;
        row-gap: 0 !important;
    }

    .rapport-combat-medailles-attaquant {
        left: 0 !important;
        right: auto !important;
        justify-content: flex-start !important;
    }

    .rapport-combat-medailles-cible {
        left: auto !important;
        right: 0 !important;
        justify-content: flex-end !important;
    }

    .rapport-combat-medailles img {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}


/* -----------------------------------------------------
   V15 - Médailles sans espace + avatar joueur 1 or
----------------------------------------------------- */

.rapport-combat-avatar-or {
    border-color: #d4af37 !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.38),
        0 0 0 2px rgba(255, 215, 0, 0.88) inset,
        0 0 10px rgba(212, 175, 55, 0.70) !important;
}

.rapport-combat-medailles {
    height: 30px !important;
    max-height: 30px !important;
    gap: 0 !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden !important;
    align-items: flex-start !important;
}

.rapport-combat-medailles img {
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    max-width: 27px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    display: block !important;
    flex: 0 0 27px !important;
    object-fit: contain !important;
    vertical-align: top !important;
}

.rapport-combat-medailles-attaquant img + img,
.rapport-combat-medailles-cible img + img {
    margin-left: 0 !important;
}

@media screen and (max-width: 600px) {
    .rapport-combat-medailles {
        width: 82px !important;
        max-width: 82px !important;
        height: 20px !important;
        max-height: 20px !important;
        top: 73px !important;
        overflow: hidden !important;
    }

    .rapport-combat-medailles img {
        width: 19px !important;
        height: 19px !important;
        min-width: 19px !important;
        max-width: 19px !important;
        flex-basis: 19px !important;
    }
}


/* -----------------------------------------------------
   V16 - Médailles vraiment collées
   Le wrapper rogne les marges transparentes éventuelles des PNG.
----------------------------------------------------- */

.rapport-combat-medailles {
    display: flex !important;
    gap: 0 !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    height: 34px !important;
    max-height: 34px !important;
    overflow: visible !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
}

.rapport-combat-medaille-item {
    width: 23px !important;
    height: 30px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    flex: 0 0 23px !important;
    display: block !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    box-sizing: border-box !important;
}

.rapport-combat-medaille-item img,
.rapport-combat-medailles > img {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: none !important;
    display: block !important;
    margin: 0 0 0 -3px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    object-fit: contain !important;
    vertical-align: top !important;
    box-shadow: none !important;
    background: transparent !important;
}

.rapport-combat-medailles-attaquant .rapport-combat-medaille-item + .rapport-combat-medaille-item,
.rapport-combat-medailles-cible .rapport-combat-medaille-item + .rapport-combat-medaille-item {
    margin-left: 0 !important;
}

@media screen and (max-width: 600px) {
    .rapport-combat-medailles {
        height: 22px !important;
        max-height: 22px !important;
        overflow: hidden !important;
    }

    .rapport-combat-medaille-item {
        width: 15px !important;
        height: 18px !important;
        min-width: 15px !important;
        max-width: 15px !important;
        flex-basis: 15px !important;
    }

    .rapport-combat-medaille-item img,
    .rapport-combat-medailles > img {
        width: 19px !important;
        height: 19px !important;
        min-width: 19px !important;
        margin-left: -2px !important;
    }
}
