/* ============================================================
   Plateforme de téléchargement IDONEIS — styles
   Charte : bleu #40668b, blanc cassé #f7f5f2, noir #1b1b1b,
            vert #418c5d (succès), rouge #9c2f2f (alerte)
   ============================================================ */

:root {
  --bleu:        #40668b;
  --bleu-clair:  #5186b2;
  --bleu-vif:    #62a6d8;
  --bleu-pale:   #73c6ff;
  --noir:        #1b1b1b;
  --blanc:       #f7f5f2;
  --vert:        #418c5d;
  --rouge:       #9c2f2f;
  --gris:        #6b7280;
  --gris-bord:   #d8d5cf;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(27,27,27,.08), 0 4px 16px rgba(27,27,27,.06);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--noir);
  background: var(--blanc);
  line-height: 1.55;
  min-height: 100vh;
}

/* ---- Mise en page à deux panneaux ---- */
.shell { display: flex; min-height: 100vh; }

/* Panneau latéral identitaire (la signature visuelle) */
.aside {
  flex: 0 0 38%;
  max-width: 460px;
  background: var(--bleu);
  color: var(--blanc);
  padding: 3rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.aside::after {                 /* trait graphique discret */
  content: "";
  position: absolute;
  right: -120px; top: 50%;
  width: 340px; height: 340px;
  border: 1px solid rgba(247,245,242,.12);
  border-radius: 50%;
  transform: translateY(-50%);
}
.aside__logo { max-width: 190px; filter: brightness(0) invert(1); }
.aside__tagline { font-size: 1.45rem; font-weight: 300; line-height: 1.35; }
.aside__tagline strong { font-weight: 600; }
.aside__foot { font-size: .82rem; color: rgba(247,245,242,.6); }

/* Panneau de contenu */
.main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 2rem;
}
.panel { width: 100%; max-width: 560px; }

h1 { font-size: 1.7rem; font-weight: 650; color: var(--bleu); margin-bottom: .4rem; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 1.6rem 0 .8rem; }
.lead { color: var(--gris); margin-bottom: 2rem; }

/* ---- Formulaires ---- */
.field { margin-bottom: 1.15rem; }
label { display: block; font-weight: 550; font-size: .9rem; margin-bottom: .35rem; }
input[type=text], input[type=password], input[type=email],
input[type=number], select {
  width: 100%;
  padding: .7rem .85rem;
  font-size: 1rem;
  border: 1px solid var(--gris-bord);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--bleu-clair);
  box-shadow: 0 0 0 3px rgba(81,134,178,.18);
}
.hint { font-size: .82rem; color: var(--gris); margin-top: .3rem; }

.checkbox { display: flex; align-items: flex-start; gap: .55rem; }
.checkbox input { margin-top: .25rem; }

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.4rem;
  font-size: 1rem; font-weight: 600;
  border: none; border-radius: var(--radius);
  background: var(--bleu); color: #fff;
  cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--bleu-clair); }
.btn:active { transform: translateY(1px); }
.btn--full { width: 100%; justify-content: center; }
.btn--ghost { background: transparent; color: var(--bleu); border: 1px solid var(--gris-bord); }
.btn--ghost:hover { background: rgba(64,102,139,.06); }
.btn--danger { background: var(--rouge); }
.btn--danger:hover { background: #b53a3a; }

/* ---- Messages ---- */
.alert { padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-size: .92rem; }
.alert--error   { background: rgba(156,47,47,.08);  color: var(--rouge); border: 1px solid rgba(156,47,47,.25); }
.alert--success { background: rgba(65,140,93,.08);  color: var(--vert);  border: 1px solid rgba(65,140,93,.25); }
.alert--info    { background: rgba(64,102,139,.07); color: var(--bleu);  border: 1px solid rgba(64,102,139,.22); }

/* ---- Tableaux (admin, liste de fichiers) ---- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--gris-bord); }
th { font-weight: 600; color: var(--gris); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: rgba(64,102,139,.03); }

.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.badge--ok    { background: rgba(65,140,93,.12); color: var(--vert); }
.badge--warn  { background: rgba(156,47,47,.10); color: var(--rouge); }

/* ---- Zone de dépôt ---- */
.dropzone {
  border: 2px dashed var(--gris-bord);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--gris);
  background: #fff;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--bleu-clair); background: rgba(81,134,178,.05); }
.progress { height: 8px; background: var(--gris-bord); border-radius: 999px; overflow: hidden; margin-top: 1rem; display: none; }
.progress__bar { height: 100%; width: 0; background: var(--vert); transition: width .2s; }

.linkbox {
  display: flex; gap: .5rem; margin-top: .5rem;
}
.linkbox input { font-family: monospace; font-size: .9rem; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .shell { flex-direction: column; }
  .aside { flex: none; max-width: none; flex-direction: row; align-items: center;
           justify-content: space-between; padding: 1.25rem 1.5rem; }
  .aside::after { display: none; }
  .aside__logo { max-width: 130px; }
  .aside__tagline, .aside__foot { display: none; }
  .main { padding: 2rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
