:root{
  --ink:#10202e;
  --ink-soft:#46596c;
  --green:#10966f;
  --green-dark:#007d5b;
  --blue:#1857a6;
  --bg:#f2f5f7;
  --white:#ffffff;
  --line:#d8e1e8;
  --danger:#fff3cd;
  --success:#e8f5f1;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:'Inter',Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--ink);
}
a{color:var(--green-dark)}

.auth-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:34px 20px;
  background:
    radial-gradient(circle at 50% 15%,rgba(255,255,255,.95) 0,rgba(255,255,255,.65) 24%,rgba(242,245,247,1) 72%);
}

.auth-wrap{
  width:100%;
  max-width:980px;
}

.auth-wrap-login{
  max-width:440px;
}

.auth-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  padding:30px;
  box-shadow:0 18px 50px rgba(16,32,46,.07);
}

.auth-card-login{
  padding:48px 34px 32px;
  border-radius:20px;
}

.auth-logo{
  display:block;
  text-align:center;
}

.auth-logo-login{
  margin:0 auto 22px;
}

.auth-logo-login img{
  display:block;
  width:auto;
  max-width:180px;
  height:auto;
  margin:0 auto;
}

.auth-card-login h1{
  margin:0 0 8px;
  text-align:center;
  font-family:'Bricolage Grotesque','Inter',Arial,sans-serif;
  font-size:2rem;
  font-weight:800;
  line-height:1.1;
  letter-spacing:-.02em;
  color:#10202e;
}

.auth-intro{
  max-width:330px;
  margin:0 auto 26px;
  text-align:center;
  color:var(--ink-soft);
  font-size:1rem;
  line-height:1.25;
}

.field{
  margin-top:17px;
}

.field label{
  display:block;
  margin-bottom:7px;
  color:#0f1720;
  font-size:.93rem;
  font-weight:700;
}

.field input,
.field select{
  width:100%;
  min-height:47px;
  padding:12px 14px;
  border:1px solid #d5dfe7;
  border-radius:10px;
  background:#fff;
  color:var(--ink);
  font-size:16px;
  transition:border-color .15s,box-shadow .15s;
}

.field input:focus,
.field select:focus{
  border-color:var(--green);
  outline:0;
  box-shadow:0 0 0 3px rgba(20,148,111,.12);
}

.btn{
  display:inline-block;
  border:0;
  border-radius:10px;
  padding:13px 20px;
  background:var(--green);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  cursor:pointer;
}

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

.auth-submit{
  display:block;
  width:100%;
  min-height:47px;
  margin-top:24px;
  font-size:1rem;
}

.auth-links{
  margin-top:22px;
  text-align:center;
  font-family:'Inter',Arial,Helvetica,sans-serif;
  font-size:.9rem;
  font-weight:500;
  line-height:1.45;
}

.auth-links-login{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.auth-links a,
.auth-links a:visited{
  color:#008f68;
  font-family:'Inter',Arial,Helvetica,sans-serif;
  font-size:inherit;
  font-weight:500;
  text-decoration:none;
  transition:color .15s ease;
}

.auth-links a:hover,
.auth-links a:focus{
  color:#006f51;
  text-decoration:underline;
}

.auth-links span{
  color:#9aa8b4;
  font-family:'Inter',Arial,Helvetica,sans-serif;
  font-weight:400;
}

.msg{
  margin:16px 0;
  padding:13px 14px;
  border-radius:10px;
  background:var(--success);
}

.msg.error{
  background:var(--danger);
}

.account-layout{
  max-width:1180px;
  margin:0 auto;
  padding:28px 24px;
  display:grid;
  grid-template-columns:250px 1fr;
  gap:24px;
}

.account-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
  height:max-content;
  padding:14px;
  position:sticky;
  top:20px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:16px;
}

.account-nav a{
  padding:11px 12px;
  border-radius:9px;
  color:var(--ink-soft);
  text-decoration:none;
}

.account-nav a:hover,
.account-nav a.active{
  background:#eef5f2;
  color:var(--green-dark);
  font-weight:700;
}

.panel{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  padding:30px;
  box-shadow:0 18px 50px rgba(16,32,46,.06);
}

.page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.empty{
  padding:40px;
  text-align:center;
  color:var(--ink-soft);
  border:1px dashed var(--line);
  border-radius:14px;
  background:#fbfcfd;
}

.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.small{
  font-size:14px;
  color:var(--ink-soft);
}

@media(max-width:820px){
  .auth-card-login{
    padding:38px 24px 28px;
  }

  .auth-card-login h1{
    font-size:1.8rem;
  }

  .account-layout,
  .grid-2{
    grid-template-columns:1fr;
  }

  .account-nav{
    position:static;
  }
}

/* =========================================================
   CIBLEIO — PAGES D’AUTHENTIFICATION
   ========================================================= */

/* Logo commun : connexion, mot de passe oublié et inscription */
.auth-login-page .auth-logo-login img{
    display:block;
    width:auto;
    max-width:180px;
    height:auto;
    max-height:82px;
    margin:0 auto;
    object-fit:contain;
}

/* Carte standard de connexion et mot de passe oublié */
.auth-login-page .auth-card-login{
    width:100%;
    max-width:440px;
    margin:0 auto;
}

.auth-login-page .auth-intro{
    max-width:340px;
}

/* Messages d’information */
.auth-login-page .msg{
    margin:0 0 20px;
    padding:13px 14px;
    border-radius:10px;
    background:#e8f5f1;
    color:#185b49;
    font-family:'Inter',Arial,sans-serif;
    font-size:.9rem;
    line-height:1.45;
}

/* Messages d’erreur */
.auth-login-page .msg.error{
    background:#fff3cd;
    color:#765b00;
}

.auth-login-page .auth-links-login{
    justify-content:center;
}

/* =========================================================
   PAGE INSCRIPTION
   ========================================================= */

.auth-wrap-register{
    width:100%;
    max-width:560px;
}

/*
 * Sélecteur plus spécifique pour surcharger les 440 px
 * de la carte de connexion.
 */
.auth-login-page .auth-card-register{
    width:100%;
    max-width:560px;
    margin:0 auto;
}

.auth-card-register h1{
    margin-bottom:8px;
}

.auth-card-register .auth-intro{
    max-width:390px;
}

.auth-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.auth-card-register .auth-helper{
    margin:16px 0 0;
    color:#526579;
    font-family:'Inter',Arial,sans-serif;
    font-size:.84rem;
    line-height:1.45;
    text-align:center;
}

/*
 * Les styles généraux .auth-login-page .msg suffisent.
 * Cette règle reste uniquement pour renforcer la présentation.
 */
.auth-card-register .msg{
    margin-bottom:20px;
}

@media(max-width:620px){
    .auth-wrap-register,
    .auth-login-page .auth-card-register{
        max-width:440px;
    }

    .auth-form-grid{
        grid-template-columns:1fr;
        gap:0;
    }

    .auth-login-page .auth-logo-login img{
        max-width:160px;
        max-height:74px;
    }
}