/* ============================================================
   Design "mariage" : fond crème, accents terracotta, mobile-first.
   Une seule carte centrée, pensée pour un écran de téléphone.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --creme: #FDF9F3;
  --terracotta: #D85A30;
  --terracotta-clair: #F5C4B3;
  --terracotta-pale: #FAECE7;
  --brun: #4A1B0C;
  --brun-moyen: #993C1D;
  --brun-doux: #712B13;
  --vert: #0F6E56;
  --vert-fonce: #085041;
  --vert-pale: #E1F5EE;
  --gris: #B4B2A9;
  --rouge: #A32D2D;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--creme);
  color: var(--brun);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
}

.carte { width: 100%; max-width: 420px; }

/* --- En-tête --- */
header { text-align: center; margin-bottom: 28px; }

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 32px;
  color: var(--brun);
}

.sous-titre { color: var(--brun-moyen); font-size: 15px; margin-top: 6px; }

/* --- Formulaire d'accueil --- */
label { display: block; font-size: 14px; color: var(--brun-doux); margin-bottom: 6px; }

input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px; /* 16px minimum : évite le zoom automatique d'iOS Safari */
  border: 1px solid var(--terracotta-clair);
  border-radius: 10px;
  background: #fff;
  color: var(--brun);
  outline: none;
}

input[type="text"]:focus { border-color: var(--terracotta); }

.bouton-principal {
  width: 100%;
  margin-top: 22px;
  padding: 20px 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--terracotta);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bouton-principal:active { transform: scale(0.98); }
.bouton-principal .icone { font-size: 26px; }

.bouton-secondaire {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brun-moyen);
  background: transparent;
  border: 1px solid var(--terracotta-clair);
  border-radius: 12px;
  cursor: pointer;
}

.note {
  text-align: center;
  font-size: 12.5px;
  color: var(--brun-moyen);
  margin-top: 22px;
}

/* --- Écran d'envoi --- */
.texte-progression { text-align: center; font-size: 15px; color: var(--brun-doux); margin-bottom: 10px; }

.barre-fond {
  background: var(--terracotta-clair);
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
}

.barre-remplie {
  background: var(--terracotta);
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.liste-fichiers { list-style: none; margin-top: 18px; }

.liste-fichiers li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 5px 0;
  color: var(--gris);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.liste-fichiers li.ok { color: var(--vert-fonce); }
.liste-fichiers li.encours { color: var(--brun-moyen); }
.liste-fichiers li.erreur { color: var(--rouge); }

/* --- Écran de fin --- */
#ecran-fin { text-align: center; }

.pastille-succes {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--vert-pale);
  color: var(--vert);
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.message-fin { font-size: 19px; font-weight: 600; color: var(--vert-fonce); }
.detail-fin { font-size: 14px; color: var(--vert); margin-top: 4px; }

#ecran-fin.avec-echecs .pastille-succes { background: var(--terracotta-pale); color: var(--terracotta); }
#ecran-fin.avec-echecs .message-fin { color: var(--brun-doux); }
#ecran-fin.avec-echecs .detail-fin { color: var(--brun-moyen); }
