/* ================================================
   FICHIER : apps/shared/style.css
   Styles communs aux deux applications Atelier VAE
   Importé par : apps/gestion/index.html
                 apps/configurateur/index.html
   ================================================ */

/* ── Variables de design ─────────────────────── */
:root {
  --navy:   #0f2744;
  --blue:   #1a4a8a;
  --sky:    #3b82c4;
  --light:  #e8f0fb;
  --accent: #e85d26;
  --gold:   #c9a84c;
  --white:  #ffffff;
  --grey:   #f4f6fa;
  --border: #d0dae8;
  --text:   #1a2635;
  --muted:  #6b7c93;
  --success:#2e7d55;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(15,39,68,0.10);
}

/* ── Reset ───────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); }

/* ── Boutons ─────────────────────────────────── */
.btn {
  padding: 8px 16px; border-radius: 7px; border: none; cursor: pointer;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--navy); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #c44d1e; }
.btn-ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--light); }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 5px 10px; font-size: .78rem; }
.btn-icon { padding: 6px 10px; }

/* ── Formulaires ─────────────────────────────── */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-group  { display: flex; flex-direction: column; gap: 4px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
input, select, textarea {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: .9rem; color: var(--text);
  background: var(--white); transition: border .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); }
textarea { resize: vertical; min-height: 60px; }

/* ── Cards ───────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  margin-bottom: 20px; border: 1px solid var(--border);
}
.card-title {
  font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--navy);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--light);
  display: flex; align-items: center; gap: 8px;
}

/* ── Onglets ─────────────────────────────────── */
.tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--white); padding: 4px; border-radius: 8px;
  border: 1px solid var(--border); width: fit-content;
}
.tab {
  padding: 7px 18px; border-radius: 6px; border: none;
  background: transparent; cursor: pointer; font-family: inherit;
  font-size: .85rem; font-weight: 500; color: var(--muted); transition: all .15s;
}
.tab.active { background: var(--navy); color: white; font-weight: 600; }

/* ── Badges statut devis ─────────────────────── */
.devis-item-badge { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: .7rem; font-weight: 600; margin-top: 4px; }
.badge-brouillon  { background: #f2f2f2; color: #555; }
.badge-a_valider  { background: #fff3cd; color: #856404; }
.badge-envoye     { background: #d1ecf1; color: #0c5460; }
.badge-accepte    { background: #d4edda; color: #155724; }
.badge-refuse     { background: #f8d7da; color: #721c24; }
.badge-client     { background: #e8f0fb; color: #1a4a8a; font-style: italic; }

/* ── Carte devis (partagée gestion + configurateur) */
.devis-card { background: white; border: 2px solid var(--navy); border-radius: var(--radius); overflow: hidden; max-width: 460px; }
.devis-card-header { background: var(--navy); padding: 14px 16px; }
.devis-card-title  { font-family: 'DM Serif Display', serif; color: white; font-size: 1.1rem; }
.devis-card-sub    { color: rgba(255,255,255,.6); font-size: .78rem; margin-top: 2px; }
.devis-card-body   { padding: 14px 16px; }
.devis-line { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .87rem; gap: 8px; }
.devis-line:last-child  { border-bottom: none; }
.devis-line-label  { flex: 1; }
.devis-line-sub    { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.devis-line-price  { font-weight: 700; color: var(--blue); white-space: nowrap; }
.devis-total       { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--navy); }
.devis-total-label { color: rgba(255,255,255,.7); font-size: .9rem; }
.devis-total-price { font-family: 'DM Serif Display', serif; color: var(--gold); font-size: 1.3rem; }
.devis-note        { padding: 10px 16px; background: var(--grey); font-size: .75rem; color: var(--muted); font-style: italic; }
.devis-actions     { padding: 12px 16px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Barre de total ──────────────────────────── */
.total-section { background: var(--navy); color: white; border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: .95rem; }
.total-row.main { font-family: 'DM Serif Display', serif; font-size: 1.4rem; border-top: 1px solid rgba(255,255,255,.2); margin-top: 8px; padding-top: 12px; }
.total-row .label  { color: rgba(255,255,255,.75); }
.total-row .amount { font-weight: 700; color: var(--gold); }

/* ── Synthèse client ─────────────────────────── */
.synthese { background: white; border-radius: var(--radius); border: 2px solid var(--navy); padding: 32px; max-width: 680px; }
.synthese-title    { font-family: 'DM Serif Display', serif; font-size: 1.8rem; color: var(--navy); }
.synthese-ref      { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.synthese-parties  { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.party-block       { padding: 14px; background: var(--grey); border-radius: 8px; }
.party-label       { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.party-name        { font-weight: 700; font-size: 1rem; color: var(--navy); }
.synthese-table    { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .9rem; }
.synthese-table th { background: var(--navy); color: white; padding: 8px 12px; text-align: left; font-size: .78rem; text-transform: uppercase; }
.synthese-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.synthese-table tr.forfait-row { background: var(--light); }
.synthese-total    { text-align: right; padding: 12px 0; }
.synthese-total .big { font-family: 'DM Serif Display', serif; font-size: 1.5rem; color: var(--navy); }
.legal-note { font-size: .75rem; color: var(--muted); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-style: italic; }

/* ── Barre export PDF ────────────────────────── */
.export-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px; background: var(--grey); border-radius: var(--radius); border: 1px solid var(--border); margin-top: 8px; }
.export-bar .label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; width: 100%; margin-bottom: 4px; }

/* ── État vide ───────────────────────────────── */
.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── Notification toast ──────────────────────── */
.notification {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--success); color: white;
  padding: 12px 20px; border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: slideIn .3s ease; z-index: 1000;
}
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Barre de progression ────────────────────── */
.progress-bar  { height: 3px; background: var(--border); flex-shrink: 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--sky), var(--gold)); transition: width .5s ease; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .synthese-parties { grid-template-columns: 1fr; }
}
