/* compte.css — Styles de la page Mon compte
   Extrait du backup compte.html inline CSS
*/

    @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; }
    /* ── Réinitialisation pour iframe — base.css impose height:100%;overflow:hidden
       sur html et body, ce qui bloque scroll + casse position:sticky.
       Fix : html = scroll container (window.scrollY + sticky OK),
              body = flux normal (pas de second scroll container). ── */
    html {
      height: auto !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
      scroll-behavior: smooth;
    }
    body {
      height: auto !important;
      overflow: visible !important;
    }

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

    body { font-family: 'Nunito', sans-serif; color: var(--text); background: var(--cream); line-height: 1.65; }
    h1, h2 { font-family: 'Bitter', serif; font-weight: 800; }
    h3 { font-family: 'Nunito', sans-serif; font-weight: 800; }
    a { color: inherit; text-decoration: none; }

    .container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

    .btn {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 12px 22px; border-radius: 10px;
      font-family: 'Nunito', sans-serif; font-size: .92rem; font-weight: 700;
      cursor: pointer; border: none;
      transition: transform .15s, box-shadow .15s, background .15s; line-height: 1;
    }
    .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
    .btn-salmon { background: var(--salmon); color: #fff; }
    .btn-salmon:hover { background: var(--salmon-dark); }
    .btn-green { background: var(--green-mint); color: var(--green-dark); }
    .btn-green:hover { background: #5db882; }
    .btn-outline { background: transparent; color: var(--green-dark); border: 2px solid var(--green-dark); }
    .btn-outline:hover { background: var(--green-light); box-shadow: none; }
    .btn-ghost-red { background: transparent; color: #c0392b; border: 1.5px solid #e0a0a0; font-size: .85rem; padding: 9px 18px; }
    .btn-ghost-red:hover { background: #fff0ef; box-shadow: none; }

    /* ── Nav ── */
    nav { position: sticky; top: 0; z-index: 100; background: rgba(253,248,243,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--cream-dark); }
    .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
    .nav-logo { display: flex; align-items: center; }
    .nav-logo svg { height: 36px; width: auto; }
    .nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
    .nav-links a { font-size: .9rem; font-weight: 600; color: var(--text-muted); transition: color .15s; }
    .nav-links a:hover { color: var(--green-dark); }

    /* ── Layout ── */
    .account-layout {
      display: grid;
      grid-template-columns: 260px 1fr;
      gap: 32px;
      padding: 52px 0 300px;
      align-items: start;
    }

    /* ── Sidebar ── */
    .sidebar {
      background: #fff;
      border-radius: 20px;
      padding: 12px;
      box-shadow: var(--shadow);
      position: sticky;
      top: 24px;
    }
    .sidebar-user {
      display: flex; align-items: center; gap: 12px;
      padding: 16px 12px 20px;
      border-bottom: 1px solid var(--cream-dark);
      margin-bottom: 8px;
    }
    .avatar {
      width: 44px; height: 44px;
      border-radius: 50%;
      background: var(--green-mint);
      color: var(--green-dark);
      display: flex; align-items: center; justify-content: center;
      font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
    }
    .sidebar-name { font-weight: 700; font-size: .95rem; color: var(--green-dark); }
    .sidebar-plan {
      display: inline-flex; align-items: center; gap: 4px;
      background: var(--green-light); color: var(--green-dark);
      font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
    }
    .nav-item {
      display: flex; align-items: center; gap: 10px;
      padding: 11px 14px; border-radius: 10px;
      font-size: .92rem; font-weight: 600; color: var(--text-muted);
      cursor: pointer; transition: background .15s, color .15s; margin-bottom: 2px;
    }
    .nav-item:hover { background: var(--green-light); color: var(--green-dark); }
    .nav-item.active { background: transparent; color: var(--green-dark); font-weight: 700; position: relative; z-index: 1; }
    .nav-list { position: relative; --ind-top: 0px; --ind-h: 40px; }
    .nav-list::before { content: ''; position: absolute; top: var(--ind-top); left: 0; right: 0; height: var(--ind-h); border-radius: 10px; background: var(--green-light); pointer-events: none; z-index: 0; transition: top .35s cubic-bezier(.4,0,.2,1), height .25s cubic-bezier(.4,0,.2,1); }
    .nav-item.active { background: transparent; color: var(--green-dark); font-weight: 700; position: relative; z-index: 1; }
    .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
    .sidebar-divider { height: 1px; background: var(--cream-dark); margin: 10px 0; }
    .nav-item.danger { color: #c0392b; }
    .nav-item.danger:hover { background: #fff0ef; }

    /* ── Main content ── */
    .main-content { display: flex; flex-direction: column; gap: 24px; }

    .section-card {
      background: #fff;
      border-radius: 20px;
      padding: 32px 36px;
      box-shadow: var(--shadow);
    }
    .card-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 28px;
    }
    .card-title { font-family: 'Bitter', serif; font-size: 1.25rem; font-weight: 800; color: var(--green-dark); }
    .card-sub { font-size: .88rem; color: var(--text-muted); margin-top: 3px; }

    /* ── Langue ── */
    .lang-option-btn {
      display: flex; flex-direction: column; align-items: center; gap: 8px;
      padding: 20px 12px; border-radius: 14px; border: 2px solid var(--cream-dark);
      background: var(--cream); cursor: pointer; font-family: 'Nunito', sans-serif;
      font-size: .9rem; transition: border-color .15s, background .15s, box-shadow .15s;
    }
    .lang-option-btn:hover { background: var(--green-light); border-color: var(--green-mint); }
    .lang-option-btn.active {
      background: var(--green-light); border-color: var(--green-dark);
      box-shadow: 0 0 0 3px rgba(13,59,17,.08);
    }

    /* ── Form fields ── */
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .form-group { display: flex; flex-direction: column; gap: 6px; }
    .form-group.full { grid-column: 1 / -1; }
    label { font-size: .85rem; font-weight: 700; color: var(--text-muted); }
    input[type="text"], input[type="email"], input[type="password"], input[type="date"], select {
      width: 100%; padding: 11px 14px;
      border: 1.5px solid var(--cream-dark);
      border-radius: 10px;
      font-family: 'Nunito', sans-serif;
      font-size: .92rem; color: var(--text);
      background: var(--cream);
      transition: border-color .15s, box-shadow .15s;
      outline: none;
    }
    input:focus, select:focus { border-color: var(--green-mint); box-shadow: 0 0 0 3px rgba(115,198,152,.18); }
    .form-actions { display: flex; justify-content: flex-end; margin-top: 24px; gap: 12px; }

    /* ── Subscription card ── */
    .plan-banner {
      background: var(--green-dark);
      border-radius: 16px;
      padding: 24px 28px;
      color: #fff;
      display: flex; align-items: center; justify-content: space-between; gap: 20px;
      margin-bottom: 24px;
    }
    .plan-banner-label { font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; }
    .plan-banner-name { font-family: 'Bitter', serif; font-size: 1.6rem; font-weight: 900; }
    .plan-banner-price { font-size: .95rem; color: rgba(255,255,255,.65); margin-top: 2px; }
    .plan-banner-btns { display: flex; gap: 10px; flex-shrink: 0; }

    .btn-white { background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.3); }
    .btn-white:hover { background: rgba(255,255,255,.25); box-shadow: none; }

    .token-bar-wrap { margin-bottom: 20px; }
    .token-bar-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .88rem; }
    .token-bar-label { font-weight: 700; color: var(--text-muted); }
    .token-bar-value { font-weight: 800; color: var(--green-dark); }
    .token-bar { height: 8px; background: var(--cream-dark); border-radius: 99px; overflow: hidden; }
    .token-bar-fill { height: 100%; border-radius: 99px; background: var(--green-mint); transition: width .6s ease; }
    .token-bar-fill.warn { background: var(--salmon); }

    .sub-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--cream-dark); font-size: .92rem; }
    .sub-row:last-child { border-bottom: none; }
    .sub-row-label { color: var(--text-muted); font-weight: 600; }
    .sub-row-value { font-weight: 700; color: var(--text); }
    .badge-active { background: var(--green-light); color: var(--green-dark); font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
    .badge-trial { background: #FEF2EC; color: var(--salmon-dark); font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }

    /* ── Referral ── */
    .referral-box {
      background: var(--green-light);
      border-radius: 14px;
      padding: 24px 28px;
      display: flex; align-items: center; gap: 20px;
    }
    .referral-icon {
      width: 52px; height: 52px;
      background: var(--green-mint);
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      color: var(--green-dark); flex-shrink: 0;
    }
    .referral-icon svg { width: 24px; height: 24px; }
    .referral-title { font-weight: 800; color: var(--green-dark); font-size: 1rem; margin-bottom: 4px; }
    .referral-sub { font-size: .88rem; color: var(--text-muted); }
    .referral-link-box {
      display: flex; gap: 10px; margin-top: 14px;
    }
    .referral-link {
      flex: 1; padding: 10px 14px;
      background: #fff; border-radius: 10px;
      border: 1.5px solid var(--green-mid);
      font-size: .88rem; color: var(--text-muted);
      font-family: 'Nunito', sans-serif; font-weight: 600;
    }

    .referral-stats {
      display: flex; gap: 24px; margin-top: 18px;
    }
    .ref-stat { text-align: center; }
    .ref-stat-num { font-family: 'Bitter', serif; font-size: 1.6rem; font-weight: 900; color: var(--green-dark); }
    .ref-stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }

    /* ── Password ── */
    .pw-strength { display: flex; gap: 4px; margin-top: 6px; }
    .pw-dot { height: 4px; flex: 1; border-radius: 99px; background: var(--cream-dark); }
    .pw-dot.filled { background: var(--green-mint); }

    /* ── Danger zone ── */
    .danger-zone {
      border: 1.5px solid #f5c0b8;
      border-radius: 20px;
      padding: 28px 36px;
      background: #fff8f7;
    }
    .danger-title { font-family: 'Bitter', serif; font-size: 1.1rem; font-weight: 800; color: #c0392b; margin-bottom: 6px; }
    .danger-sub { font-size: .88rem; color: #a05050; margin-bottom: 20px; }

    /* ── Footer ── */
    footer { background: #0D3B11; padding: 40px 0; }
    footer .footer-inner { display: flex; justify-content: space-between; align-items: center; }
    footer .footer-links { display: flex; gap: 28px; }
    footer .footer-links a { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.45); transition: color .15s; text-decoration: none; }
    footer .footer-links a:hover { color: #fff; }
    footer .footer-copy { font-size: .82rem; color: rgba(255,255,255,.3); }
    .footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
    .footer-logo { height: 32px; width: auto; opacity: .7; }
    .footer-links { display: flex; gap: 28px; }
    .footer-links a { font-size: .85rem; font-weight: 600; color: var(--text-muted); transition: color .15s; }
    .footer-links a:hover { color: var(--green-dark); }
    .footer-copy { font-size: .82rem; color: var(--text-muted); }

    /* ── Extra status badges ── */
    .badge-cancelled { background: #fff0ef; color: #c0392b; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
    .badge-overdue   { background: #fff5e0; color: #9a4a23; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
    .badge-free      { background: var(--cream-dark); color: var(--text-muted); font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }

    /* ── Modals ── */
    .modal-overlay { position: fixed; inset: 0; background: rgba(13,59,17,.25); backdrop-filter: blur(4px); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
    .modal-box { background: #fff; border-radius: 20px; padding: 36px 40px; max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); }
    .modal-title { font-family: 'Bitter', serif; font-size: 1.2rem; color: var(--green-dark); margin-bottom: 6px; font-weight: 800; }
    .modal-sub { font-size: .9rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.55; }
    .modal-actions { display: flex; gap: 10px; margin-top: 24px; }

    /* ── Mes options ── */
    .option-item {
      display: flex; align-items: center; justify-content: space-between;
      gap: 14px; padding: 14px 0;
      border-bottom: 1px solid var(--cream-dark);
    }
    .option-item:last-child { border-bottom: none; }
    .option-icon { font-size: 1.4rem; flex-shrink: 0; }
    .option-name { font-weight: 700; font-size: .93rem; color: var(--green-dark); }
    .option-desc { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
    .option-price { font-family: 'Bitter', serif; font-weight: 800; font-size: 1rem; color: var(--green-dark); white-space: nowrap; }
    .option-empty { text-align: center; padding: 24px 0; }
    .option-empty svg { color: var(--cream-dark); margin-bottom: 10px; }
    .option-empty p { font-size: .9rem; color: var(--text-muted); margin-bottom: 14px; }

    /* ── Modale upgrade ── */
    .upgrade-modal-box { background: #fff; border-radius: 20px; padding: 36px 40px; max-width: 540px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; }
    #stripe-checkout-container { min-height: 300px; }
    #upgrade-step-2 { display: flex; flex-direction: column; flex: 1; }
    .upgrade-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--cream-dark); border-radius: 14px; overflow: hidden; margin: 20px 0; }
    .upgrade-col { padding: 18px 20px; }
    .upgrade-col.current { background: var(--cream); }
    .upgrade-col.next { background: var(--green-dark); color: #fff; }
    .upgrade-col-label { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 10px; opacity: .6; }
    .upgrade-col.next .upgrade-col-label { opacity: .55; }
    .upgrade-col-name { font-family: 'Bitter', serif; font-size: 1.1rem; font-weight: 800; margin-bottom: 12px; }
    .upgrade-col.next .upgrade-col-name { color: #fff; }
    .upgrade-feature { font-size: .83rem; color: var(--text-muted); margin-bottom: 6px; display: flex; align-items: flex-start; gap: 7px; }
    .upgrade-col.next .upgrade-feature { color: rgba(255,255,255,.75); }
    .upgrade-feature svg { flex-shrink: 0; margin-top: 1px; }
    .prorata-box { background: var(--green-light); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
    .prorata-label { font-size: .8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
    .prorata-amount { font-family: 'Bitter', serif; font-size: 1.6rem; font-weight: 900; color: var(--green-dark); }
    .prorata-detail { font-size: .8rem; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

    /* ── Notification toggles ── */
    .notif-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--cream-dark); }
    .notif-row:last-child { border-bottom: none; }
    .notif-label { font-weight: 700; font-size: .92rem; color: var(--text); }
    .notif-desc  { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
    .toggle-wrap { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
    .toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
    .toggle-slider { position: absolute; inset: 0; background: var(--cream-dark); border-radius: 99px; cursor: pointer; transition: background .2s; }
    .toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
    .toggle-wrap input:checked + .toggle-slider { background: var(--green-mint); }
    .toggle-wrap input:checked + .toggle-slider::before { transform: translateX(18px); }

    /* ── Reveal ── */
    .reveal { opacity: 0; transform: translateY(20px); transition: opacity .45s, transform .45s; }
    .reveal.visible { opacity: 1; transform: none; }

    /* ── Mobile (≤ 860px) ─────────────────────────────────────────── */
    @media (max-width: 860px) {
      /* Layout : une seule colonne, menu en haut */
      .container { padding: 0; }
      .account-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 0 80px;
      }

      /* Sidebar → barre de nav sticky collée en haut */
      .sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        border-radius: 0;
        background: rgba(253,248,243,.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 2px 10px rgba(13,59,17,.10);
        border-bottom: 1px solid var(--cream-dark);
        padding: 10px 16px 8px;
      }

      /* Infos utilisateur : masquées */
      .sidebar-user { display: none; }

      /* Nav items : flex-wrap horizontal, texte + icône */
      .nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        position: static;
      }
      .nav-list::before { display: none; }

      .nav-item {
        flex-direction: row;
        font-size: .78rem;
        gap: 5px;
        padding: 7px 11px;
        border-radius: 99px;
        margin-bottom: 0;
        background: var(--cream);
        border: 1.5px solid var(--cream-dark);
        min-height: 0;
        line-height: 1;
        white-space: nowrap;
      }
      .nav-item:hover { background: var(--green-light); border-color: var(--green-mint); }
      .nav-item.active {
        background: var(--green-dark);
        color: #fff;
        border-color: var(--green-dark);
        font-weight: 700;
      }
      .nav-item svg { width: 14px; height: 14px; }

      /* Séparateur et déconnexion : masqués */
      .sidebar-divider { display: none; }
      .nav-item.danger { display: none; }

      /* Bouton retour app : affiché en bas du menu */
      #btn-back-app-mobile {
        display: flex !important;
        width: 100%;
        margin-top: 6px;
        font-size: .8rem;
        padding: 9px 16px;
        border-radius: 10px;
        min-height: 0;
      }

      /* Contenu principal : padding standard */
      .main-content {
        padding: 20px 16px;
        gap: 16px;
      }

      /* Cartes */
      .section-card { padding: 20px 18px; border-radius: 14px; }
      .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }

      /* Formulaires */
      .form-grid { grid-template-columns: 1fr; }
      .form-group.full { grid-column: 1; }
      .form-actions { flex-direction: column-reverse; gap: 8px; }
      .form-actions .btn { width: 100%; justify-content: center; min-height: 48px; }

      /* Plan */
      .plan-banner { flex-direction: column; align-items: flex-start; }
      .plan-banner-btns { width: 100%; }
      .plan-banner-btns .btn { flex: 1; justify-content: center; }

      /* Parrainage */
      .referral-link-wrap { flex-direction: column; }
      .referral-link-wrap input { width: 100%; }

      /* Abonnement */
      .upgrade-grid { grid-template-columns: 1fr !important; }
      .upgrade-col.current { display: none; }

      /* Touch targets */
      button, a { min-height: 44px; }
    }

    /* ── XS (≤ 380px) ────────────────────────────────────────────── */
    @media (max-width: 380px) {
      .sidebar { padding: 8px 12px 6px; }
      .nav-item { font-size: .72rem; padding: 6px 9px; gap: 4px; }
      .nav-item svg { width: 13px; height: 13px; }
      .main-content { padding: 14px 12px; }
    }

    /* iOS — évite le zoom sur les inputs */
    @supports (-webkit-touch-callout: none) {
      input, select, textarea { font-size: 16px !important; }
    }
