/* Pratysio — CSS global app */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --vert:       #1F5C33;
  --vert-l:     #EAF3EE;
  --vert-m:     #A5CDB5;
  --ardoise:    #1F2D24;
  --texte:      #1C1C1C;
  --texte-s:    #6B7280;
  --lin:        #F5F1E8;
  --lin-d:      #E6E1D5;
  --blanc:      #FFFFFF;
  --rouge:      #8B2020;
  --rouge-l:    #FFF0F0;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;
  --ardoise-d:  #16211B;
  --ardoise-m:  #2E3A35;
  --sauge:      #6A9E86;
  --sauge-l:    #EAF3EE;
  --shadow:     0 2px 12px rgba(0,0,0,.07);
  --shadow-lg:  0 6px 28px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--texte);
  background: #F7F5F0;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--vert); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 20px; height: 42px;
  border-radius: var(--radius-sm); border: none;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-primary { background: var(--vert); color: #fff; }
.btn-primary:hover { background: #174a28; box-shadow: 0 3px 10px rgba(31,92,51,.3); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--lin); color: var(--texte); border: 1px solid var(--lin-d); }
.btn-secondary:hover { background: var(--lin-d); text-decoration: none; }
.btn-danger { background: #fff; color: var(--rouge); border: 1px solid #E5B5B5; }
.btn-danger:hover { background: var(--rouge-l); text-decoration: none; }
.btn-lg { height: 50px; font-size: 16px; padding: 0 28px; }
.btn-sm { height: 34px; font-size: 13px; padding: 0 14px; }

/* Carte */
.card {
  background: var(--blanc);
  border-radius: var(--radius);
  border: 1px solid var(--lin-d);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 16px; font-weight: 700; color: var(--ardoise);
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--lin-d);
}

/* Formulaire */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--texte-s); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--lin-d); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14.5px; color: var(--texte);
  background: #fff; transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--vert); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* Alertes */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--vert-l); color: #1a4827; border: 1px solid var(--vert-m); }
.alert-error { background: var(--rouge-l); color: var(--rouge); border: 1px solid #E5B5B5; }
.alert-info { background: #EFF6FF; color: #1e40af; border: 1px solid #BFDBFE; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-premium { background: #FEF3C7; color: #92400E; }
.badge-gratuit { background: var(--lin); color: var(--texte-s); }
.badge-green { background: var(--vert-l); color: var(--vert); }

/* ======================== APP SHELL ======================== */
.app-wrap { display: flex; min-height: 100vh; }

/* Sidebar */
.app-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--ardoise);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 22px 20px 16px;
  font-size: 20px; font-weight: 800; color: #fff;
  letter-spacing: -.02em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo span { color: #6EE7A0; }
.sidebar-nav { padding: 12px 10px; }
.sidebar-section { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.35); letter-spacing: .08em; text-transform: uppercase; padding: 14px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.72);
  margin-bottom: 2px; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.1); color: #fff; text-decoration: none;
}
.nav-link.active { background: rgba(110,231,160,.15); color: #6EE7A0; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.sidebar-footer { padding:12px 16px; border-top:1px solid rgba(255,255,255,.08); margin-top:auto; }
.sf-user { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.sf-avatar { width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,#6EE7A0,#1F5C33); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; flex-shrink:0; letter-spacing:.03em; }
.sf-info { min-width:0; }
.sf-name { font-size:12.5px; font-weight:600; color:rgba(255,255,255,.8); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sf-prof { font-size:11px; color:rgba(255,255,255,.4); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sf-logout { display:flex; align-items:center; gap:7px; font-size:12px; color:rgba(255,255,255,.45); text-decoration:none; padding:6px 0; }
.sf-logout:hover { color:#fff; }
.sf-code-mini { display:none; }

/* Sous-menu contextuel — affiché sous la nav, avant le footer */
.sidebar-subpanel {
  margin: 4px 10px 8px;
  background: #16211B;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  overflow: hidden;
  padding: 10px 11px;
}

/* Contenu principal */
.app-main { flex: 1; min-width: 0; padding: 32px 36px; max-width: 1100px; }
.app-main-full { flex: 1; min-width: 0; padding: 0; }

.page-title { font-size: 22px; font-weight: 800; color: var(--ardoise); margin-bottom: 24px; }
.page-subtitle { font-size: 14px; color: var(--texte-s); margin-top: -18px; margin-bottom: 24px; }

/* ======================== AUTH PAGES ======================== */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--lin); padding: 20px;
}
.auth-box {
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px; width: 100%; max-width: 420px;
}
.auth-logo {
  font-size: 26px; font-weight: 800; color: var(--ardoise);
  margin-bottom: 28px; text-align: center; letter-spacing: -.02em;
}
.auth-logo span { color: var(--vert); }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.auth-subtitle { font-size: 14px; color: var(--texte-s); margin-bottom: 24px; text-align: center; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--texte-s); }
.auth-divider { text-align: center; color: var(--texte-s); font-size: 13px; margin: 16px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--lin-d); }
.auth-divider span { background: #fff; padding: 0 10px; position: relative; }

/* ======================== LANDING ======================== */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px; background: #fff;
  border-bottom: 1px solid var(--lin-d);
  position: sticky; top: 0; z-index: 100;
}
.landing-logo { font-size: 22px; font-weight: 800; color: var(--ardoise); letter-spacing: -.02em; }
.landing-logo span { color: var(--vert); }
.landing-hero {
  background: var(--ardoise); color: #fff;
  padding: 80px 48px; text-align: center;
}
.landing-hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; margin-bottom: 20px; }
.landing-hero h1 span { color: #6EE7A0; }
.landing-hero p { font-size: 19px; color: rgba(255,255,255,.72); max-width: 560px; margin: 0 auto 36px; }
.landing-features { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding: 64px 48px; max-width: 1100px; margin: 0 auto; }
.feature-card { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--lin-d); }
.feature-icon { width: 44px; height: 44px; background: var(--vert-l); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--vert); }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--texte-s); line-height: 1.6; }
.landing-cta { text-align: center; padding: 64px 48px; background: var(--lin); }
.landing-cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.landing-cta p { font-size: 16px; color: var(--texte-s); margin-bottom: 28px; }
