
.spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #e2e8f0;
	border-top-color: #2f7b90;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.recherche-wrapper {
	margin-bottom: 16px;
}

.recherche-wrapper .recherche-input {
	width: 100%;
	max-width: 360px;
}

.jours-cases {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	padding: 4px 0;
}

.jour-case {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	flex: 1;
}

.jour-label {
	font-size: 13px;
	color: #1e293b;
}

.jour-case input:not(.jour-readonly) + .jour-label {
	font-weight: 700;
}

.jour-readonly {
	accent-color: #2f7b90;
}

.jour-case:has(.jour-readonly) {
	pointer-events: none;
	cursor: default;
}

.card {
	background: #ffffff;
	border-top: 3px solid #2f7b90;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08), 0 4px 20px rgba(15, 23, 42, 0.06);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.card.card-danger {
	border-top-color: #c04d4d;
}

.section-titre {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #374151;
	margin: 0;
	min-height: 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.section-titre.danger {
	color: #c04d4d;
}

.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	background: #2f7b90;
	color: white;
	border: none;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-family: inherit;
	transition: background 0.15s;
}

.btn:hover {
	background: #255f70;
}

.btn-secondary {
	background: #f1f5f9;
	color: #374151;
	border: 1px solid #374151;
}

.btn-secondary:hover {
	background: #e2e8f0;
}

#photos-prendre,
#photos-choisir,
#doc-prendre,
#modif-prendre {
	background: transparent !important;
	border: 1px solid #374151;
}

#photos-prendre:hover,
#photos-choisir:hover,
#doc-prendre:hover,
#modif-prendre:hover {
	background: rgba(0,0,0,0.05);
}

.btn-cancel {
	background: #1e2330;
	color: #ffffff;
	border: none;
}

.btn-cancel:hover {
	background: #0f1318;
}

.btn-dark {
	background: #1e2330;
	color: white;
}

.btn-dark:hover {
	background: #1a1e24;
}

.btn-danger {
	background: #c04d4d;
}

.btn-danger:hover {
	background: #a83f3f;
}

.btn-success {
	background: #16a34a;
}

.btn-success:hover {
	background: #15803d;
}

.btn-outline {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	background: transparent;
	border: 1px solid #374151;
	border-radius: 6px;
	color: #374151;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-outline:hover {
	background: #1e2330;
	border-color: #1e2330;
	color: white;
}

.btn-outline-success {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	background: transparent;
	border: 1px solid #16a34a;
	border-radius: 6px;
	color: #16a34a;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
}

.btn-outline-success:hover {
	background: #16a34a;
	color: white;
}

.btn-outline-teal {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	background: transparent;
	border: 1px solid #2f7b90;
	border-radius: 6px;
	color: #2f7b90;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
}

.btn-outline-teal:hover {
	background: #2f7b90;
	color: white;
}

.btn-outline-danger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	background: transparent;
	border: 1px solid #c04d4d;
	border-radius: 6px;
	color: #c04d4d;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
}

.btn-outline-danger:hover {
	background: #c04d4d;
	color: white;
}

.link {
	color: #2f7b90;
	text-decoration: underline;
	font-weight: bold;
}

.link:hover {
	text-decoration: none;
}

.link.danger {
	color: #c04d4d;
	background: none;
	border: none;
	padding: 0;
}

.badge {
	display: inline-flex;
	padding: 4px 8px;
	border-radius: 4px;
	background: #e5e7eb;
	color: #374151;
	font-size: 12px;
	font-weight: bold;
}

.badge-muted {
	background: #e5e7eb;
	color: #374151;
}

.badge-statut {
	display: inline-flex;
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.badge-statut-actif {
	background: #1f2933;
	color: #f8fafc;
}

.badge-statut-archive {
	background: #e5e7eb;
	color: #374151;
	border: 1px solid #374151;
}

.badge-transmis {
	background: #e0f2f7;
	color: #2f7b90;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.badge-deja-recu {
	background: #e0f2f7;
	color: #2f7b90;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.badge-valide {
	background: #dcfce7;
	color: #166534;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.badge-refuse {
	background: #fee2e2;
	color: #991b1b;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.table th,
.table td {
	border-bottom: 1px solid #e5e7eb;
	padding: 14px 8px;
	text-align: center;
}

.table th:first-child,
.table td:first-child {
	text-align: left;
}

.table th {
	background: #c8cacd;
	color: #64748b;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.table td {
	font-size: 13px;
	color: #374151;
}

@keyframes glisserBas {
	from {
		opacity: 0;
		transform: translateY(-120px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.flash-zone {
	position: fixed;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: max-content;
	max-width: min(400px, calc(100vw - 32px));
	z-index: 2000;
	pointer-events: none;
}

.flash {
	pointer-events: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 16px;
	border-radius: 10px;
	border: none;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	animation: glisserBas 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
}

.flash-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.flash-danger {
	background: #fff1f2;
	color: #9f1239;
	border: 1px solid #fecdd3;
}

.flash-info {
	background: #f0f9ff;
	color: #075985;
	border: 1px solid #bae6fd;
}

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 200;
}

.modal-overlay.hidden {
	display: none;
}

.modal-box {
	background: white;
	border-radius: 4px;
	padding: 24px;
	width: 420px;
	max-width: 90vw;
	box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-titre {
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 16px;
}

.chips-info {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.chip-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 8px 14px;
	background: #f3f5f7;
	border-radius: 6px;
	border: 1px solid #374151;
}

.chips-info-white .chip-info {
	background: #ffffff;
}

.chip-info-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6b7280;
	font-weight: 700;
}

.chip-info-value {
	font-size: 14px;
	font-weight: 700;
}

.rapport-page {
	--rapport-color: #2f7b90;
}

.rapport-page .card {
	border-top-color: var(--rapport-color, #2f7b90);
}

.rapport-page .card.card-danger {
	border-top-color: #dc2626;
}

.chantier-page {
	--chantier-color: #2f7b90;
}

.chantier-page .card {
	border-top-color: var(--chantier-color, #2f7b90);
}

.rapport-header {
	margin-bottom: 6px;
}

.rapport-header + .adresse-chantier {
	margin-top: -8px;
}

.rapport-header-title {
	margin: 0;
	line-height: 1.15;
}

.rapport-header-main {
	display: block;
	font-size: 28px;
	font-weight: 800;
}

.rapport-header-chantier {
	display: inline-block;
	padding-bottom: 2px;
	font-size: 18px;
	font-weight: 700;
	margin-top: 12px;
}

.chip {
	padding: 6px 12px;
	border-radius: 4px;
	background: #f1f5f9;
	color: #334155;
	font-size: 12px;
	font-weight: bold;
}

.barre-wrap {
	background: #c8cacd;
	border-radius: 4px;
	height: 8px;
	overflow: hidden;
	margin: 6px 0 12px;
}

.barre-remplissage {
	height: 100%;
	background: #2f7b90;
	border-radius: 4px;
	transition: width 0.4s ease;
}

.barre-remplissage.danger {
	background: #c04d4d;
}

.barre-label {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 2px;
}

.barre-pct {
	font-weight: 700;
	color: #1f2933;
}

.barre-pct.danger {
	color: #c04d4d;
}

.list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

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

.doc-card {
	background: #fff;
	border-top: 3px solid #2f7b90;
	border-radius: 8px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: 0 1px 6px rgba(15,23,42,0.08), 0 4px 20px rgba(15,23,42,0.06);
}

.doc-card-nom {
	font-weight: 700;
	font-size: 15px;
	color: #1e293b;
}

.doc-card-desc {
	font-size: 13px;
	color: #6b7280;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.doc-card-partages {
	font-size: 12px;
	color: #6b7280;
}

.doc-card-fichiers {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.doc-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.doc-fichier-ligne {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	flex-wrap: wrap;
}

.doc-partage-liste {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}

.doc-partage-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border: 1px solid #374151;
	border-radius: 20px;
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	user-select: none;
}

.doc-partage-item:hover {
	border-color: #2f7b90;
	background: #f0f9fb;
}

.doc-partage-item input[type="checkbox"] {
	accent-color: #2f7b90;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.doc-partage-item:has(input:checked) {
	border-color: #2f7b90;
	background: #e6f4f7;
	color: #1a5f6e;
	font-weight: 500;
}

.rapport-actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}

.rapport-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	padding: 6px 10px;
}

.rapport-action-btn .action-icon {
	display: none;
	line-height: 0;
}

.rapport-action-btn .action-icon svg {
	display: block;
}
