/* Securiwell — Espace client télésurveillance
   Styles volontairement neutres et autonomes pour cohabiter avec le thème. */

.secw-wrap {
	--secw-bleu: #1d4ed8;
	--secw-bleu-fonce: #1e3a8a;
	--secw-texte: #0f172a;
	--secw-doux: #64748b;
	--secw-trait: #e2e8f0;
	--secw-fond: #f8fafc;
	--secw-vert: #15803d;
	--secw-orange: #b45309;
	--secw-rouge: #b91c1c;

	max-width: 1080px;
	margin: 0 auto;
	color: var(--secw-texte);
	font-size: 15px;
	line-height: 1.6;
}

.secw-wrap *, .secw-wrap *::before, .secw-wrap *::after { box-sizing: border-box; }

/* ---------- En-tête ---------- */

.secw-entete {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 16px;
	margin-bottom: 24px;
	border-bottom: 2px solid var(--secw-trait);
}

.secw-surtitre {
	margin: 0;
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--secw-doux);
}

.secw-titre { margin: 2px 0 0; font-size: 24px; line-height: 1.2; }

.secw-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.secw-h3 { font-size: 20px; margin: 0 0 16px; }

.secw-fil {
	font-size: 13px;
	color: var(--secw-doux);
	margin-bottom: 14px;
}

.secw-fil a { color: var(--secw-doux); }
.secw-fil span { margin: 0 6px; opacity: .6; }

.secw-page-head {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.secw-page-head .secw-h3 { margin: 0; }
.secw-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.secw-meta { color: var(--secw-doux); font-size: 14px; margin: 0 0 18px; }

/* ---------- Boutons ---------- */

.secw-btn {
	display: inline-block;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	padding: 10px 17px;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s, border-color .15s;
}

.secw-btn--primary { background: var(--secw-bleu); border-color: var(--secw-bleu); color: #fff; }
.secw-btn--primary:hover { background: var(--secw-bleu-fonce); border-color: var(--secw-bleu-fonce); color: #fff; }

.secw-btn--secondary { background: #fff; border-color: var(--secw-bleu); color: var(--secw-bleu); }
.secw-btn--secondary:hover { background: #eff4ff; color: var(--secw-bleu-fonce); }

.secw-btn--ghost { background: #fff; border-color: #cbd5e1; color: #334155; }
.secw-btn--ghost:hover { background: var(--secw-fond); color: #0f172a; }

.secw-btn--disabled { background: var(--secw-fond); border-color: var(--secw-trait); color: var(--secw-doux); cursor: not-allowed; }

/* ---------- Cartes ---------- */

.secw-card {
	background: #fff;
	border: 1px solid var(--secw-trait);
	border-radius: 6px;
	padding: 20px 22px;
}

.secw-wrap--connexion { max-width: 460px; }
.secw-wrap--connexion .secw-card h2 { margin-top: 0; font-size: 20px; }
.secw-wrap--connexion input[type="text"],
.secw-wrap--connexion input[type="password"] { width: 100%; }

.secw-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.secw-card--site { display: flex; flex-direction: column; gap: 8px; }
.secw-card--site h4 { margin: 0; font-size: 17px; }
.secw-card-adresse { margin: 0; font-size: 14px; color: var(--secw-doux); }
.secw-card-statut { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.secw-card-actions { margin: auto 0 0; padding-top: 8px; }

/* ---------- Pastilles et alertes ---------- */

.secw-badge {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 3px;
	color: #fff;
	background: var(--secw-badge, #64748b);
	white-space: nowrap;
	vertical-align: middle;
}

.secw-alerte {
	border-left: 4px solid var(--secw-doux);
	background: var(--secw-fond);
	padding: 14px 18px;
	margin: 0 0 22px;
	border-radius: 0 4px 4px 0;
	font-size: 14.5px;
}

.secw-alerte p { margin: 0 0 8px; }
.secw-alerte p:last-child { margin-bottom: 0; }
.secw-alerte ul { margin: 4px 0 0 18px; }

.secw-alerte--succes { border-color: var(--secw-vert); background: #f0fdf4; }
.secw-alerte--erreur { border-color: var(--secw-rouge); background: #fef2f2; }
.secw-alerte--attente { border-color: var(--secw-orange); background: #fffbeb; }
.secw-alerte--info { border-color: var(--secw-bleu); background: #eff6ff; }

.secw-inline-alerte {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	padding: 6px 10px;
	border-radius: 3px;
}

.secw-inline-alerte--attente { background: #fffbeb; color: var(--secw-orange); }
.secw-inline-alerte--refus { background: #fef2f2; color: var(--secw-rouge); }
.secw-inline-alerte--info { background: #eff6ff; color: var(--secw-bleu-fonce); }

/* ---------- Tableaux ---------- */

.secw-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 14px;
	font-size: 14.5px;
	background: #fff;
}

.secw-table th, .secw-table td {
	border: 1px solid var(--secw-trait);
	padding: 9px 12px;
	text-align: left;
	vertical-align: top;
}

.secw-table thead th {
	background: var(--secw-fond);
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #334155;
}

.secw-table--identite th { background: var(--secw-fond); width: 34%; font-weight: 600; }
.secw-table tr.secw-groupe th { background: #e2e8f0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.secw-table--matrice th[scope="row"] { font-weight: 500; width: 46%; }
.secw-table tr.secw-neant { color: var(--secw-doux); }
.secw-tel { white-space: nowrap; font-variant-numeric: tabular-nums; }
.secw-center, .secw-table .secw-center { text-align: center; }
.secw-ferme { color: var(--secw-doux); font-style: italic; }

.secw-diff-avant { color: var(--secw-rouge); }
.secw-diff-apres { color: var(--secw-vert); font-weight: 500; }

.secw-vide { color: #94a3b8; }
.secw-masque { color: var(--secw-doux); letter-spacing: .12em; }
.secw-secret { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; letter-spacing: .06em; }

.secw-observations {
	background: #fff;
	border: 1px solid var(--secw-trait);
	padding: 12px 15px;
	border-radius: 4px;
}

/* ---------- Sections ---------- */

.secw-section { margin: 0 0 32px; }
.secw-section > h3 {
	font-size: 17px;
	margin: 0 0 12px;
	padding-bottom: 7px;
	border-bottom: 2px solid var(--secw-trait);
}

.secw-subhead {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--secw-doux);
	margin: 22px 0 10px;
}

.secw-note { font-size: 13.5px; color: var(--secw-doux); margin: 8px 0; }
.secw-note--small { font-size: 12.5px; }
.secw-note--inline { display: inline-block; margin-left: 10px; }

.secw-details {
	border: 1px solid var(--secw-trait);
	border-radius: 4px;
	padding: 10px 14px;
	background: var(--secw-fond);
	font-size: 13.5px;
}

.secw-details summary { cursor: pointer; font-weight: 500; }

.secw-legende { margin: 10px 0 0; display: grid; gap: 5px; }
.secw-legende > div { display: flex; gap: 10px; }
.secw-legende dt { font-weight: 700; min-width: 84px; flex-shrink: 0; }
.secw-legende dd { margin: 0; color: #334155; }

/* ---------- Formulaire ---------- */

.secw-form { margin-top: 8px; }

.secw-field { margin: 0 0 14px; }
.secw-field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.secw-req { color: var(--secw-rouge); }

.secw-form input[type="text"],
.secw-form input[type="tel"],
.secw-form input[type="time"],
.secw-form textarea {
	width: 100%;
	font: inherit;
	font-size: 14.5px;
	padding: 8px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	background: #fff;
	color: var(--secw-texte);
}

.secw-form input:focus, .secw-form textarea:focus {
	outline: 2px solid var(--secw-bleu);
	outline-offset: 1px;
	border-color: var(--secw-bleu);
}

.secw-form input[type="time"] { width: auto; min-width: 130px; }
.secw-input-secret { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; }

.secw-resp {
	border: 1px solid var(--secw-trait);
	border-radius: 6px;
	padding: 14px 18px 6px;
	margin: 0 0 14px;
	background: #fff;
}

.secw-resp legend {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--secw-doux);
	padding: 0 6px;
}

.secw-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 0 16px;
}

.secw-field--action { display: flex; align-items: flex-end; padding-bottom: 14px; }
.secw-field--action .secw-btn { font-size: 13px; padding: 7px 12px; }

.secw-mdp-voir {
	margin-top: 6px;
	font-size: 12.5px !important;
	padding: 5px 11px !important;
}

.secw-alerte-inline {
	display: block;
	color: var(--secw-rouge);
	font-weight: 500;
}

.secw-matrice {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 14px;
}

.secw-event {
	border: 1px solid var(--secw-trait);
	border-radius: 6px;
	padding: 12px 16px 4px;
	background: #fff;
	margin: 0;
}

.secw-event legend { font-size: 14.5px; font-weight: 600; padding: 0 6px; }

.secw-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }

.secw-choice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 500;
	padding: 6px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 20px;
	cursor: pointer;
	background: #fff;
	user-select: none;
}

.secw-choice:hover { border-color: var(--secw-bleu); }
.secw-choice input { margin: 0; }
.secw-choice:has(input:checked) { background: #eff4ff; border-color: var(--secw-bleu); color: var(--secw-bleu-fonce); }

.secw-field--precision label { font-size: 12.5px; color: var(--secw-doux); font-weight: 400; }
.secw-field--toggle label { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; font-size: 14.5px; }
.secw-field--toggle input { margin-top: 3px; }

.secw-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	padding: 20px 0 0;
	border-top: 2px solid var(--secw-trait);
}

.secw-actions .secw-note { flex-basis: 100%; margin: 0; }

/* ---------- Réactivité ---------- */

@media (max-width: 640px) {
	.secw-entete { align-items: flex-start; }
	.secw-matrice, .secw-grid { grid-template-columns: 1fr; }
	.secw-table--identite th { width: 42%; }
	.secw-table { font-size: 13.5px; }
	.secw-table th, .secw-table td { padding: 7px 9px; }
	.secw-page-head { align-items: flex-start; }
}
