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

:root {
  --couleur: #1a73e8;
  --couleur-hover: #1557b0;
  --gris-clair: #f5f5f5;
  --gris: #e0e0e0;
  --texte: #222;
  --texte-doux: #666;
  --rayon: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff;
  color: var(--texte);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--couleur);
}

header p {
  color: var(--texte-doux);
  margin-top: 0.4rem;
}

.carte {
  background: #fff;
  border: 2px solid var(--gris);
  border-radius: var(--rayon);
  padding: 2rem;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

/* Zone de dépôt */
.zone-depot {
  border: 2px dashed var(--gris);
  border-radius: var(--rayon);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1.5rem;
}

.zone-depot:hover,
.zone-depot.survol {
  border-color: var(--couleur);
  background: #f0f6ff;
}

.zone-depot .icone {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.zone-depot p {
  color: var(--texte-doux);
  font-size: 0.95rem;
}

.zone-depot strong {
  color: var(--couleur);
  cursor: pointer;
}

/* Liste des fichiers sélectionnés */
.liste-fichiers {
  margin-bottom: 1.5rem;
}

.fichier-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--gris-clair);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.fichier-item .nom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.fichier-item .taille {
  color: var(--texte-doux);
  font-size: 0.8rem;
  white-space: nowrap;
}

.fichier-item .supprimer {
  background: none;
  border: none;
  color: var(--texte-doux);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.25rem;
}

/* Champs texte */
.champ {
  margin-bottom: 1rem;
}

.champ label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--texte-doux);
}

.champ input,
.champ textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--gris);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  resize: vertical;
}

.champ input:focus,
.champ textarea:focus {
  outline: none;
  border-color: var(--couleur);
}

/* Boutons */
.btn {
  display: inline-block;
  width: 100%;
  padding: 0.8rem;
  background: var(--couleur);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--couleur-hover);
}

.btn:disabled {
  background: var(--gris);
  cursor: not-allowed;
}

.btn-secondaire {
  background: transparent;
  color: var(--couleur);
  border: 1.5px solid var(--couleur);
}

.btn-secondaire:hover {
  background: #f0f6ff;
}

/* Barre de progression */
.progression {
  margin-top: 1rem;
  display: none;
}

.progression-barre {
  height: 6px;
  background: var(--gris);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progression-barre-inner {
  height: 100%;
  background: var(--couleur);
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s;
}

.progression-texte {
  font-size: 0.85rem;
  color: var(--texte-doux);
  text-align: center;
}

/* Résultat lien */
.resultat {
  display: none;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #f0f6ff;
  border-radius: var(--rayon);
  text-align: center;
}

.resultat p {
  font-size: 0.9rem;
  color: var(--texte-doux);
  margin-bottom: 0.75rem;
}

.resultat .lien {
  display: flex;
  gap: 0.5rem;
}

.resultat .lien input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--gris);
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff;
}

.resultat .lien button {
  padding: 0.6rem 1rem;
  background: var(--couleur);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Messages d'erreur */
.erreur {
  display: none;
  padding: 0.75rem 1rem;
  background: #fdecea;
  color: #c62828;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Lien de navigation */
.nav-lien {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--texte-doux);
}

.nav-lien a {
  color: var(--couleur);
  text-decoration: none;
  font-weight: 600;
}

/* Page téléchargement */
.liste-telechargement {
  list-style: none;
}

.liste-telechargement li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--gris);
  gap: 1rem;
}

.liste-telechargement li:last-child {
  border-bottom: none;
}

.liste-telechargement .nom-fichier {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liste-telechargement .taille-fichier {
  font-size: 0.8rem;
  color: var(--texte-doux);
  white-space: nowrap;
}

.liste-telechargement a.btn-dl {
  padding: 0.4rem 0.9rem;
  background: var(--couleur);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

a.btn-dl-tout {
  display: block;
  width: fit-content;
  margin: 0 auto 1.25rem auto;
  padding: 0.6rem 1.4rem;
  background: var(--couleur);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.expiration {
  font-size: 0.82rem;
  color: var(--texte-doux);
  text-align: center;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .carte {
    padding: 1.25rem;
  }
}
