body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #eef2f7, #d9e2ec);
  color: #2c3e50;
  position: relative;
}

.container {
  max-width: 760px;
  margin: 50px auto;
  background: #ffffff;
  padding: 35px 40px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.header {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: repeat(3, auto);
  grid-template-areas:
    "div1 div2 div3"
    "h1 h1 h1";
  justify-content: center;
  text-align: center;
  align-items: center;
  border-bottom: 1px solid #e0e6ed;
  padding-bottom: 1.5rem;
  grid-gap: 20px;
}

h1 {
  grid-column: 1 / span 3; /* occupe les 3 colonnes */
  justify-self: center; /* centre par rapport à la largeur des 3 colonnes */
  align-self: end; /* pousse en bas de la grille */
  margin: 0;
}

.logo {
  flex: 0 0 auto;
  width: clamp(129px, 8vw, 159px);
}

.logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Titre */
.title {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 600;
  color: #2c3e50;

  flex: 1 1 100%; /* prend toute la ligne si nécessaire */
  white-space: normal; /* autorise le retour à la ligne */
}

/* Desktop : tout sur une ligne */
@media (min-width: 900px) {
  .title {
    flex: 0 1 auto;
    white-space: nowrap;
  }
}

@media (max-width: 440px) {
  .header {
    display: flex;
    flex-wrap: wrap;
  }
}

.icon {
  width: 48px;
  height: 48px;
}

h1 {
  font-size: 1.6em;
  margin: 0;
}

p {
  line-height: 1.7;
  margin-top: 20px;
}

.countdown {
  margin-top: 25px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 5px;
  font-weight: bold;
  color: #856404;
  text-align: center;
}

label {
  display: block;
  margin-top: 7px;
  font-weight: bold;
}

input {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
}

button {
  margin-top: 25px;
  padding: 14px;
  width: 100%;
  background: #005fb8;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  justify-content: center;
  display: flex;
  height: 50px;
  align-items: center;
}

button:disabled {
  background: #9aa4af;
  cursor: not-allowed;
}

.message {
  margin-top: 25px;
  padding: 15px;
  border-radius: 5px;
  display: none;
}

.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.warning {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.85em;
  color: #666;
}
.loader {
  width: 25px;
  height: 25px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #005fb8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
/* contenu du fichier  */

.destruction {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #eef2f7, #d9e2ec);
}

.file-container {
  background: #ffffff;
  padding: 40px;
  border-radius: 8px;
  width: 520px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.file-encrypted {
  width: 90px;
  height: 120px;

  background-image: url("./doc.png"); /* chemin vers ton PNG */
  background-size: cover; /* couvre toute la div */
  background-position: center; /* centre l'image */
  background-repeat: no-repeat; /* pas de répétition */
  border: 1px solid #b5b5b5;
  border-radius: 6px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  font-family: Arial, sans-serif;

  min-width: 90px;
}

/* Coin plié */
.file-encrypted::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 15px;
  background: linear-gradient(135deg, #e6e6e6 50%, #ffffff 50%);

  border-left: 1px solid #b5b5b5;
  border-bottom: 1px solid #b5b5b5;
}

/* Corps du cadenas */
.lock-body {
  width: 28px;
  height: 22px;
  background: #444;
  border-radius: 4px;
  position: absolute;
  bottom: 39px;
  left: 50%;
  transform: translateX(-50%);
}

/* Anse du cadenas */
.lock-body::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 4px;
  width: 14px;
  height: 14px;
  border: 3px solid #444;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

/* Trou du cadenas */
.lock-hole {
  width: 6px;
  height: 6px;
  background: #222;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

/* Texte extension */
.file-label {
  position: absolute;
  bottom: 6px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: bold;
  color: #666;
  letter-spacing: 1px;
}

/* Fichier */

.status {
  font-weight: bold;
  margin-top: 20px;
}

.final {
  color: #b00020;
  display: none;
}

.destroy {
  animation: shatter 2.2s forwards;
}

.file {
  position: relative;
  width: 120px;
  height: 160px;
  background: linear-gradient(#ffffff, #f1f4f8);
  border: 2px solid #cfd8e3;
  border-radius: 6px;
  overflow: hidden;
  margin: 30px auto;
}

/* Coin replié */
.file::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 18px;
  border-style: solid;
  border-color: #e5ebf2 #e5ebf2 transparent transparent;
  z-index: 3;
}

.half {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: inherit;
  border: inherit;
}

/* moitiés */
.left {
  left: 0;
  border-right: 1px dashed #c0392b;
}

.right {
  right: 0;
  border-left: 1px dashed #c0392b;
}

/* ÉTAT DESTRUCTION */
.destroy .left {
  animation: tearLeft 1.8s ease forwards;
}

.destroy .right {
  animation: tearRight 1.8s ease forwards;
}

/* ANIMATIONS */
@keyframes tearLeft {
  0% {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
  40% {
    transform: translateX(-10px) rotate(-3deg);
  }
  100% {
    transform: translate(-60px, 80px) rotate(-18deg);
    opacity: 0;
  }
}

@keyframes tearRight {
  0% {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
  40% {
    transform: translateX(10px) rotate(3deg);
  }
  100% {
    transform: translate(60px, 80px) rotate(18deg);
    opacity: 0;
  }
}
