/* ============================================================
   MYCOM — Styles partagés (toutes les pages)
   ============================================================ */

   :root {
    --bg: var(--tg-theme-bg-color, #ffffff);
    --bg-secondary: var(--tg-theme-secondary-bg-color, #f4f4f5);
    --bg-tertiary: #ececee;
    --text: var(--tg-theme-text-color, #0f0f10);
    --text-secondary: var(--tg-theme-hint-color, #707579);
    --text-hint: var(--tg-theme-hint-color, #707579);
    --link: var(--tg-theme-link-color, #3390ec);
    --accent: #3390ec;
    --accent-text: #ffffff;
    --danger: var(--tg-theme-destructive-text-color, #e53935);
    --success: #25d366;
    --warning: #f59e0b;
    --border: var(--tg-theme-section-separator-color, #e5e5ea);
  
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
  
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .18);
  
    --header-h: 64px;
    --nav-h: 72px;
  
    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
  }
  
  * { box-sizing: border-box; margin: 0; padding: 0; }
  
  html, body {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
  }
  
  body {
    padding-top: var(--header-h);
    padding-bottom: var(--nav-h);
  }
  
  img, video { display: block; max-width: 100%; }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  input, textarea { font: inherit; }
  a { color: inherit; text-decoration: none; }
  
  /* ============================================================
     HEADER (commun)
     ============================================================ */
  .header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
  }
  .header-brand { cursor: pointer; }
  .header-brand h1 {
    font-size: 16px; font-weight: 800; letter-spacing: .5px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .header-brand p { font-size: 11px; color: var(--text-hint); letter-spacing: 2px; margin-top: 2px; }
  .header-cart {
    position: relative;
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: transform .15s var(--ease);
  }
  .header-cart:active { transform: scale(.92); }
  .header-cart svg { width: 20px; height: 20px; }
  .cart-badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: grid; place-items: center;
    font-size: 10px; font-weight: 700;
    color: #fff; background: var(--danger);
    border-radius: 99px;
    transform: scale(0);
    transition: transform .25s var(--ease-out);
  }
  .cart-badge.visible { transform: scale(1); }
  
  /* ============================================================
     BOTTOM NAV (commun)
     ============================================================ */
  .nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-around;
    padding: 0 8px calc(env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 100;
  }
  .nav-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px;
    font-size: 10px; font-weight: 500;
    color: var(--text-hint);
    transition: color .15s var(--ease);
  }
  .nav-item.active { color: var(--accent); }
  .nav-item svg { width: 22px; height: 22px; }
  .nav-item.support { flex: 0 0 auto; margin: 0 4px; }
  .nav-item.support .nav-icon-wrap {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--success); color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(37, 211, 102, .4);
    transition: transform .15s var(--ease);
  }
  .nav-item.support:active .nav-icon-wrap { transform: scale(.9); }
  
  /* ============================================================
     CONTENU GÉNÉRIQUE (pages info-like)
     ============================================================ */
  .page-content {
    padding: 20px 16px 24px;
    max-width: 720px;
    margin: 0 auto;
    animation: fadeUp .35s var(--ease) backwards;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .page-header {
    margin-bottom: 20px;
  }
  .page-header h1 {
    font-size: 22px; font-weight: 800; margin-bottom: 6px;
  }
  .page-header p {
    font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  }
  
  /* ============================================================
     CARTES / INFO CARDS
     ============================================================ */
  .card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
  }
  .card-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700;
    margin-bottom: 12px;
  }
  .card-title-icon {
    font-size: 18px;
  }
  .card-section {
    padding: 12px 0;
    border-top: 1px solid var(--border);
  }
  .card-section:first-of-type { border-top: none; padding-top: 0; }
  .card-section:last-child { padding-bottom: 0; }
  .card-section h4 {
    font-size: 13px; font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
  }
  
  .info-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
  }
  .info-row:last-child { border-bottom: none; }
  .info-row .label { color: var(--text-secondary); }
  .info-row .value { font-weight: 700; }
  .info-row .value.highlight { color: var(--accent); }
  .info-row .value.success { color: var(--success); }
  .info-row a.value { text-decoration: none; }
  .info-row a.value:hover { text-decoration: underline; }
  
  .info-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
  }
  
  /* ============================================================
     CONTACT BUTTONS (page /contact)
     ============================================================ */
  .contact-link {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: transform .15s var(--ease), background .15s var(--ease);
    cursor: pointer;
  }
  .contact-link:active { transform: scale(.98); }
  .contact-link:hover { background: var(--bg-tertiary); }
  .contact-link-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--bg);
    border-radius: 12px;
  }
  .contact-link-content { flex: 1; min-width: 0; }
  .contact-link-title {
    font-size: 14px; font-weight: 700; margin-bottom: 4px;
  }
  .contact-link-desc {
    font-size: 12px; color: var(--text-secondary); line-height: 1.4;
  }
  
  /* ============================================================
     PROFILE
     ============================================================ */
  .profile-avatar {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    display: grid; place-items: center;
    font-size: 36px; font-weight: 800;
    color: #fff;
    text-transform: uppercase;
  }
  .profile-name {
    font-size: 20px; font-weight: 800;
    text-align: center; margin-bottom: 4px;
  }
  .profile-handle {
    font-size: 14px; color: var(--text-secondary);
    text-align: center;
  }
  
  .order-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
  }
  .order-item-info { flex: 1; min-width: 0; }
  .order-item-id {
    font-size: 11px; color: var(--text-hint);
    font-family: ui-monospace, monospace;
  }
  .order-item-date {
    font-size: 12px; color: var(--text-secondary);
    margin-top: 2px;
  }
  .order-item-total {
    font-size: 15px; font-weight: 800;
    color: var(--accent);
  }
  
  .badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px; font-weight: 700;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: .3px;
  }
  .badge-new      { background: color-mix(in srgb, var(--accent) 15%, transparent);  color: var(--accent); }
  .badge-progress { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
  .badge-done     { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
  .badge-cancel   { background: color-mix(in srgb, var(--danger) 15%, transparent);  color: var(--danger); }
  
  /* ============================================================
     LOADER (transition)
     ============================================================ */
  .loader {
    position: fixed; inset: 0;
    display: grid; place-items: center;
    background: var(--bg);
    z-index: 999;
    transition: opacity .3s var(--ease);
  }
  .loader.hide { opacity: 0; pointer-events: none; }
  .loader-brand {
    font-size: 20px; font-weight: 800; letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 1.4s var(--ease) infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(.96); }
  }
  
  /* ============================================================
     UTILITAIRES
     ============================================================ */
  .text-center { text-align: center; }
  .text-hint { color: var(--text-hint); }
  .text-accent { color: var(--accent); }
  .mb-0 { margin-bottom: 0; }
  .mb-16 { margin-bottom: 16px; }
  .mt-16 { margin-top: 16px; }
  .hidden { display: none !important; }
  
  .footer-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-hint);
    line-height: 1.6;
    padding: 20px 16px;
    margin-top: 20px;
  }