
/* ==========================================================================
   drop.e-cribs.org — Thème épuré moderne
   ========================================================================== */

/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: #f7fafc;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0;
  color: #2d3748;
  line-height: 1.6;
}

#content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5em 3em;
}

/* ── En-tête ──────────────────────────────────────────────────────────── */
#site-header {
  padding: 2em 0 1.5em;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 2em;
}

#site-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
}

#site-title h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

#site-title h1 a {
  color: #1a202c;
  text-decoration: none;
}

#site-title h1 a:hover {
  color: #2b6cb0;
}

.flag {
  width: 52px;
  height: 35px;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

h2 {
  text-align: center;
  color: #4a5568;
  font-size: 1em;
  font-weight: 500;
}

/* ── Formulaire de dépôt ──────────────────────────────────────────────── */
fieldset {
  border: 2px dashed #cbd5e0;
  border-radius: 10px;
  padding: 2em 1.5em;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  min-height: 12em;
  background: #ffffff;
  position: relative;
  transition: border-color 0.2s;
}

fieldset:hover {
  border-color: #2b6cb0;
}

legend {
  padding: 0.4em 1em;
  background: #ffffff;
  color: #2b6cb0;
  font-size: 1em;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Zone de sélection de fichier */
#file_select {
  position: relative;
  width: 100%;
  height: 10em;
  cursor: pointer;
  opacity: 0;
}

#upload.file-selected #file_select {
  opacity: 1;
  height: 2em;
}

#upload.file-selected fieldset {
  background-image: none;
}

#upload fieldset {
  background-image: url(upload.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 4em;
}

#upload > form { text-align: center; }
#upload p { margin: 0; }

/* ── Contrôles ────────────────────────────────────────────────────────── */
input[type="submit"] {
  background: #2b6cb0;
  border: none;
  padding: 0.55em 2em;
  font-size: 1em;
  font-weight: 500;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  margin: 0.8em 0.3em;
  transition: background 0.15s;
}

input[type="submit"]:hover,
input[type="submit"]:focus {
  background: #2c5282;
  position: static;
  margin-bottom: 0.8em;
}

select,
input[type="text"],
input[type="password"] {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45em 0.7em;
  font-size: 0.95em;
  color: #2d3748;
  background: #fff;
  transition: border-color 0.15s;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #2b6cb0;
  box-shadow: 0 0 0 3px rgba(43,108,176,0.1);
}

select { width: 100%; }

/* ── Options ──────────────────────────────────────────────────────────── */
#options {
  position: relative;
  z-index: 10;
  width: 100%;
}

#options tr { height: 2.5em; }
#options input[type="submit"] { margin: 1em auto; }

.config {
  font-size: 0.8em;
  color: #718096;
  margin: 0.3em 0;
}

/* ── Upload en cours ──────────────────────────────────────────────────── */
#uploading {
  text-align: center;
  color: #4a5568;
  padding: 1em;
}

#uploading a {
  font-weight: 600;
  text-decoration: none;
  color: #2b6cb0;
}

#uploaded_percentage {
  font-size: 2.2em;
  font-weight: 700;
  color: #2b6cb0;
}

/* ── Messages ─────────────────────────────────────────────────────────── */
.message, .error {
  text-align: center;
  color: #c53030;
  font-style: italic;
  font-weight: 500;
  padding: 1em;
}

.info {
  text-align: center;
  color: #4a5568;
  padding: 1em;
}

/* ── Connexion / déconnexion ──────────────────────────────────────────── */
.form.login fieldset,
.form.logout fieldset {
  min-height: auto;
  background-image: none;
}

/* ── Formulaire de login ─────────────────────────────────────────────── */
table a { color: #2b6cb0; }
table a:hover { text-decoration: none; }

/* ── Pied de page ─────────────────────────────────────────────────────── */
#site-footer {
  text-align: center;
  font-size: 0.78em;
  color: #a0aec0;
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid #e2e8f0;
}

#site-footer a {
  color: #a0aec0;
  text-decoration: none;
}

#site-footer a:hover { text-decoration: underline; }
#site-footer span { margin: 0 0.3em; }

/* ── Page de téléchargement ───────────────────────────────────────────── */
#self_destruct {
  font-weight: 600;
  color: #c53030;
  background-image: url('pixel_bomb.png');
  background-size: 36px 36px;
  background-repeat: no-repeat;
  padding-left: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ── Admin & Install ──────────────────────────────────────────────────── */
#admin fieldset,
#install fieldset,
#admin + fieldset,
#install + fieldset {
  width: auto;
  max-width: 56em;
  border: 2px dashed #cbd5e0;
  background: #fff;
}

#admin table,
#install table,
#admin + fieldset table,
#install + fieldset table {
  width: 100%;
  border-collapse: collapse;
}

#admin td,
#install td,
#admin + fieldset td,
#install + fieldset td {
  padding: 0.5em 1em;
  border-bottom: 1px solid #e2e8f0;
}

#admin table tr:nth-child(odd),
#install table tr:nth-child(odd),
#admin + fieldset tr:nth-child(odd),
#install + fieldset tr:nth-child(odd) {
  background: #f7fafc;
}

#admin fieldset > form,
#install fieldset > form {
  margin-top: 2em;
  text-align: center;
}

#admin form,
#install form {
  display: table;
  width: 100%;
}

/* email icon (héritage) */
#upload_link_email { margin-left: 10px; }
#upload_image_email {
  padding-left: 20px;
  padding-bottom: 15px;
  background: url(email.png) no-repeat;
}

/* ── Textarea TOS ─────────────────────────────────────────────────────── */
textarea[readonly="readonly"] {
  border: 0;
  color: #4a5568;
  font-family: inherit;
  background: none;
  margin: auto;
  display: block;
}

textarea[readonly="readonly"] + p,
textarea[readonly="readonly"] + p + p {
  text-align: center;
  color: #4a5568;
}

textarea[readonly="readonly"] + p a,
textarea[readonly="readonly"] + p + p a {
  font-weight: 600;
  text-decoration: none;
  color: #2b6cb0;
}

textarea[readonly="readonly"] + p a:hover,
textarea[readonly="readonly"] + p + p a:hover {
  text-decoration: underline;
}
