/* Styles pour l'affichage du poster de course */
body.poster-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}

/* Container et structure de base */
.poster-container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.poster-image-container {
  position: relative;
  page-break-inside: avoid;
  break-inside: avoid;
  display: block;
  margin: 0 auto;
  width: 100%;
}

.poster-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Badge de position */
.position-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 30;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
  font-weight: bold;
  line-height: 0.9;
}

.position-number {
  font-size: 120px;
  display: inline-block;
}

.position-total {
  font-size: 40px;
  display: inline-block;
}

/* Logo iRacePlan */
.logo-badge {
  position: absolute;
  top: 72px;
  right: 20px;
  z-index: 30;
  transform: rotate(-90deg) translateY(256%);
}

.iraceplan-logo-img {
  height: 40px;
  width: auto;
  padding: 5px;
}

/* Informations de course */
.race-info-overlay {
  position: absolute;
  top: 17%;
  left: 50%;
  transform: translateX(-50%) rotate(-26deg);
  z-index: 10;
  padding: 20px;
  text-align: left;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.race-info {
  padding: 20px;
  border-radius: 8px;
}

.race-title {
  font-size: 40px;
  font-weight: bold;
  margin: 0 0 5px 0;
  line-height: 1.1;
  width: 100%;
  min-width: 600px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
}

.series-name {
  min-width: 600px;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #ff6600;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.8);
}

.race-date {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.8);
}

/* Section des pilotes */
.drivers-section {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  z-index: 20;
  text-align: left;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  color: white;
}

.drivers-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  color: white;
  text-align: center;
  border-bottom: 2px solid #ff6600;
  padding-bottom: 8px;
}

.drivers-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 0;
  margin: 0;
}

.driver-item {
  list-style: none;
}

.driver-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  backdrop-filter: blur(3px);
}

.driver-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff6600;
}

.driver-info {
  flex: 1;
}

.driver-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0 0 4px 0;
}

.driver-stats {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.stat {
  white-space: nowrap;
}

/* Style spécifique pour course solo */
.solo-race .drivers-list {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin: 0 auto;
}

.solo-race .driver-card {
  justify-content: center;
  padding: 15px;
}

.solo-race .driver-avatar {
  width: 65px;
  height: 65px;
}

.solo-race .driver-name {
  font-size: 18px;
}

.solo-race .driver-stats {
  font-size: 14px;
}

/* Styles pour l'impression */
@media print {
  body {
    background-color: white;
  }
  
  .poster-container {
    width: 100%;
    height: 100%;
    display: block !important; /* Force l'affichage même si masqué sur mobile */
  }
  
  /* Masquer les boutons d'action lors de l'impression */
  .fixed.bottom-6.right-6 {
    display: none !important;
  }
  
  /* Masquer le message mobile lors de l'impression */
  #mobile-message {
    display: none !important;
  }
}

/* Styles spécifiques pour mobile - écran seulement */
@media screen and (max-width: 768px) {
  body.poster-page {
    align-items: flex-start;
    padding-top: 20px;
  }
  
  #mobile-message {
    max-width: 100%;
    margin: 10px;
  }
  
  .fixed.bottom-6.right-6 {
    bottom: 1rem;
    right: 1rem;
  }
}

@page {
  size: A4;
  margin: 0;
} 