/* Style complet et nettoyé — logo petit sous le titre */

/* Polices */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root{
  --primary-blue: #0033A0;
  --accent-red:   #E30613;
  --muted:        #6b6b6b;
  --bg:           #ffffff;
  --surface:      #f7f7f7;
  --radius:       8px;
  --shadow:       0 6px 20px rgba(0,0,0,0.08);
  --container-max: 560px;
  --gap: 12px;

  /* Couleurs pour la barre de force */
  --strength-poor:      #b00020; /* très faible */
  --strength-weak:      #e30613; /* faible */
  --strength-medium:    #f5a623; /* moyen */
  --strength-good:      #14a76c; /* bon */
  --strength-excellent: #0066cc; /* excellent */
}

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: linear-gradient(180deg,#f2f5f9 0%, #ffffff 60%);
  font-family: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #111;
  -webkit-text-size-adjust: 100%;
}

/* Conteneur principal */
.container {
  max-width: var(--container-max);
  width: min(95%, var(--container-max));
  margin: 48px auto;
  background: var(--bg);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow);
  border-top: 6px solid var(--primary-blue);
}

/* Header : titre centré puis petit logo en dessous */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 4px 0 12px;
  padding: 0 clamp(8px, 2vw, 16px);
}

/* Titre — une seule ligne, en majuscules */
.header .title,
.header h1 {
  margin: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--primary-blue);
  font-weight: 700;
}

/* Petit logo juste en dessous du titre */
.header .logo-below,
.header .logo {
  width: 36px;
  height: 36px;
  background: none;
  background-image: url("assets/logo_academie.jpg"), url("/logo_academie.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Si une <img> est présente dans .logo-below, force l'adaptation */
.header .logo-below img,
.header .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Champ mot de passe */
input[type="password"]{
  width:100%;
  padding:14px 12px;
  font-size:16px;
  border:1px solid #e6e6e6;
  border-radius:6px;
  outline:none;
  transition: box-shadow .15s, border-color .15s;
  background: linear-gradient(180deg,#fff,#fbfbfb);
}
input[type="password"]:focus{
  border-color: var(--primary-blue);
  box-shadow: 0 6px 18px rgba(0,51,160,0.12);
}

/* Barre de force (score 0..4) */
#strength{
  display:inline-block;
  padding:6px 10px;
  border-radius:20px;
  font-weight:700;
  font-size:13px;
  color:#fff;
  background:var(--muted);
  margin-top:12px;
}
#strength.score-0{ background:var(--strength-poor); }      /* très faible */
#strength.score-1{ background:var(--strength-weak); }      /* faible */
#strength.score-2{ background:var(--strength-medium); }    /* moyen */
#strength.score-3{ background:var(--strength-good); }      /* bon */
#strength.score-4{ background:var(--strength-excellent); } /* excellent */

/* Feedback et info */
#feedback{
  margin-top:12px;
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
}
#crack-time{
  margin-top:10px;
  font-size:13px;
  color:#333;
  font-weight:600;
}

/* Actions / boutons */
.actions {
  display:flex;
  gap:10px;
  margin-top:18px;
  flex-wrap:wrap;
}
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:6px;
  border:0;
  cursor:pointer;
  font-weight:700;
  color:#fff;
  background:var(--primary-blue);
  box-shadow: 0 6px 16px rgba(0,51,160,0.12);
  transition: transform .08s ease, box-shadow .12s ease;
}
.btn.secondary{
  background:#fff;
  color:var(--primary-blue);
  border:1px solid #e6e6e6;
  box-shadow:none;
}
.btn:active{ transform:translateY(1px); }

/* Aide */
.helper{
  margin-top:12px;
  font-size:13px;
  color:#7a7a7a;
}

/* Responsive adjustments */
@media (max-width:640px){
  .container{ margin:20px auto; padding:16px; border-top-width:5px; }
  .header .title{ font-size:0.98rem; white-space: normal; }
  .header .logo-below, .header .logo { width: 32px; height: 32px; }
  input[type="password"]{ padding:12px; font-size:15px; }
  #feedback{ font-size:13px; }
  .actions{ gap:8px; }
}

/* Liens et code */
a{ color:var(--primary-blue); text-decoration:none; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace; }
