/* connexion.css */

<style>
    @import url('https://fonts.googleapis.com/css2?family=Bitter:wght@700;800;900&family=Nunito:wght@400;500;600;700;800&display=swap');

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }

    :root {
      --cream:        #FDF8F3;
      --green-dark:   #0D3B11;
      --green-mint:   #73C698;
      --salmon:       #EA966C;
      --salmon-dark:  #d6824f;
      --green-light:  #EAF7EF;
      --cream-dark:   #F0E8DE;
      --text:         #1a2e1a;
      --text-muted:   #5a7060;
      --shadow:       0 4px 24px rgba(13,59,17,.08);
      --shadow-lg:    0 12px 48px rgba(13,59,17,.16);
    }

    body {
      font-family: 'Nunito', sans-serif;
      color: var(--text);
      background: var(--cream);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
    h1, h2 { font-family: 'Bitter', serif; font-weight: 800; }
    a { color: var(--green-dark); text-decoration: none; }

    /* ── Nav ── */
    nav {
      background: rgba(253,248,243,.97);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--cream-dark);
    }
    .nav-inner {
      max-width: 1100px; margin: 0 auto; padding: 0 28px;
      display: flex; align-items: center; justify-content: space-between; height: 64px;
    }
    .nav-logo { display: flex; align-items: center; gap: 10px; }
    .nav-logo svg { height: 32px; width: auto; }
    .nav-logo-text { font-family: 'Bitter', serif; font-weight: 800; font-size: 1.2rem; color: var(--green-dark); }
    .nav-link { font-size: .88rem; font-weight: 700; color: var(--text-muted); transition: color .15s; }
    .nav-link:hover { color: var(--green-dark); }

    /* ── Main ── */
    .main {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 52px 28px 80px;
    }

    .login-card {
      background: #fff;
      border-radius: 24px;
      padding: 44px 40px;
      box-shadow: var(--shadow-lg);
      width: 100%;
      max-width: 440px;
    }

    .login-card h1 {
      font-size: 1.9rem;
      line-height: 1.15;
      margin-bottom: 6px;
      color: var(--green-dark);
    }
    .login-sub {
      font-size: .92rem;
      color: var(--text-muted);
      margin-bottom: 28px;
    }

    /* Error */
    .auth-error {
      display: none;
      background: #fff0ef;
      border: 1px solid #f5c6c6;
      border-radius: 10px;
      padding: 10px 14px;
      font-size: .88rem;
      color: #c0392b;
      font-weight: 600;
      margin-bottom: 16px;
    }

    /* Form */
    .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
    label { font-size: .83rem; font-weight: 700; color: var(--text-muted); }
    .input-wrap { position: relative; }
    input[type="email"], input[type="password"], input[type="text"] {
      width: 100%; padding: 12px 14px;
      border: 1.5px solid var(--cream-dark);
      border-radius: 10px;
      font-family: 'Nunito', sans-serif;
      font-size: .95rem; color: var(--text);
      background: var(--cream);
      outline: none;
      transition: border-color .15s, box-shadow .15s;
    }
    input:focus { border-color: var(--green-mint); box-shadow: 0 0 0 3px rgba(115,198,152,.15); }
    input.error { border-color: #e74c3c; }
    .pw-toggle {
      position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
      background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-muted);
      display: flex; align-items: center;
    }
    .pw-toggle:hover { color: var(--green-dark); }

    .label-row { display: flex; justify-content: space-between; align-items: center; }
    .forgot-link { font-size: .8rem; font-weight: 700; color: var(--text-muted); transition: color .15s; }
    .forgot-link:hover { color: var(--green-dark); }

    .divider {
      display: flex; align-items: center; gap: 12px;
      margin: 22px 0; color: var(--text-muted); font-size: .82rem; font-weight: 600;
    }
    .divider::before, .divider::after { content:''; flex:1; height:1px; background:var(--cream-dark); }

    .btn {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%; padding: 14px 24px;
      border-radius: 12px; border: none; cursor: pointer;
      font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700;
      transition: transform .15s, box-shadow .15s, background .15s; line-height: 1;
    }
    .btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
    .btn:disabled { opacity: .6; cursor: not-allowed; }
    .btn-green { background: var(--green-mint); color: var(--green-dark); }
    .btn-green:hover:not(:disabled) { background: #5db882; }
    .btn-google {
      background: #fff; color: var(--text);
      border: 1.5px solid var(--cream-dark);
    }
    .btn-google:hover:not(:disabled) { border-color: var(--green-mint); box-shadow: none; }

    .form-footer {
      margin-top: 20px; text-align: center;
      font-size: .83rem; color: var(--text-muted);
    }
    .form-footer a { color: var(--green-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

    /* ── Case à cocher "Rester connecté" ── */
    .remember-row {
      display: flex; align-items: center;
      margin: 4px 0 12px;
    }
    .remember-label {
      display: flex; align-items: center; gap: 8px;
      cursor: pointer;
      font-size: .84rem; font-weight: 600; color: var(--text-muted);
      user-select: none;
    }
    .remember-label input[type="checkbox"] {
      appearance: none; -webkit-appearance: none;
      width: 17px; height: 17px; flex-shrink: 0;
      border: 1.8px solid #c5bfb5; border-radius: 5px;
      background: #fff; cursor: pointer;
      transition: background .15s, border-color .15s;
      position: relative;
    }
    .remember-label input[type="checkbox"]:checked {
      background: var(--green-mint, #4aae6e);
      border-color: var(--green-mint, #4aae6e);
    }
    .remember-label input[type="checkbox"]:checked::after {
      content: '';
      position: absolute; top: 2px; left: 5px;
      width: 4px; height: 8px;
      border: 2px solid #fff; border-top: none; border-left: none;
      transform: rotate(45deg);
    }

    /* Reset panel */
    .reset-panel { display: none; }
    .reset-panel.active { display: block; }
    .panel { display: none; }
    .panel.active { display: block; }

    /* Success */
    .success-icon {
      width: 64px; height: 64px; border-radius: 50%;
      background: var(--green-light);
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 20px; color: var(--green-dark);
    }

    /* ── Responsive ─────────────────────────────────────────────── */
    @media (max-width: 768px) {
      .nav-inner { padding: 0 20px; }
      .nav-link { display: none; }
      .main { padding: 32px 20px 60px; }
    }

    @media (max-width: 520px) {
      .login-card { padding: 28px 18px; border-radius: 18px; box-shadow: 0 4px 24px rgba(13,59,17,.10); }
      .login-card h1 { font-size: 1.6rem; }
      .main { padding: 20px 14px 40px; align-items: flex-start; }
      input[type="email"], input[type="password"], input[type="text"] {
        padding: 14px 14px; font-size: 1rem; /* touch-friendly height */
        -webkit-appearance: none; border-radius: 10px;
      }
      .btn { padding: 15px 24px; font-size: 1rem; min-height: 50px; }
      .nav-logo-text { font-size: 1.05rem; }
      .nav-inner { height: 56px; }
    }

    @media (max-width: 380px) {
      .login-card { padding: 22px 14px; border-radius: 14px; }
      .login-card h1 { font-size: 1.4rem; }
    }

    /* Évite le zoom automatique iOS sur focus */
    @supports (-webkit-touch-callout: none) {
      input[type="email"], input[type="password"], input[type="text"] { font-size: 16px; }
    }
  
    /* ── Nav / Footer shared styles ── */
    .container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
    .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
    .btn-mon-espace { display: inline-flex; align-items: center; gap: 7px; background: var(--green-dark, #0D3B11); color: #fff; padding: 9px 18px; border-radius: 50px; font-family: 'Nunito', sans-serif; font-size: .85rem; font-weight: 700; cursor: pointer; border: none; transition: background .2s; text-decoration: none; white-space: nowrap; }
    .btn-mon-espace:hover { background: #1a5e20; }
    footer { background: #0D3B11; padding: 40px 0; }
    .footer-inner { display: flex; justify-content: space-between; align-items: center; }
    .footer-links { display: flex; gap: 28px; }
    .footer-links a { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.45); transition: color .15s; }
    .footer-links a:hover { color: #fff; }
    .footer-copy { font-size: .82rem; color: rgba(255,255,255,.3); }
    .nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
    .nav-links a { font-size: .9rem; font-weight: 600; color: #5a7060; transition: color .15s; }
    .nav-links a:hover { color: #0D3B11; }
    .btn-salmon { background: #EA966C; color: #fff; }
    .btn-salmon:hover { background: #d6824f; }
  </style>
