/* AIRELLE CRM — artistic direction of airelle.org on top of Bootstrap 5.3.
   Montserrat · cyan #009dc5 (titles, logo) · teal #006486 (subtitles, text accents, dark panels)
   · orange #f39200 (calls to action, pill buttons) · blue-grey #e7ecf0 sections · white cards, 20px radius. */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("vendor/fonts/montserrat-latin-wght-normal.057478083c1d.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("vendor/fonts/montserrat-latin-ext-wght-normal.89711a115091.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cyan: #009dc5;
  --cyan-soft: #e3f4f9;
  --teal: #006486;
  --teal-dark: #004f6b;
  --orange: #f39200;
  --orange-dark: #d98200;
  --ink: #1b2328;
  --muted: #617175;
  --line: #dfe5ea;
  --bg: #e7ecf0;
  --radius: 20px;
  --shadow: 0 8px 24px rgba(0, 72, 100, .07);
  --sidebar-w: 250px;
  --bs-primary: var(--orange);
  --bs-primary-rgb: 243, 146, 0;
  --bs-link-color: var(--teal);
  --bs-link-color-rgb: 0, 100, 134;
  --bs-link-hover-color: var(--cyan);
  --bs-link-hover-color-rgb: 0, 157, 197;
  --bs-body-color: var(--ink);
  --bs-body-font-family: "Montserrat", system-ui, "Segoe UI", Arial, sans-serif;
  --bs-body-font-size: .9rem;
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-border-radius: 10px;
}
body { background: var(--bg); }
a { text-decoration: none; }
strong, b { font-weight: 700; }

/* Typography — as on airelle.org: extra-bold cyan titles, bold teal subtitles */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { font-weight: 700; color: var(--teal); }
.page-title { font-size: 1.75rem; font-weight: 800; color: var(--cyan); letter-spacing: -.01em; margin: 0; }
.page-title .text-muted, .page-title small { font-weight: 600; color: var(--muted) !important; font-size: .6em; }
.text-muted, .form-text { color: var(--muted) !important; }
.eyebrow { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }

/* Buttons — orange pills, uppercase, bold */
.btn { border-radius: 50px; font-weight: 700; letter-spacing: .03em; padding: .5rem 1.15rem; }
.btn-sm { padding: .3rem .85rem; font-size: .78rem; }
.btn-lg { padding: .8rem 1.6rem; }
.btn-primary { --bs-btn-color: #fff; --bs-btn-bg: var(--orange); --bs-btn-border-color: var(--orange);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--orange-dark); --bs-btn-hover-border-color: var(--orange-dark);
  --bs-btn-active-bg: var(--orange-dark); --bs-btn-active-border-color: var(--orange-dark); --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--orange); --bs-btn-disabled-border-color: var(--orange);
  text-transform: uppercase; font-size: .8rem; }
.btn-primary.btn-sm { font-size: .72rem; }
.btn-outline-primary { --bs-btn-color: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal);
  --bs-btn-hover-border-color: var(--teal); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--teal);
  --bs-btn-active-border-color: var(--teal); }
.btn-outline-secondary { --bs-btn-color: var(--teal); --bs-btn-border-color: #c9d4db; --bs-btn-bg: #fff;
  --bs-btn-hover-bg: var(--cyan-soft); --bs-btn-hover-color: var(--teal); --bs-btn-hover-border-color: #b5c6d0;
  --bs-btn-active-bg: var(--cyan-soft); --bs-btn-active-color: var(--teal); }
.btn-outline-success { --bs-btn-color: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal);
  --bs-btn-hover-border-color: var(--teal); }
.btn-link { --bs-btn-color: var(--muted); --bs-btn-hover-color: var(--teal); font-weight: 600; letter-spacing: 0; }
.text-bg-primary { background-color: var(--orange) !important; }

/* Forms */
.form-control, .form-select { border-radius: 10px; border-color: #ccd6dd; padding: .5rem .8rem; }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 .2rem rgba(0,157,197,.15); }
.form-check-input:checked { background-color: var(--cyan); border-color: var(--cyan); }
.form-label { color: var(--teal); font-weight: 600; font-size: .8rem; }

/* Layout: sidebar */
.with-sidebar .content { padding: 2rem 2.25rem 3rem; max-width: 1440px; }
@media (min-width: 992px) {
  .with-sidebar .content { margin-left: var(--sidebar-w); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); }
}
@media (max-width: 991.98px) { .with-sidebar .content { padding: 1.25rem 1rem 2rem; } }
.sidebar { background: #fff; display: flex; flex-direction: column; padding: 1.5rem 1rem 1.25rem; box-shadow: 1px 0 0 var(--line); }
.sidebar .brand { display: block; padding: 0 .6rem 1.75rem; }
.sidebar .brand img { display: block; height: 34px; }
.sidebar .brand span { display: block; margin-top: .35rem; font-size: .78rem; font-weight: 700; color: var(--teal); }
.sidebar .nav-link { display: flex; align-items: center; gap: .7rem; color: var(--ink); padding: .55rem .8rem;
  border-radius: 12px; font-weight: 500; font-size: .86rem; white-space: nowrap; }
.sidebar .nav-link i { color: var(--teal); font-size: 1.05rem; opacity: .75; }
.sidebar .nav-link:hover { background: #f1f5f7; color: var(--teal); }
.sidebar .nav-link.active { background: var(--cyan-soft); color: var(--teal); font-weight: 700; }
.sidebar .nav-link.active i { color: var(--cyan); opacity: 1; }
.sidebar .nav-section { color: var(--teal); font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; padding: 1.4rem .8rem .4rem; opacity: .8; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: .75rem; }
.sidebar .user-line { display: flex; justify-content: space-between; align-items: center; padding: .6rem .8rem 0; font-size: .8rem; }
.sidebar .user-line a { color: var(--muted); font-weight: 600; }
.topbar { display: flex; justify-content: space-between; align-items: center; background: #fff; box-shadow: 0 1px 0 var(--line);
  padding: .7rem 1rem; position: sticky; top: 0; z-index: 1020; }
.dot { position: absolute; top: 0; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.auth .content { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }

/* Surfaces — white cards, 20px radius, soft shadow */
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--teal);
  padding: 1rem 1.35rem; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-body { padding: 1.35rem; }
.card > .table-responsive:last-child, .card > .table:last-child { border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.alert { border-radius: 14px; border: 0; }
.alert-info { background: var(--cyan-soft); color: var(--teal-dark); }
.alert-success { background: #e4f4ea; color: #1d6b3f; }
.alert-warning { background: #fff2dc; color: #8a5300; }

/* Signature panel (airelle.org dark teal block with one sharp corner) */
.hero { background: var(--teal); color: #fff; border-radius: var(--radius) var(--radius) var(--radius) 0;
  padding: 1.6rem 1.9rem; margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.hero h1 { color: #fff; font-weight: 800; font-size: 1.75rem; margin: 0; }
.hero .sub { color: rgba(255,255,255,.75); font-weight: 500; }
.hero .segmented { background: rgba(255,255,255,.14); }
.hero .segmented a { color: rgba(255,255,255,.85); }
.hero .segmented a.active { background: #fff; color: var(--teal); }

/* Tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { color: var(--teal); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line); background: #f7f9fb; white-space: nowrap; }
.table > :not(caption) > * > * { padding: .65rem 1rem; border-color: #edf1f4; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f3f8fa; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #f9fbfc; }
.card .table tr:last-child td { border-bottom: 0; }

/* Tabs */
.nav-tabs { border-bottom: 1px solid #cfd9e0; gap: .25rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: .65rem 1rem; font-weight: 600; }
.nav-tabs .nav-link:hover { color: var(--teal); }
.nav-tabs .nav-link.active { color: var(--teal); background: transparent; border-bottom-color: var(--cyan); font-weight: 700; }

/* Badges — pills */
.badge { font-weight: 700; border-radius: 50px; padding: .35em .75em; letter-spacing: .02em; }
.badge-soft { background: #edf2f5; color: var(--teal); }
.badge-ok { background: #e1f3f8; color: var(--teal); }
.badge-info { background: #fff0d9; color: #a86400; }
.badge-muted { background: #edf0f2; color: var(--muted); }

/* Detail pages */
dl.fiche dt { font-weight: 600; color: var(--teal); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
dl.fiche dd { margin-bottom: .9rem; }
.form-section legend { font-size: .75rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 2px solid var(--cyan-soft); padding-bottom: .45rem; margin-bottom: 1rem; }

/* Dashboard */
.kpi { padding: 1.15rem 1.35rem; }
.kpi .value { font-size: 2rem; font-weight: 800; color: var(--cyan); line-height: 1.05; }
.kpi .label { color: var(--teal); font-size: .8rem; font-weight: 600; }
.kpi.kpi-accent .value { color: var(--orange); }
.widget .list-group-item { border-color: #edf1f4; padding: .7rem 1.35rem; }
.widget .list-group-item-action:hover { background: #f3f8fa; }
.widget .empty { color: var(--muted); padding: 1.1rem 1.35rem; font-size: .88rem; }
.widget .bloc-titre { padding: 1rem 1.35rem .35rem; display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; color: var(--teal); }
.segmented { display: inline-flex; background: #dbe3e9; border-radius: 50px; padding: .25rem; }
.segmented a { padding: .35rem .95rem; border-radius: 50px; color: var(--teal); font-size: .8rem; font-weight: 600; }
.segmented a.active { background: #fff; color: var(--teal); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat { font-size: 1.75rem; font-weight: 800; color: var(--cyan); line-height: 1; }
.colonnes-groupe { max-height: 22rem; overflow-y: auto; }
.w-auto-input { width: 5rem; }
.notif-unread { box-shadow: inset 3px 0 0 var(--orange); }
.fw-medium { font-weight: 600; }
.login-box { width: 100%; max-width: 440px; }
.login-box .tagline { color: var(--teal); font-weight: 700; }
.pagination .page-link { border-radius: 50px !important; margin: 0 .15rem; color: var(--teal); border: 0; font-weight: 600; }
.dropdown-menu { border: 0; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,60,90,.14); padding: .4rem; }
.dropdown-item { border-radius: 8px; font-weight: 500; }

/* --- Administration ------------------------------------------------------ */
.text-teal { color: var(--teal) !important; }
.text-orange { color: var(--orange) !important; }
.admin-head { margin-bottom: 1.5rem; }
.admin-head .page-head { margin-bottom: 1rem; }
.admin-crumbs { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .35rem; }
.admin-crumbs a { color: var(--teal); }
.admin-crumbs a:hover { color: var(--cyan); }
.admin-crumbs i { font-size: .65rem; margin: 0 .35rem; color: var(--muted); }
.admin-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.admin-tabs .nav-link { white-space: nowrap; display: flex; align-items: center; gap: .45rem; }
.admin-tabs .nav-link i { font-size: .95rem; }
.scroll-x { overflow-x: auto; scrollbar-width: thin; }
.segmented .count { font-size: .7rem; font-weight: 700; color: var(--muted); margin-left: .2rem; }
.segmented a.active .count { color: var(--cyan); }

.admin-tile { color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.admin-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,60,90,.12); color: inherit; }
.admin-tile .tile-icon { width: 2.6rem; height: 2.6rem; border-radius: 14px 14px 14px 0; background: var(--cyan-soft);
  color: var(--teal); display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.admin-tile:hover .tile-icon { background: var(--teal); color: #fff; }
.admin-tile .tile-title { font-weight: 800; color: var(--teal); font-size: 1.05rem; margin-bottom: .2rem; }
.watch { box-shadow: inset 4px 0 0 var(--orange), var(--shadow); }
.watch .list-group-item { border-color: #edf1f4; padding: .8rem 1.35rem; font-size: .9rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: space-between; align-items: center; }
.toolbar-fields { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.toolbar-fields .form-select { width: auto; min-width: 11rem; }
.search-input { position: relative; min-width: 14rem; }
.search-input i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; pointer-events: none; }
.search-input .form-control { padding-left: 2rem; border-radius: 50px; }
@media (max-width: 575.98px) { .toolbar-fields, .search-input, .toolbar-fields .form-select { width: 100%; margin-left: 0; } }

.row-link { position: relative; cursor: pointer; }
.row-link a.stretched::after { content: ""; position: absolute; inset: 0; }
.row-link a:not(.stretched), .row-link form, .row-link button { position: relative; z-index: 1; }
tr.is-inactive > td { color: var(--muted); }
tr.is-inactive > td a.stretched, tr.is-inactive .form-control { color: var(--muted); }
tr.is-inactive .form-control { background: #f6f8f9; }
.badge-warn { background: #fff0d9; color: #a86400; }

progress.meter { display: block; width: 6rem; height: 4px; margin-top: .3rem; border: 0; border-radius: 4px;
  background: #e3eaee; appearance: none; overflow: hidden; }
progress.meter::-webkit-progress-bar { background: #e3eaee; }
progress.meter::-webkit-progress-value { background: var(--cyan); border-radius: 4px; }
progress.meter::-moz-progress-bar { background: var(--cyan); }

.table-values .col-code { width: 9rem; }
.table-values .col-ordre { width: 6rem; }
.table-values .col-actif { width: 5.5rem; }
.table-values td { padding-top: .4rem; padding-bottom: .4rem; }
.form-switch .form-check-input { width: 2.2em; cursor: pointer; }
.card-footer { background: transparent; border-top: 1px solid var(--line); padding: .9rem 1.35rem; }

.save-bar .btn-link { text-decoration: none; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: .5rem;
  margin: 1.5rem -.5rem 0; padding: .8rem 1rem; background: rgba(231,236,240,.92); backdrop-filter: blur(6px);
  border-top: 1px solid #d5dee4; border-radius: 14px 14px 0 0; }

.side-help { background: #f4f9fb; box-shadow: none; border: 1px solid #dceaf0; }
.side-help li { margin-bottom: .35rem; }
.current-file { background: #f4f9fb; border-radius: 10px; padding: .55rem .8rem; font-weight: 600; color: var(--teal); }
.vars-scroll { max-height: 26rem; overflow-y: auto; }
.col-var { width: 14rem; white-space: nowrap; }

.events { list-style: none; margin: 0; padding: .25rem 0; }
.event { display: flex; gap: .85rem; align-items: flex-start; padding: .7rem 1.35rem; border-bottom: 1px solid #edf1f4; font-size: .88rem; }
.event:last-child { border-bottom: 0; }
.event-icon { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.event-icon.is-add { background: #e4f4ea; color: #1d6b3f; }
.event-icon.is-mod { background: var(--cyan-soft); color: var(--teal); }
.event-icon.is-del { background: #fde8e6; color: #b3261e; }
.event-body { flex: 1; min-width: 0; }
.event-date { flex: none; color: var(--muted); font-size: .75rem; white-space: nowrap; }

.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem; border-radius: 50px; background: #fff;
  color: var(--teal); font-weight: 600; font-size: .82rem; box-shadow: var(--shadow); }
.chip span { background: #edf2f5; border-radius: 50px; padding: 0 .5rem; font-size: .72rem; font-weight: 700; }
.chip.active { background: var(--teal); color: #fff; }
.chip.active span { background: rgba(255,255,255,.2); }
.chip-warn span { background: var(--orange); color: #fff; }

/* --- Guided tour ----------------------------------------------------------- */
.tour { position: fixed; inset: 0; z-index: 2000; }
.tour-shade { position: absolute; inset: 0; background: rgba(0, 40, 55, .55); }
.tour-spot { position: fixed; left: var(--x); top: var(--y); width: var(--w); height: var(--h); border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 40, 55, .55), 0 0 0 3px var(--cyan); transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 32px));
  background: #fff; border-radius: var(--radius) var(--radius) var(--radius) 0; padding: 1.25rem 1.35rem 1rem;
  box-shadow: 0 18px 48px rgba(0, 40, 60, .3); outline: none; transition: left .25s ease, top .25s ease; }
.tour-card.is-anchored { left: var(--x); top: var(--y); transform: none; }
.tour-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.tour-title { font-size: 1.15rem; font-weight: 800; color: var(--cyan); margin-bottom: .4rem; }
.tour-text { font-size: .9rem; color: var(--ink); margin-bottom: .9rem; }
.tour-dots { display: flex; gap: .3rem; margin-bottom: .9rem; }
.tour-dots span { width: .45rem; height: .45rem; border-radius: 50%; background: #d5dee4; }
.tour-dots span.on { background: var(--orange); width: 1.2rem; border-radius: 50px; }
.tour-actions { display: flex; align-items: center; gap: .5rem; }
.tour-actions .btn-link { padding-left: 0; text-decoration: none; }
body.tour-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
