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

html {
    font-size: 16px;
}
body {
    font-family: 'Inter', sans-serif;
    background: rgb(214, 214, 214);    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    padding: 0;
}
.logo {
    width: 10rem;
    margin-bottom: 1.5rem;
}
.card {
    background: white;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    max-width: 28rem;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}
.success {
    border-left: 0.3125rem solid #4caf50;
    color: #2e7d32;
}
.error, .error-message {
    border-left: 0.3125rem solid #f44336;
    color: #c62828;
    background: #ffeaea;
    animation: shake 0.3s;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    text-align: left;
}

.info-message {
    color: #1976d2;
    background: #e6f0ff;
    border-left: 0.3125rem solid #1976d2;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    text-align: left;
}

h1 {
    margin-bottom: 1.5rem;
}
form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}
label {
    text-align: left;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
input[type="text"],
input[type="number"],
input[type="email"],
input[type="identifiant"],
input[type="password"],
select {
    padding: 0.6rem;
    border-radius: 0.375rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}
input[type="submit"], button {
    margin-top: 1rem;
    background-color: #1976d2;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    display: inline-block;
    text-decoration: none;
}
input[type="submit"]:hover, button:hover {
    background-color: #1E4F9D;
}
a {
    text-decoration: underline;
    font-weight: bold;
    margin-top: 1.5rem;
    display: inline-block;
    background-color: #1976d2;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease-in-out;
    text-align: center;
}
a:hover {
    background-color: #1E4F9D;
    color: white;
}

.vert{
     background-color: #4ab37d !important;
}

.retour{
    background-color: #ec4747 !important;
}

p {
    margin-top: 1.5rem;
}
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .card {
        width: 95%;
        padding: 1.5rem;
    }
    .logo {
        width: 7rem;
    }
}
@media (max-width: 900px) {
    html { font-size: 15px; }
    .card, form { max-width: 97vw; }
    .logo { width: 8rem; }
}

@media (max-width: 700px) {
    html { font-size: 14px; }
    .card, form { max-width: 99vw; padding: 1.2rem 0.7rem; }
    .logo { width: 6.5rem; }
    h1 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    html { font-size: 13px; }
    .card, form { max-width: 100vw; padding: 1rem 0.2rem; border-radius: 0.6rem; }
    .logo { width: 5.5rem; }
    input[type="submit"], button, a { font-size: 0.95rem; padding: 0.7rem 0.2rem; }
}
/* Responsive : sur téléphone, la card prend quasi tout l'écran */
@media (max-width: 700px) {
    .card {
      width: 99vw;
      height: 97vh;
      max-width: 100vw;
      max-height: 100vh;
      padding: 1rem 0.3rem;
      border-radius: 0.7rem;
    }
  }
  
  @media (max-width: 480px) {
    .card {
      width: 100vw;
      height: 99vh;
      max-width: 100vw;
      max-height: 100vh;
      padding: 0.7rem 0.1rem;
      border-radius: 0.5rem;
    }
  }