
/* =========================================================
   CALEODOM UI - CSS COMMUN
   Version V1
   ========================================================= */

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #000000;
  --muted: #5f6b7a;

  --blue: #007bff;
  --blue-dark: #0069d9;
  --blue-soft: #e9f1ff;
  --blue-border: #cfe2ff;

  --border: #e4e8ef;
  --shadow: 0 4px 12px rgba(0,0,0,0.10);

  --radius-card: 16px;
  --radius-item: 14px;
  --radius-input: 8px;

  --font: "Segoe UI", Arial, sans-serif;
}

/* ===== Base page ===== */

body {
  margin: 0;
  padding: 24px;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
}

.page {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.page-narrow {
  width: min(520px, 100%);
  margin: 0 auto;
}

h1 {
  font-size: 24px;
  text-align: center;
  margin: 8px 0 24px;
}

h2 {
  font-size: 18px;
  text-align: center;
  margin: 0 0 16px;
}

.subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: -10px;
  margin-bottom: 18px;
}

/* ===== Boites / cartes ===== */

.card,
.panel {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
  box-sizing: border-box;
}

.panel {
  border: 1px solid var(--border);
  box-shadow: none;
  margin-bottom: 16px;
}

.section {
  margin-bottom: 18px;
}

/* ===== Menu type accueil ===== */

.menu-card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  background: #fff;
  color: #000;
  text-decoration: none;
  transition: transform .08s, box-shadow .08s, border-color .08s;
}

.menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  border-color: var(--blue-border);
}

.menu-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.menu-title {
  font-size: 16px;
  font-weight: 700;
}

.menu-desc {
  font-size: 12.5px;
  color: var(--muted);
}

.menu-arrow {
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
}

/* ===== Formulaire simple / paramètres ===== */

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
}

.form-label {
  flex: 1;
  font-size: 15px;
}

.form-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

input,
select,
textarea {
  font-family: var(--font);
  font-size: 15px;
  border: 1px solid #ccd3dd;
  border-radius: var(--radius-input);
  padding: 7px 10px;
  box-sizing: border-box;
  background: #fff;
}

input[type="number"] {
  width: 120px;
  text-align: center;
}

select {
  min-width: 120px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.12);
}

/* ===== Boutons ===== */

.btn-primary,
button.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-input);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, opacity .15s;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-small,
button.btn-small {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-input);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* ===== Toggle ===== */

.toggle {
  width: 56px;
  height: 30px;
  background: #c9cbd0;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: left .2s;
}

.toggle.active {
  background: var(--blue);
}

.toggle.active::after {
  left: 29px;
}

/* ===== Tableau ===== */

.table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  overflow-x: auto;
}

.table-param {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table-param th,
.table-param td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
  font-size: 14px;
}

.table-param th {
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.table-param td {
  overflow-wrap: anywhere;
}

.table-param tr:hover td {
  background: #fafcff;
}

.table-param select,
.table-param input,
.table-param button {
  max-width: 100%;
}

.ta-center {
  text-align: center;
}

/* ===== Badges / états ===== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-ok {
  background: #e2f7ea;
  color: #24864c;
}

.badge-warning {
  background: #fff2d9;
  color: #a36a00;
}

.badge-info {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.cell-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

/* ===== Liens ===== */

a {
  color: var(--blue);
}

.link-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
}

/* ===== Responsive ===== */

@media (max-width: 700px) {
  body {
    padding: 14px;
  }

  .card,
  .panel {
    padding: 18px;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-controls {
    justify-content: flex-end;
  }

  h1 {
    font-size: 22px;
  }
}
