/* Variables CSS pour la cohérence des couleurs */
:root {
    --primary-color: #E61D2A; /* Rouge BLASFEM */
    --primary-dark: #c41822;
    --secondary-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --success-color: #4CAF50;
	--font-family: 'Roboto Condensed', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Styles de base */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--secondary-color);
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    min-height: 100vh;
    box-shadow: var(--shadow);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 100px;
}

/* Logo et en-tête */
.logo {
    max-width: 180px;
    height: auto;
    margin: 0 auto 20px;
    text-align: center;
    padding: 10px 0;
}

.logo img {
    max-width: 100%;
    height: auto;
}

/* Typographie améliorée */
h1, h2, h3 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 500;
}

h1 {
    font-size: 24px;
    margin-top: 10px;
}

h2 {
    font-size: 22px;
    position: relative;
    padding-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

h3 {
    font-size: 20px;
    color: var(--primary-color);
    position: relative;
    margin-bottom: 15px;
}

p {
    margin-bottom: 20px;
    text-align: center;
}

/* Navigation entre pages */
.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Formulaires et entrées */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: var(--transition);
    background-color: #f9f9f9;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(230, 29, 42, 0.2);
    background-color: #fff;
}

/* Boutons stylisés */
button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    margin-top: 20px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(230, 29, 42, 0.3);
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 29, 42, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(230, 29, 42, 0.3);
}

button:disabled {
    background-color: #999;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Checklist stylisée */
.checklist-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
    background-color: #f0f0f0;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
}

.checklist-item:hover {
    background-color: #e6e6e6;
}

.checklist-item input[type="checkbox"] {
    margin-right: 15px;
    margin-top: 3px;
    width: 22px;
    height: 22px;
    appearance: none;
    border: 2px solid #ccc;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.checklist-item input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checklist-item input[type="checkbox"]:checked::after {
    content: '✓';
    color: white;
    position: absolute;
    left: 5px;
    top: -1px;
    font-size: 16px;
}

.checklist-item label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 15px;
    cursor: pointer;
}

/* Section photo */
.photo-section {
    margin-top: 30px;
    text-align: center;
}

.photo-preview {
    width: 100%;
    height: 300px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
    transition: var(--transition);
}

.photo-preview:hover {
    border-color: var(--primary-color);
}

.photo-preview img {
    max-width: 100%;
    max-height: 100%;
    display: none;
    object-fit: contain;
    border-radius: 8px;
}

.photo-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}

.photo-controls button {
    width: calc(50% - 7.5px);
}

/* Styles existants pour .help-button */
.help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

/* Nouveau style pour positionner le bouton en haut à gauche */
.help-button.top-left {
    position: absolute; /* Changed from fixed to absolute */
    top: 20px;
    left: 20px;
    bottom: auto; /* Annule le positionnement bottom par défaut */
    right: auto; /* Annule le positionnement right par défaut */
    z-index: 20; /* Assurez-vous qu'il soit au-dessus des autres éléments */
}

/* Pour masquer le bouton sur la première page */
#page1.active ~ .help-button.top-left {
    display: none;
}

/* Indicateur de main */
.hand-indicator {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: var(--shadow);
}

/* Message de complétion */
.completion-message {
    text-align: center;
    padding: 30px 0;
}

.completion-message h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 25px;
}

.completion-message p {
    margin-bottom: 15px;
    font-size: 16px;
}

.completion-message strong {
    font-weight: 500;
    color: var(--primary-color);
}

/* Champs de nom en 3 lettres */
.letters-input {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.letter-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 28px;
    text-transform: uppercase;
    border-radius: 8px;
}

/* Photo exemple */
.example-photo-section {
    margin: 20px 0;
    text-align: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.example-photo-section h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--secondary-color);
}

.example-photo-section img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Masquer l'input file natif du navigateur */
.file-input {
    display: none !important;
}

/* Styles pour la fenêtre popup */
.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background-color: #fefefe;
    margin: 20% auto;
    padding: 25px;
    border-radius: 12px;
    width: 85%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    animation: slideUp 0.4s ease;
    border-top: 4px solid var(--primary-color);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.popup-content h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.popup-content p {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--secondary-color);
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.popup-buttons button {
    min-width: 120px;
    width: auto;
    margin-top: 10px;
    padding: 12px 20px;
}

#page1.active ~ .help-button {
    display: none;
}

/* Style pour le popup de notification */
#disabledButtonPopup .popup-content,
#orderNumberAlertPopup .popup-content,
#photoAlertPopup .popup-content {
    background-color: #fff9f9;
}

/* Style pour bouton désactivé mais cliquable */
.disabled-but-clickable {
    background-color: #999;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ajustements pour mobile */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .checklist-item {
        padding: 10px;
    }
    
    .photo-preview {
        height: 250px;
    }
    
    .help-button {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .popup-content {
        margin: 30% auto;
        padding: 20px;
        width: 90%;
    }
}
/* Ajoutez ce code à votre fichier CSS existant */
.instruction-group {
    margin: 25px 0;
}

.instruction-line {
    position: relative;
    text-align: left;
    padding: 5px 20px 5px 48px; /* Padding-left augmenté pour laisser de la place à l'icône */
    margin: 0;
}

.instruction-line:first-child {
    margin-bottom: 5px;
}

.instruction-line i {
    position: absolute;
    left: 20px;
    top: 5px; /* Aligné avec le haut du conteneur */
    color: var(--primary-color); /* Rouge BLASFEM */
    font-size: 18px; /* Taille légèrement plus grande pour l'icône */
}

.instruction-line span {
    text-align: left;
    display: block;
}

/* Support supplémentaire pour Firefox */
@-moz-document url-prefix() {
    .instruction-line i {
        margin-top: 0.3em; /* Légèrement plus élevé pour Firefox si nécessaire */
    }
}

/* Styles pour la page de confirmation */
.completion-message {
    text-align: center;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.completion-message h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Correction pour rendre la carte de confirmation responsive */
.confirmation-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 6px 6px 8px rgba(0, 0, 0, 0.15);
    padding: 20px;
    width: 85%;
    max-width: 320px; /* Réduit pour éviter les débordements */
    margin: 0 auto;
    border: 1px solid var(--primary-color); /* Bordure uniforme sur tous les côtés */
    box-sizing: border-box;
    overflow: hidden; /* Empêche tout débordement */
}

/* Ajustements spécifiques pour mobile */
@media (max-width: 480px) {
    .confirmation-card {
        width: 80%; /* Réduit pour les petits écrans */
        padding: 15px 12px;
        margin: 0 auto;
        box-shadow: 6px 6px 8px rgba(0, 0, 0, 0.15); /* Ombre encore plus réduite */
    }
    
    .confirmation-card p {
        font-size: 14px; /* Texte plus petit pour s'adapter aux petits écrans */
    }
    
    .success-message {
        font-size: 15px;
    }
}

.success-message {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.order-number {
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 16px;
}

.order-number strong {
    color: var(--primary-color);
    font-size: 18px;
    display: block;
    margin-top: 5px;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

.confirmation-card p {
    text-align: left;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.confirmation-card p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.website-link {
    margin-top: 100px;
    font-size: 16px;
}

.website-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.website-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Animation de tremblement pour la première checklist    //animation-iteration-count: 3; */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.checklist-item#check-item1 {
    animation: shake 1s;
    animation-play-state: paused;
}

.checklist-item#check-item1.shake {
    animation-play-state: running;
}

.logo-img {
  max-width: 50px; /* Ajustez cette valeur selon la taille souhaitée */
  height: auto; /* Pour maintenir les proportions de l'image */
}

/* Modification de l'animation du logo et du fond plexus */
#logo-page {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: calc(600px + 40px); /* Largeur de l'application + 2x les paddings */
  height: 100vh;
  background-image: url('plexus-background.jpg');
  background-size: cover;
  background-position: center bottom; /* Position initiale en bas */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: 
    fadeOut 1s ease-in-out 1s forwards, 
    backgroundTravel 2s linear forwards; /* Animation du traveling avec vitesse constante */
 
  padding: 0 20px; /* Même padding horizontal que le conteneur */
  margin: 0 auto; /* Centrer horizontalement */
  box-sizing: border-box; /* Inclure les bordures et padding dans la largeur */
  overflow: hidden; /* S'assurer que le fond reste contenu */
}

/* Animation du traveling de bas en haut */
@keyframes backgroundTravel {
  0% {
    background-position: center 60%; /* Commence à 60% de la hauteur */
  }
  100% {
    background-position: center 40%; /* S'arrête à 40% de la hauteur */
  }
}

.logo-container {
  animation: fadeIn 0.5s ease-in-out;
  position: relative;
  z-index: 2; /* S'assurer que le logo est au-dessus du fond */
}

.logo-img {
  max-width: 50px; /* Ajustez cette valeur selon la taille souhaitée */
  height: auto; /* Pour maintenir les proportions de l'image */
  animation: 
    blurFadeOut 1s ease-in-out 1s forwards,
    zoomIn 2s ease-out forwards; /* Ajout de l'animation de zoom in */
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)); /* Ajoute un halo lumineux autour du logo */
  transform-origin: center; /* Centre le point d'origine de la transformation */
}

/* Animation de zoom in pour le logo */
@keyframes zoomIn {
  0% {
    transform: scale(0.95); /* Commence légèrement plus petit */
  }
  100% {
    transform: scale(1.1); /* Termine légèrement plus grand */
  }
}

@keyframes fadeIn {
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes blurFadeOut {
  0% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) blur(0px);
  }
  40% {
    opacity: 0.6;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)) blur(8px);
  }
  100% {
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)) blur(15px);
  }
}

/* Ajout pour s'assurer que l'écran d'intro s'aligne parfaitement sur mobile */
@media (max-width: 640px) {
  #logo-page {
    width: 100%;
    max-width: 100%;
    left: 0;
    transform: none;
    padding: 0;
    position: fixed;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Arrière-plan transparent - l'image sera dans un div enfant */
    background-image: none;
    /* Retarder le fadeout pour qu'il commence après la fin de l'animation du fond */
    animation: fadeOutDescendMobile 1s ease-in-out 2.5s forwards;
  }
  
  /* Nouvel élément arrière-plan qui sera animé indépendamment */
  .plexus-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* 120% pour permettre le déplacement */
    background-image: url('plexus-background.jpg');
    background-size: cover;
    background-position: center bottom;
    z-index: 1;
    /* Animation plus courte pour qu'elle se termine avant le fadeout */
    animation: moveBgDown 3s linear forwards;
  }
  
  @keyframes moveBgDown {
    0% {
      transform: translateY(-10%); /* Commence 20% au-dessus */
    }
    100% {
      transform: translateY(0%); /* Descend à la position normale */
    }
  }
  
  /* Logo avec zoom mais au-dessus du fond */
  .logo-container {
    position: relative;
    z-index: 2;
  }
  
  .logo-img {
    /* Retarder l'animation de blur pour qu'elle coïncide avec le fadeout */
    animation: 
      blurFadeOut 1s ease-in-out 2.5s forwards,
      zoomIn 1.5s ease-out forwards;
  }
  
  @keyframes fadeOutDescendMobile {
    0% {
      opacity: 1;
      transform: translateY(0);
    }
    100% {
      opacity: 0;
      transform: translateY(10px);
      visibility: hidden;
    }
  }
}