/* ==========================================================================
   SOPlanning CRM - theme backoffice 2026
   Surcouche de Bootstrap 3.3.7 : charte du site soplanning.org
   (Open Sans, vert #59a818, fond clair), responsive mobile.
   Fichier volontairement en ASCII pur (compatible ANSI / UTF-8).
   ========================================================================== */

/* Open Sans hebergee localement (police variable 300-700, sous-ensembles latin et latin-ext) */
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 300 700;
	font-stretch: 100%;
	font-display: swap;
	src: url("../fonts/opensans-latin-ext.woff2") format("woff2");
	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;
}
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 300 700;
	font-stretch: 100%;
	font-display: swap;
	src: url("../fonts/opensans-latin.woff2") format("woff2");
	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;
}

:root {
	--so-green: #59a818;          /* vert de marque (accents, bordures, grands aplats) */
	--so-green-dark: #447f12;     /* vert texte / boutons (contraste AA sur blanc) */
	--so-green-darker: #38690f;
	--so-green-light: #9fcc3a;
	--so-green-soft: #eef6e6;
	--so-orange: #f4502a;         /* accent du site : actions destructives, alertes */
	--so-orange-dark: #b3321a;
	--so-orange-soft: #fdece7;
	--so-red: #cf2e1f;            /* boutons d'action destructive (contraste AA avec du blanc) */
	--so-red-dark: #a82216;
	--so-ink: #222222;
	--so-text: #3d3d3d;
	--so-muted: #686868;
	--so-subtle: #858585;
	--so-line: #e2e4e0;
	--so-line-soft: #eef0ec;
	--so-bg: #f5f6f4;
	--so-surface: #ffffff;
	--so-radius: 10px;
	--so-radius-sm: 6px;
	--so-shadow: 0 1px 2px rgba(34, 34, 34, .06), 0 1px 3px rgba(34, 34, 34, .04);
	--so-focus: 0 0 0 3px rgba(89, 168, 24, .22);
	--so-header-h: 60px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--so-text);
	background-color: var(--so-bg);
}

a { color: var(--so-green-dark); }
a:hover, a:focus { color: var(--so-green-darker); }

h1, h2, h3, h4 { color: var(--so-ink); font-family: inherit; }

small, .so-help { font-size: 12px; color: var(--so-muted); }
.so-help { display: block; margin-top: 6px; line-height: 1.45; }

.so-muted { color: var(--so-muted); }
.so-nowrap { white-space: nowrap; }
.so-mono { font-variant-numeric: tabular-nums; }

/* liens herites des anciens ecrans */
.lien-normal, .lien-normal:link, .lien-normal:visited { color: var(--so-ink); text-decoration: none; }
.lien-normal:hover, .lien-normal:active { color: var(--so-green-dark); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Header + navigation (hamburger sous 1100px)
   -------------------------------------------------------------------------- */
.so-header {
	position: sticky;
	top: 0;
	z-index: 1030;
	background: var(--so-surface);
	border-bottom: 1px solid var(--so-line);
	box-shadow: 0 1px 0 rgba(34, 34, 34, .02);
}
.so-header::before {
	content: "";
	display: block;
	height: 3px;
	background: linear-gradient(90deg, var(--so-green) 0%, var(--so-green-light) 100%);
}
.so-header-inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 28px;
	max-width: 1440px;
	min-height: var(--so-header-h);
	margin: 0 auto;
	padding: 0 24px;
}

.so-brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	text-decoration: none !important;
	color: var(--so-ink) !important;
	font-size: 20px;
	font-weight: 300;
	letter-spacing: -.01em;
}
.so-brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-right: 3px;
	border-radius: 50%;
	background: var(--so-green);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
}
.so-brand-tag {
	margin-left: 10px;
	padding: 1px 7px;
	border-radius: 4px;
	background: var(--so-ink);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
}

.so-nav ul { list-style: none; margin: 0; padding: 0; }
.so-nav a { text-decoration: none; }

.so-burger {
	display: none;
	margin-left: auto;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--so-line);
	border-radius: var(--so-radius-sm);
	background: var(--so-surface);
	cursor: pointer;
}
.so-burger:focus { outline: 0; box-shadow: var(--so-focus); }
.so-burger span {
	display: block;
	width: 20px;
	height: 2px;
	margin: 4px auto;
	border-radius: 2px;
	background: var(--so-ink);
	transition: transform .2s ease, opacity .2s ease;
}
.so-burger:not(.collapsed) span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.so-burger:not(.collapsed) span:nth-child(2) { opacity: 0; }
.so-burger:not(.collapsed) span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* desktop : menu en ligne */
@media (min-width: 1100px) {
	.so-nav.collapse {
		display: flex !important;
		flex: 1 1 auto;
		align-items: center;
		justify-content: space-between;
		height: auto !important;
		overflow: visible !important;
	}
	.so-nav ul { display: flex; align-items: center; gap: 2px; }
	.so-nav-main a {
		display: block;
		padding: 0 12px;
		line-height: var(--so-header-h);
		color: var(--so-text);
		font-size: 14px;
		font-weight: 600;
		border-bottom: 3px solid transparent;
		margin-bottom: -1px;
	}
	.so-nav-main a:hover { color: var(--so-green-dark); }
	.so-nav-main .active a { color: var(--so-green-dark); border-bottom-color: var(--so-green); }
	.so-nav-user { gap: 6px !important; font-size: 13px; }
	.so-nav-user a { display: block; padding: 6px 10px; border-radius: var(--so-radius-sm); color: var(--so-muted); font-weight: 600; }
	.so-nav-user a:hover { background: var(--so-bg); color: var(--so-ink); }
}

/* mobile / tablette : panneau deroulant */
@media (max-width: 1099px) {
	.so-header-inner { padding: 0 16px; }
	.so-burger { display: block; }
	.so-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--so-surface);
		border-bottom: 1px solid var(--so-line);
		box-shadow: 0 16px 32px rgba(34, 34, 34, .14);
		max-height: calc(100vh - var(--so-header-h));
		overflow-y: auto;
	}
	.so-nav-main { padding: 8px 0 !important; }
	.so-nav-main a {
		display: block;
		padding: 13px 20px;
		color: var(--so-ink);
		font-size: 16px;
		font-weight: 600;
		border-left: 3px solid transparent;
	}
	.so-nav-main a:active { background: var(--so-bg); }
	.so-nav-main .active a { color: var(--so-green-dark); border-left-color: var(--so-green); background: var(--so-green-soft); }
	.so-nav-user {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		padding: 14px 20px 18px !important;
		border-top: 1px solid var(--so-line);
		background: #fafbf9;
	}
	.so-nav-user .so-user { flex: 1 1 100%; }
	.so-nav-user a {
		display: inline-block;
		padding: 9px 14px;
		border: 1px solid var(--so-line);
		border-radius: var(--so-radius-sm);
		background: var(--so-surface);
		color: var(--so-text);
		font-weight: 600;
	}
}

.so-user { display: inline-flex; align-items: center; gap: 8px; color: var(--so-muted); font-size: 13px; }
.so-user-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--so-green-soft);
	color: var(--so-green-darker);
	font-size: 12px;
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Page
   -------------------------------------------------------------------------- */
.so-page {
	max-width: 1440px;
	margin: 0 auto;
	padding: 24px 24px 64px;
}

.so-pagehead {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 20px;
}
.so-pagehead h1 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
}
.so-pagehead-meta { margin: 4px 0 0; color: var(--so-muted); font-size: 13px; }
.so-pagehead-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.so-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	color: var(--so-muted);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
}
.so-back:hover { color: var(--so-green-dark); }

.so-count {
	padding: 2px 10px;
	border-radius: 999px;
	background: #e9ebe6;
	color: var(--so-muted);
	font-size: 13px;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Cartes
   -------------------------------------------------------------------------- */
.so-card {
	margin-bottom: 20px;
	background: var(--so-surface);
	border: 1px solid var(--so-line);
	border-radius: var(--so-radius);
	box-shadow: var(--so-shadow);
}
.so-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--so-line);
}
.so-card-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.so-card-body { padding: 20px; }
.so-card-foot { padding: 12px 20px; border-top: 1px solid var(--so-line); background: #fafbf9; border-radius: 0 0 var(--so-radius) var(--so-radius); }

/* --------------------------------------------------------------------------
   Boutons (surcharge Bootstrap : s'applique aussi aux anciens ecrans)
   -------------------------------------------------------------------------- */
.btn {
	padding: 8px 14px;
	border-radius: var(--so-radius-sm);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-shadow: none !important;
	background-image: none !important;
	box-shadow: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:focus, .btn:active:focus { outline: 0; box-shadow: var(--so-focus); }
.btn .glyphicon { margin-right: 5px; font-size: 12px; top: 1px; }

.btn-primary, .btn-primary:focus { background-color: var(--so-green-dark); border-color: var(--so-green-dark); color: #fff; }
.btn-primary:hover, .btn-primary:active, .btn-primary:active:focus { background-color: var(--so-green-darker); border-color: var(--so-green-darker); color: #fff; }

.btn-default, .btn-default:focus { background-color: var(--so-surface); border-color: #cfd3cc; color: var(--so-ink); }
.btn-default:hover, .btn-default:active, .btn-default:active:focus { background-color: #f0f2ee; border-color: #bcc1b8; color: var(--so-ink); }

.btn-warning, .btn-warning:focus { background-color: var(--so-surface); border-color: #f3b9aa; color: var(--so-orange-dark); }
.btn-warning:hover, .btn-warning:active, .btn-warning:active:focus { background-color: var(--so-orange-soft); border-color: var(--so-orange); color: var(--so-orange-dark); }

.btn-danger, .btn-danger:focus { background-color: var(--so-red); border-color: var(--so-red); color: #fff; }
.btn-danger:hover, .btn-danger:active, .btn-danger:active:focus { background-color: var(--so-red-dark); border-color: var(--so-red-dark); color: #fff; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

.so-link-danger { color: var(--so-orange-dark); font-weight: 600; }
.so-link-danger:hover { color: var(--so-orange); }

.so-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid transparent;
	border-radius: var(--so-radius-sm);
	color: var(--so-muted);
	text-decoration: none !important;
}
.so-iconbtn:hover { background: var(--so-green-soft); color: var(--so-green-darker); }
.so-iconbtn-danger:hover { background: var(--so-orange-soft); color: var(--so-orange-dark); }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
label { margin: 0 0 6px; color: var(--so-text); font-size: 13px; font-weight: 600; }

.form-control {
	height: 38px;
	padding: 7px 12px;
	border: 1px solid #cfd3cc;
	border-radius: var(--so-radius-sm);
	background-color: var(--so-surface);
	color: var(--so-ink);
	font-size: 14px;
	box-shadow: none;
}
.form-control:focus { border-color: var(--so-green); box-shadow: var(--so-focus); }
textarea.form-control { height: auto; min-height: 84px; resize: vertical; }
select.form-control {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 34px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23686868' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}
.so-readonly {
	display: block;
	min-height: 38px;
	padding: 8px 12px;
	border: 1px dashed var(--so-line);
	border-radius: var(--so-radius-sm);
	background: #fafbf9;
	color: var(--so-muted);
	overflow-wrap: anywhere;
}

.so-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 20px;
}
.so-field { min-width: 0; }
.so-field-full { grid-column: 1 / -1; }
.so-input-date { max-width: 150px; }

/* information placee au-dessus d'un champ (ex. numero de commande requis) */
.so-field-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
	margin-bottom: 8px;
	padding: 7px 10px;
	border: 1px solid #ecd9a0;
	border-left: 4px solid #d9a514;
	border-radius: var(--so-radius-sm);
	background: #fcf3dc;
	color: #6b5310;
	font-size: 13px;
	font-weight: 600;
}
.so-field-info .so-muted { font-weight: 400; }

/* controle segmente (type d'instance) */
.so-segmented { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 8px; background: #e9ebe6; }
.so-segmented label { position: relative; margin: 0; cursor: pointer; }
.so-segmented input { position: absolute; opacity: 0; }
.so-segmented span { display: block; padding: 7px 14px; border-radius: 6px; color: var(--so-muted); font-size: 13px; font-weight: 600; }
.so-segmented input:checked + span { background: var(--so-surface); color: var(--so-green-darker); box-shadow: var(--so-shadow); }
.so-segmented input:focus + span { box-shadow: var(--so-focus); }

/* barre d'actions du formulaire */
.so-actionbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin-bottom: 20px;
}
.so-actionbar .so-spacer { flex: 1 1 auto; }

/* --------------------------------------------------------------------------
   Filtres de liste
   -------------------------------------------------------------------------- */
.so-filters {
	display: grid;
	grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(160px, 1fr));
	gap: 12px 16px;
	align-items: end;
	padding: 16px 20px;
}
.so-filters-sort { display: none; }
.so-search { position: relative; }
.so-search .glyphicon { position: absolute; top: 50%; left: 13px; margin-top: -7px; color: var(--so-subtle); font-size: 13px; }
.so-search .form-control { padding-left: 36px; }

/* --------------------------------------------------------------------------
   Badges de statut
   -------------------------------------------------------------------------- */
.so-badge {
	display: inline-block;
	padding: 1px 10px;
	border-radius: 999px;
	background: #e9ebe6;
	color: #4a4a4a;
	font-size: 12px;
	font-weight: 600;
	line-height: 20px;
	white-space: nowrap;
	vertical-align: middle;
}
.so-badge-abonne, .so-badge-ok, .so-badge-valide, .so-badge-payee { background: var(--so-green-soft); color: var(--so-green-darker); }
.so-badge-demo-30 { background: #e6f1fb; color: #1d5f96; }
.so-badge-demo { background: #efeafa; color: #5a3f99; }
.so-badge-gratuit { background: #e9ebe6; color: #4a4a4a; }
.so-badge-supprime, .so-badge-blocked, .so-badge-expire, .so-badge-a-payer { background: var(--so-orange-soft); color: var(--so-orange-dark); }
.so-badge-expire_bientot { background: #fcf3dc; color: #8a6d1b; }
.so-badge-onpremise { background: var(--so-ink); color: #fff; letter-spacing: .04em; }
a.so-badge { text-decoration: none; }
a.so-badge:hover { filter: brightness(.95); }

/* --------------------------------------------------------------------------
   Tableaux
   -------------------------------------------------------------------------- */
.so-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--so-radius) var(--so-radius); }

.so-table { width: 100%; margin: 0; border-collapse: collapse; }
.so-table th {
	padding: 10px 14px;
	border-bottom: 1px solid var(--so-line);
	background: #fafbf9;
	color: var(--so-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}
.so-table th a { color: inherit; text-decoration: none; }
.so-table th a:hover { color: var(--so-ink); }
.so-table th.so-sorted a { color: var(--so-green-darker); }
.so-table th .glyphicon { margin-left: 4px; font-size: 9px; }
.so-table td { padding: 10px 14px; border-top: 1px solid var(--so-line-soft); vertical-align: middle; }
.so-table tbody tr:first-child td { border-top: 0; }
.so-table tbody tr:hover { background: #f7faf3; }
.so-table .so-cell-title a { color: var(--so-ink); font-weight: 600; text-decoration: none; }
.so-table .so-cell-title a:hover { color: var(--so-green-dark); text-decoration: underline; }
.so-table .so-cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.so-table td.so-mono { white-space: nowrap; }

/* anciens tableaux Bootstrap non encore migres : rendu clair coherent */
.table { background: var(--so-surface); color: var(--so-text); }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #fafbf9; }
.table-hover > tbody > tr:hover { background-color: #f7faf3; }

.so-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	padding: 12px 20px;
	border-top: 1px solid var(--so-line);
	color: var(--so-muted);
	font-size: 13px;
}
.so-pagination ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.so-pagination a, .so-pagination .so-current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--so-line);
	border-radius: var(--so-radius-sm);
	background: var(--so-surface);
	color: var(--so-text);
	font-weight: 600;
	text-decoration: none;
}
.so-pagination a:hover { border-color: var(--so-green); color: var(--so-green-darker); }
.so-pagination .so-current { border-color: var(--so-green-dark); background: var(--so-green-dark); color: #fff; }

/* --------------------------------------------------------------------------
   Fiche client : mise en page 2 colonnes + listes laterales
   -------------------------------------------------------------------------- */
.so-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 24px;
	align-items: start;
}

.so-list { list-style: none; margin: 0; padding: 0; }
.so-list > li { padding: 12px 20px; border-top: 1px solid var(--so-line-soft); }
.so-list > li:first-child { border-top: 0; }
.so-list-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.so-list-title { font-weight: 600; }
.so-list-meta { color: var(--so-muted); font-size: 13px; }
.so-list-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; }

.so-abo-title { margin: 0 0 2px; font-size: 16px; font-weight: 700; color: var(--so-ink); }
.so-abo-price { color: var(--so-green-darker); font-weight: 700; }

.so-section-title { margin: 28px 0 14px; font-size: 18px; font-weight: 600; }
.so-section-ancre { display: flex; align-items: center; gap: 10px; scroll-margin-top: calc(var(--so-header-h) + 16px); }
.so-section-ancre .so-iconbtn { width: 30px; height: 30px; border: 1px solid var(--so-line); background: var(--so-surface); }

.so-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px 20px;
	margin: 0;
}
.so-meta dt, .so-stat-label { color: var(--so-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.so-meta dd { margin: 2px 0 0; color: var(--so-ink); overflow-wrap: anywhere; }

.so-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
	margin-top: 18px;
}
.so-stat { padding: 10px 12px; border: 1px solid var(--so-line-soft); border-radius: 8px; background: #fafbf9; }
.so-stat-value { display: block; color: var(--so-ink); font-size: 17px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.so-stat-value small { font-size: 12px; font-weight: 600; }

.so-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.so-toolbar-group { display: inline-flex; gap: 6px; }
.so-toolbar-group .form-control { width: 140px; }
.so-toolbar-sep { flex: 0 0 1px; align-self: stretch; margin: 0 6px; background: var(--so-line); }

.so-install-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.so-install-title a { font-weight: 700; overflow-wrap: anywhere; }

/* alertes */
.so-callout {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 1px solid #f3b9aa;
	border-left: 4px solid var(--so-orange);
	border-radius: var(--so-radius-sm);
	background: var(--so-orange-soft);
	color: #7a2312;
	font-size: 13px;
}
.alert-success, .alert-danger, .alert-error {
	width: auto;
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--so-radius-sm);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
}
.alert-success { border: 1px solid #cfe6b8; border-left: 4px solid var(--so-green); background: var(--so-green-soft); color: var(--so-green-darker); }
.alert-danger, .alert-error { border: 1px solid #f3b9aa; border-left: 4px solid var(--so-orange); background: var(--so-orange-soft); color: var(--so-orange-dark); }

/* --------------------------------------------------------------------------
   Modales (memes gabarits que bo_footer.tpl : #myModal, #myBigModal)
   -------------------------------------------------------------------------- */
.modal-backdrop.in { opacity: .45; }
.modal-content {
	border: 0;
	border-radius: 12px;
	background-color: var(--so-surface);
	color: var(--so-text);
	box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}
.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--so-line);
	cursor: default;
}
.modal-header::before, .modal-header::after { display: none; }
.modal-title { margin: 0; color: var(--so-ink); font-size: 16px; font-weight: 700; line-height: 1.4; }
.modal-header .close {
	order: 2;
	float: none;
	width: 36px;
	height: 36px;
	margin: -6px -8px -6px 0;
	border-radius: var(--so-radius-sm);
	color: var(--so-ink);
	font-size: 26px;
	font-weight: 400;
	opacity: .55;
	text-shadow: none;
}
.modal-header .close:hover { background: var(--so-bg); opacity: 1; }
.modal-body { padding: 20px; max-height: calc(100vh - 150px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-body .so-form-grid { grid-template-columns: minmax(0, 1fr); }
.so-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modalBig { width: auto; max-width: 960px; }

/* datepicker jQuery UI : au-dessus des modales, aux couleurs du theme */
.ui-datepicker { z-index: 1060 !important; padding: 8px; border: 1px solid var(--so-line); border-radius: var(--so-radius); background: var(--so-surface); box-shadow: 0 12px 32px rgba(34, 34, 34, .18); font-family: inherit; font-size: 13px; }
.ui-datepicker .ui-datepicker-header { border: 0; background: transparent; color: var(--so-ink); }
.ui-datepicker td a.ui-state-default { border: 0; border-radius: 6px; background: transparent; color: var(--so-text); text-align: center; }
.ui-datepicker td a.ui-state-hover { background: var(--so-green-soft); }
.ui-datepicker td a.ui-state-active { background: var(--so-green-dark); color: #fff; }
.ui-datepicker td a.ui-state-highlight { box-shadow: inset 0 0 0 1px var(--so-green); }

/* --------------------------------------------------------------------------
   Complements : etats de licence, pages etroites, totaux, stats, login
   -------------------------------------------------------------------------- */
.so-badge-a_venir { background: #e6f1fb; color: #1d5f96; }
.so-badge-expiree { background: var(--so-orange-soft); color: var(--so-orange-dark); }

.so-page-narrow { max-width: 920px; }

.so-summary { color: var(--so-muted); font-size: 14px; }
.so-summary b { color: var(--so-ink); font-size: 16px; }

/* ligne de total mensuel (revenus) */
.so-table tr.so-row-total td { background: #f1f4ed; color: var(--so-ink); font-weight: 700; text-align: right; }
.so-table tr.so-row-total td span { display: inline-block; margin-left: 24px; }
.so-table tr.so-row-total:hover { background: transparent; }
.so-table .so-cell-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.so-table th.so-cell-num { text-align: right; }

/* onglets (stats 2) : defilent horizontalement sur mobile */
.so-tabs {
	display: flex;
	gap: 4px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--so-line);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.so-tabs > li { flex: 0 0 auto; margin-bottom: -1px; }
.so-tabs > li > a {
	display: block;
	padding: 10px 16px;
	border-bottom: 3px solid transparent;
	color: var(--so-muted);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.so-tabs > li > a:hover, .so-tabs > li > a:focus { color: var(--so-ink); outline: 0; }
.so-tabs > li.active > a { color: var(--so-green-darker); border-bottom-color: var(--so-green); }
.so-tab-content { padding: 0; }

/* chiffres cles */
.so-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.so-kpi { padding: 16px 18px; border: 1px solid var(--so-line); border-radius: var(--so-radius); background: var(--so-surface); box-shadow: var(--so-shadow); }
.so-kpi-value { display: block; color: var(--so-ink); font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.so-kpi-value small { color: var(--so-muted); font-size: 13px; font-weight: 600; }
.so-kpi-label { display: block; margin-top: 4px; color: var(--so-muted); font-size: 12px; line-height: 1.4; }

.so-layout-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }

/* barre de proportion dans un tableau */
.so-table .so-cell-bar { width: 22%; min-width: 80px; }
.so-bar { display: block; height: 8px; border-radius: 999px; background: #e9ebe6; overflow: hidden; }
.so-bar > span { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--so-green); }

/* selecteur de periode (stats 2, onglet revenus) */
.so-periode { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin: 0; padding: 12px 20px; }
.so-periode-raccourcis, .so-periode-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.so-periode-titre { margin-right: 4px; color: var(--so-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.so-periode-dates label { margin: 0; color: var(--so-muted); font-weight: 600; }
.so-periode-dates .form-control { width: 160px; }
.so-periode-active .form-control { border-color: var(--so-green); box-shadow: var(--so-focus); }

.so-bar-alerte > span { background: var(--so-orange); }
.so-bar-double { position: relative; }
.so-bar-double > span:first-child { background: #bfdc9c; }
.so-bar-double > .so-bar-part { position: absolute; top: 0; left: 0; background: var(--so-green-dark); }
.so-delta-plus { color: var(--so-green-darker); }
.so-delta-moins { color: var(--so-orange-dark); }
.so-delta-zero { color: var(--so-muted); }
.so-chart.so-chart-sm { height: 300px; }
.so-chart.so-chart-md { height: 360px; }
.so-table td .so-badge { margin: 1px 4px 1px 0; }

/* texte libre (stats 2) */
.so-prose dl { margin: 0; }
.so-prose dt { margin-top: 16px; color: var(--so-ink); font-size: 15px; font-weight: 700; }
.so-prose dt:first-child { margin-top: 0; }
.so-prose dd { margin: 2px 0 0; color: var(--so-text); }

/* apercu d'un email (modale Gmail inscr.) */
.so-mail-preview { padding: 14px 16px; border: 1px solid var(--so-line); border-radius: var(--so-radius-sm); background: #fff; color: #000; overflow-wrap: anywhere; }

/* grand tableau des stats : defilement horizontal, 2 premieres colonnes lisibles */
.tableStat { width: 100%; border-collapse: collapse; background: var(--so-surface); font-size: 12px; }
.tableStat th, .tableStat td { padding: 4px 6px; border: 1px solid var(--so-line); white-space: nowrap; }
.tableStat th { background: #fafbf9; color: var(--so-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.tableStat tr:first-child td, .tableStat th + td { color: var(--so-muted); }
.tableStat td[rowspan] { background: #fafbf9; color: var(--so-ink); font-weight: 700; vertical-align: top; white-space: normal; }
.tableStat .td_stat { text-align: center; font-variant-numeric: tabular-nums; }
.tableStat .td_stat[onclick] { cursor: pointer; background: #fbfdf8; }
.tableStat .td_stat[onclick]:hover { background: var(--so-green-soft); box-shadow: inset 0 0 0 1px var(--so-green); }
.so-chart { position: relative; height: 550px; width: 100%; }

.so-radio-inline { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; min-height: 38px; }
.so-radio-inline label, .so-check label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }
.so-radio-inline input, .so-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--so-green-dark); }

/* page de login */
.so-login {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	margin: 0;
	padding: 24px 16px;
	background:
		radial-gradient(900px 420px at 50% -120px, rgba(159, 204, 58, .28), transparent 70%),
		var(--so-bg);
}
.so-login-card {
	width: 100%;
	max-width: 400px;
	padding: 32px 28px 28px;
	border: 1px solid var(--so-line);
	border-top: 3px solid var(--so-green);
	border-radius: var(--so-radius);
	background: var(--so-surface);
	box-shadow: 0 12px 40px rgba(34, 34, 34, .10);
}
.so-login-brand { display: flex; justify-content: center; margin-bottom: 6px; }
.so-login-brand .so-brand { font-size: 26px; }
.so-login-brand .so-brand-mark { width: 44px; height: 44px; font-size: 17px; }
.so-login-title { margin: 0 0 24px; color: var(--so-muted); font-size: 14px; text-align: center; }
.so-login-card .so-field { margin-bottom: 16px; }
.so-login-card .btn { width: 100%; margin-top: 8px; padding: 11px 16px; font-size: 15px; }
.so-login .alert-success, .so-login .alert-danger { width: 100%; max-width: 400px; }
.so-login-foot { margin-top: 18px; color: var(--so-subtle); font-size: 12px; }

/* utilitaires repris de l'ancien styles.css */
hr { margin: 12px 0; border: 0; border-top: 1px solid var(--so-line); }
.typeahead { z-index: 1051; }
.select2 { width: 100%; }
.tooltip-html { display: none; }
.print { display: none; }
.ui-datepicker-week-col, .ui-datepicker .ui-state-default { text-align: center !important; }

/* --------------------------------------------------------------------------
   Bandeau propre a la maquette (bo/maquette/, non repris dans le backoffice)
   -------------------------------------------------------------------------- */
.mq-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 20px;
	padding: 10px 14px;
	border: 1px dashed #b9a24a;
	border-radius: var(--so-radius-sm);
	background: #fdf8e4;
	color: #6b5a14;
	font-size: 13px;
}
.mq-bar strong { letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.mq-bar button { padding: 4px 10px; border: 1px solid #d8c77a; border-radius: 999px; background: #fff; color: #6b5a14; font-size: 12px; font-weight: 600; cursor: pointer; }
.mq-bar button.active { border-color: #6b5a14; background: #6b5a14; color: #fff; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1099px) {
	.so-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.so-layout-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
	.so-page { padding: 16px 12px 40px; }
	.so-pagehead h1 { font-size: 20px; }
	.so-pagehead-actions { width: 100%; }
	.so-pagehead-actions .btn { flex: 1 1 auto; }
	.so-card-head { padding: 12px 16px; }
	.so-card-body { padding: 16px; }
	.so-list > li { padding: 12px 16px; }

	/* confort tactile + pas de zoom automatique iOS (police >= 16px) */
	.form-control { height: 44px; font-size: 16px; }
	.btn { padding: 10px 16px; font-size: 14px; }
	.btn-sm { padding: 8px 12px; font-size: 13px; }
	.so-iconbtn { width: 42px; height: 42px; border-color: var(--so-line); }

	.so-form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.so-input-date { max-width: none; }
	.so-segmented { display: flex; }
	.so-segmented label { flex: 1 1 auto; text-align: center; }

	.so-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px; gap: 10px 12px; }
	.so-filters .so-filter-search { grid-column: 1 / -1; }
	.so-filters-sort { display: block; grid-column: 1 / -1; }

	/* barre d'enregistrement collee en bas de l'ecran */
	.so-actionbar {
		position: sticky;
		bottom: 0;
		z-index: 10;
		margin: 0 -12px 20px;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--so-line);
		background: rgba(255, 255, 255, .96);
		box-shadow: 0 -6px 16px rgba(34, 34, 34, .08);
	}
	.so-actionbar .btn-primary { flex: 1 1 auto; }
	.so-actionbar .so-spacer { display: none; }

	.so-toolbar .btn, .so-toolbar-group { flex: 1 1 100%; }
	.so-toolbar-group .form-control { flex: 1 1 auto; width: auto; }
	.so-toolbar-sep { display: none; }
	.so-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.so-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	/* tableau -> cartes */
	.so-table-cards, .so-table-cards tbody, .so-table-cards tr, .so-table-cards td { display: block; }
	.so-table-cards thead { display: none; }
	.so-table-cards tr {
		position: relative;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px 14px;
		padding: 14px 16px;
		border-top: 1px solid var(--so-line);
	}
	.so-table-cards tbody tr:first-child { border-top: 0; }
	.so-table-cards tr:hover { background: transparent; }
	.so-table-cards td { padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
	.so-table-cards td[data-label]::before {
		content: attr(data-label);
		display: block;
		color: var(--so-muted);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: .05em;
		text-transform: uppercase;
	}
	.so-table-cards td:empty { display: none; }
	.so-table-cards .so-cell-title { grid-column: 1 / -1; padding-right: 96px; font-size: 16px; }
	.so-table-cards .so-cell-title::before { display: none !important; }
	.so-table-cards .so-cell-status { position: absolute; top: 14px; right: 16px; }
	.so-table-cards .so-cell-status::before { display: none !important; }
	.so-table-cards .so-cell-url { grid-column: 1 / -1; }
	.so-table-cards .so-cell-actions {
		grid-column: 1 / -1;
		display: flex;
		gap: 8px;
		width: auto;
		padding-top: 10px;
		border-top: 1px dashed var(--so-line);
		text-align: left;
	}
	.so-table-cards .so-cell-actions .so-iconbtn { flex: 1 1 0; width: auto; gap: 6px; font-size: 13px; font-weight: 600; }
	.so-table-cards .so-cell-actions .so-iconbtn span.so-iconbtn-label { display: inline; }

	.so-table-cards .so-cell-num { text-align: left; }
	.so-table-cards tr.so-row-total { display: block; background: #f1f4ed; }
	.so-table-cards tr.so-row-total td { background: transparent; text-align: left; }
	.so-table-cards tr.so-row-total td span { margin: 0 16px 0 0; }
	.so-chart { height: 380px; }
	.so-chart.so-chart-md { height: 280px; }
	.so-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.so-kpi { padding: 12px 14px; }
	.so-kpi-value { font-size: 20px; }
	.so-table .so-cell-bar { display: none; }

	.so-pagination { justify-content: center; padding: 12px 16px; }

	/* modales plein ecran utile */
	.modal-dialog { margin: 10px; }
	.modal-body { padding: 16px; max-height: calc(100vh - 110px); }
	.so-modal-actions .btn { flex: 1 1 auto; }
}

.so-iconbtn-label { display: none; }

@media (max-width: 380px) {
	.so-brand-tag { display: none; }
}
