/**
 * Styles frontend pour Jeux QR
 * Reprend le style du projet concours
 * 
 * @package JeuxQR
 * @version 2.0.0
 */

.contest-template {
  background-color: #f6d54825;
}

.contest-template .contest-hero h1 {
  color: #cb3429;
  text-transform: uppercase;
  font-weight: 900;
  font-family: "Arial", sans-serif;
  font-size: 4rem;
  padding-left: 10%;
  padding-right: 10%;
}

.contest-template .contest-hero h2 {
  font-weight: 900;
  font-size: 3rem !important;
  font-family: "Open Sans", Arial, sans-serif;
}

.contest-template .contest-pc-image {
  display: block;
}

.contest-template .contest-pc-image img {
  border-radius: 16px;
}

.contest-template .contest-mobile-image {
  display: none;
}

.contest-template #rgpd_acceptance {
  margin-right: 8px;
}

.contest-template input {
  border: 1px solid lightgrey !important;
  border-radius: 8px !important;
  padding: 1.25rem !important;
}

.contest-template label {
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: grey;
}

.contest-template .required {
  color: red;
  font-weight: 600;
}

.contest-template label[for="rgpd_acceptance"] {
  line-height: 1.5;
  font-size: 1rem;
  margin-top: -6px;
  color: black;
}

.contest-template button[type="submit"] {
  background-color: #7bc240;
  border: 1px solid #7bc240;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  padding: 12px 24px;
}

.contest-template button[type="submit"]:hover {
  background-color: #f8d749;
  border-color: #f8d749;
  color: #cb3429;
}

@media (max-width: 1024px) {

  .contest-template .left {
    margin-bottom: 2rem;
  }

  .contest-template .left > section,
  .contest-template .right > section {
    padding: 1.75rem !important;
  }

  .contest-template .contest-pc-image {
    display: none;
  }

  .contest-template .contest-mobile-image {
    display: block;
  }

  .contest-template .contest-mobile-image img {
    border-radius: 16px;
  }
}

@media (max-width: 768px) {
  .contest-template .contest-hero {
    padding: 25px 10px;
    margin-bottom: 10px;
  }

  .contest-template .contest-hero > div {
    padding: 0.5rem !important;
  }

  .contest-template .contest-hero h1 {
    font-size: 2.5rem;
    padding-left: 10px;
    padding-right: 10px;
  }

  .contest-template .contest-hero h2 {
    font-size: 1.5rem !important;
  }
}

.contest-hero {
  width: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 100px 20px;
  text-align: center;
  margin-bottom: 30px;
}

.contest-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.contest-dates {
  font-size: 1.2rem;
  color: #333;
}

/* === Page de participation === */
.jeux-qr-participation-page {
    padding: 20px 0;
    background: #f8f9fa;
    min-height: 80vh;
}

.jeux-qr-participation-page .container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* === En-tête du jeu === */
.game-header {
    text-align: center;
    background: linear-gradient(135deg, #0073aa, #005a87);
    padding: 30px 20px;
    color: white;
}

.game-image {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* === Informations du jeu === */
.game-info {
    padding: 25px;
    text-align: center;
}

.game-info h1 {
    color: #0073aa;
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: bold;
}

.game-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* === Informations de la station === */
.station-info {
    background: linear-gradient(135deg, #e8f4fd, #d1ecf1);
    border-left: 4px solid #0073aa;
    padding: 20px;
    margin: 0;
}

.station-info h2 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 22px;
}

.station-code {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

/* === Formulaire de participation === */
.participation-form {
    padding: 30px;
    background: #f8f9fa;
}

.participation-form h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.form-group input:invalid {
    border-color: #dc3545;
}

/* === Boutons === */
.submit-btn {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #005a87, #004a70);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === Messages === */
.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 20px;
    margin: 20px;
}

.success-message h3 {
    margin-top: 0;
    color: #0f5132;
}

.error-message {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 20px;
    margin: 20px;
}

/* === Progression du participant === */
.participant-progress {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin: 20px;
    border: 1px solid #dee2e6;
}

.participant-progress h4 {
    color: #0073aa;
    margin-top: 0;
}

.participant-progress ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.participant-progress li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.participant-progress li:last-child {
    border-bottom: none;
}

.qualified {
    color: #28a745;
    font-weight: bold;
}

.winner {
    color: #dc3545;
    font-weight: bold;
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

/* === Règles du jeu === */
.game-rules {
    border-top: 1px solid #eee;
    padding: 25px;
    background: #fafbfc;
}

.game-rules h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.rules-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.6;
    color: #555;
}

.rules-list li:last-child {
    border-bottom: none;
}

/* === Page d'erreur === */
.jeux-qr-error-page {
    padding: 50px 20px;
    text-align: center;
    background: #f8f9fa;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    max-width: 500px;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.error-content h1 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 24px;
}

.back-home {
    display: inline-block;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-home:hover {
    background: linear-gradient(135deg, #005a87, #004a70);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

/* === Shortcodes === */
.qr-game-display {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.qr-game-display h2 {
    color: #0073aa;
    margin-top: 0;
}

.qr-game-stats {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.qr-game-stats h3 {
    margin-top: 0;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-message,
.error-message {
    animation: fadeIn 0.3s ease-out;
}

/* === Responsive === */
@media (max-width: 768px) {
    .jeux-qr-participation-page {
        padding: 10px;
    }
    
    .jeux-qr-participation-page .container {
        margin: 0 10px;
        border-radius: 6px;
    }
    
    .game-header {
        padding: 20px 15px;
    }
    
    .game-info,
    .participation-form,
    .game-rules {
        padding: 20px;
    }
    
    .game-info h1 {
        font-size: 24px;
    }
    
    .station-info h2 {
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* === États de chargement === */
.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Utilitaires === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

.hidden { display: none !important; }

.fade-in {
    animation: fadeIn 0.5s ease-out;
}
