/* =========================================
   MERIDIA BANQUE & CRÉDIT — main.css
   Variables · Reset · Typographie · Layout
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Jost:wght@300;400;500&display=swap');

/* --- Variables --- */
:root {
  --navy:        #0C2340;
  --navy-mid:    #1a3a5c;
  --navy-light:  #2a5280;
  --gold:        #B8963E;
  --gold-light:  #D4AF6A;
  --cream:       #F7F5F0;
  --cream-dark:  #EDE9E0;
  --white:       #ffffff;
  --gray-100:    #F4F4F2;
  --gray-200:    #E8E7E3;
  --gray-400:    #BEBCB5;
  --gray-600:    #8A8880;
  --gray-800:    #444441;
  --text-main:   #1C1C1A;
  --text-muted:  #6B6965;
  --text-light:  #9B9995;
  --border:      rgba(0,0,0,0.10);
  --border-md:   rgba(0,0,0,0.18);
  --success-bg:  #EAF3DE;
  --success-txt: #27500A;
  --success-bdr: #3B6D11;
  --warn-bg:     #FAEEDA;
  --warn-txt:    #633806;
  --warn-bdr:    #BA7517;
  --info-bg:     #E6F1FB;
  --info-txt:    #0C447C;
  --info-bdr:    #185FA5;
  --danger-bg:   #FCEBEB;
  --danger-txt:  #791F1F;
  --danger-bdr:  #A32D2D;
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --shadow-card: 0 1px 4px rgba(0,0,0,0.06);
  --transition:  all 0.15s ease;
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Jost', system-ui, sans-serif;
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--gray-100);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-sans); }
input, select, textarea { font-family: var(--font-sans); }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 42px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

.serif { font-family: var(--font-serif); }
.muted { color: var(--text-muted); }
.gold  { color: var(--gold); }

/* --- Layout --- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

/* --- Cards --- */
.card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.card-navy {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  color: var(--white);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
}
.badge-ok      { background: var(--success-bg); color: var(--success-txt); }
.badge-warn    { background: var(--warn-bg);    color: var(--warn-txt); }
.badge-info    { background: var(--info-bg);    color: var(--info-txt); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-txt); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: none;
  transition: var(--transition);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.btn-primary   { background: var(--navy);  color: var(--white); }
.btn-primary:hover { background: var(--navy-mid); }
.btn-gold      { background: var(--gold);  color: var(--white); }
.btn-gold:hover { background: #9a7d33; }
.btn-outline   { background: transparent; color: var(--text-main); border: 0.5px solid var(--border-md); }
.btn-outline:hover { background: var(--gray-100); }
.btn-ghost-light { background: transparent; color: rgba(255,255,255,0.75); border: 0.5px solid rgba(255,255,255,0.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn-sm { padding: 5px 14px; font-size: 11px; }
.btn-full { width: 100%; }

/* --- Form elements --- */
.fg { margin-bottom: 1rem; }
.fg label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 9px 12px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--white);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s;
}
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12,35,64,0.08);
}
.fg textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* --- Step bar --- */
.step-bar {
  display: flex;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.step-bar .si {
  flex: 1;
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  background: var(--gray-100);
  color: var(--text-muted);
  border-right: 0.5px solid var(--border);
  transition: var(--transition);
}
.step-bar .si:last-child { border-right: none; }
.step-bar .si.act  { background: var(--navy);  color: var(--white); font-weight: 500; }
.step-bar .si.done { background: var(--cream); color: var(--navy);  font-weight: 500; }

/* --- Tab form panels --- */
.tf { display: none; }
.tf.act { display: block; }

/* --- Progress bar --- */
.prog-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* --- Divider --- */
.divider { border: none; border-top: 0.5px solid var(--border); }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* --- Pages visibility --- */
.pg { display: none; }
.pg.act { display: block; }

/* --- Panels in dashboard --- */
.dpanel { display: none; }
.dpanel.act { display: block; }

/* --- Tab forms in apply page --- */
.tab-content { display: none; }
.tab-content.act { display: block; }

/* --- Section headers --- */
.sec-h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.sec-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --- Responsive helpers --- */
@media (max-width: 768px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .fg-row { grid-template-columns: 1fr; }
  .container, .wrap { padding: 0 1rem; }
}
