.doe-form {
	max-width: 720px;
	margin: 0 auto;
}

.doe-field {
	margin-bottom: 1.25em;
}

.doe-field > label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.doe-field__required {
	color: #c0392b;
}

.doe-field input[type="text"],
.doe-field input[type="email"],
.doe-field input[type="tel"],
.doe-field input[type="number"],
.doe-field input[type="date"],
.doe-field input[type="time"],
.doe-field select,
.doe-field textarea {
	padding: 0.55em 0.7em;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
}

.doe-field textarea {
	min-height: 100px;
	resize: vertical;
}

/* Texte court / texte long / e-mail / téléphone / fichier : pleine
 * largeur disponible, que le champ soit seul sur sa ligne ou associé à
 * un autre champ via row_line (la cellule grandit pour occuper l'espace
 * restant, voir .doe-form__row-cell plus bas). */
.doe-field--text input,
.doe-field--email input,
.doe-field--phone input,
.doe-field--textarea textarea,
.doe-field--file input {
	width: 100%;
	max-width: 100%;
}

/* Date / heure : largeur limitée au nombre de caractères attendus
 * (jj/mm/aaaa, hh:mm) plutôt qu'à 100% de la ligne. */
.doe-field--date input {
	width: 11em;
	max-width: 100%;
}

.doe-field--time input {
	width: 7em;
	max-width: 100%;
}

/* Numérique : 4 caractères maximum prévus. */
.doe-field--number input {
	width: 5em;
	max-width: 100%;
}

/* Liste de choix : largeur mini = 4 caractères, largeur maxi = la plus
 * petite des deux valeurs entre l'option la plus longue (sizing naturel
 * du <select>, non forcé) et 50% de la largeur de ligne. */
.doe-field--select select {
	width: auto;
	min-width: calc(4ch + 2.4em);
	max-width: 50%;
}

.doe-field__hint {
	font-size: 0.85em;
	color: #666;
	margin-top: 0.3em;
}

.doe-field__remove-file {
	font-size: 0.85em;
	color: #c0392b;
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font-weight: normal;
	cursor: pointer;
}

/* Mosaïque de fichiers (côté demandeur et côté service technique) :
 * vignette pour les images, icône + nom de fichier pour le reste
 * (PDF, Word, Excel...), mélangés dans une même grille souple. */
.doe-file-mosaic {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 0.5em;
}

.doe-file-mosaic__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100px;
}

.doe-file-mosaic__item a {
	display: block;
	width: 100px;
	height: 100px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	overflow: hidden;
	background: #f6f7f7;
}

.doe-file-mosaic__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.doe-file-mosaic__doc {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4px;
	box-sizing: border-box;
	text-align: center;
}

.doe-file-mosaic__doc-icon {
	font-size: 1.8em;
	line-height: 1;
}

.doe-file-mosaic__doc-name {
	font-size: 0.7em;
	color: #444;
	word-break: break-word;
	margin-top: 4px;
	max-height: 2.6em;
	overflow: hidden;
}

.doe-field__checkbox-option,
.doe-field__radio-option {
	display: flex;
	align-items: center;
	margin-bottom: 0.4em;
}

.doe-field__checkbox-option input,
.doe-field__radio-option input {
	margin-right: 0.5em;
	flex-shrink: 0;
}

/* Neutralise explicitement le style du libellé principal du champ
 * (au cas où .doe-field > label ne suffirait pas selon la structure) :
 * le libellé de l'option reste sur la même ligne que sa case/bouton. */
.doe-field__checkbox-option label,
.doe-field__radio-option label {
	display: inline;
	font-weight: normal;
	margin-bottom: 0;
}

.doe-form__submit {
	margin-top: 1.5em;
}

.doe-form__submit-button {
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.75em 1.75em;
	font-size: 1rem;
	cursor: pointer;
}

.doe-form__submit-button:hover {
	background: #135e96;
}

.doe-form__submit-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.doe-form__messages {
	margin-bottom: 1em;
}

.doe-notice {
	padding: 0.9em 1.1em;
	border-radius: 4px;
	margin-bottom: 1em;
}

.doe-notice--error {
	background: #fbeaea;
	border: 1px solid #e0a3a3;
	color: #8a2424;
}

.doe-notice--success {
	background: #eaf6ea;
	border: 1px solid #a3d9a3;
	color: #246b24;
}

.doe-notice--closed {
	background: #f5f5f5;
	border: 1px solid #ccc;
	color: #555;
}

/* Titre / descriptif de zone */
.doe-section-title {
	margin: 2em 0 1em;
	padding-top: 1em;
	border-top: 1px solid #e2e4e7;
}

.doe-section-title__label {
	margin: 0 0 0.3em;
	font-size: 1.2rem;
}

.doe-section-title__description {
	margin: 0;
	color: #555;
	font-size: 0.9rem;
}

/* Grille matériel (Scène / Loge-autre) */
.doe-materiel-grid {
	border: 1px solid #e2e4e7;
	border-radius: 4px;
	overflow: hidden;
}

.doe-materiel-grid__title {
	font-weight: 600;
	margin-bottom: 0.5em;
	display: block;
}

.doe-materiel-grid__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0.55em 0.8em;
	border-bottom: 1px solid #eee;
}

.doe-materiel-grid__row:last-child {
	border-bottom: none;
}

.doe-materiel-grid__row:nth-child(even) {
	background: #fafafa;
}

.doe-materiel-grid__label {
	flex: 1 1 auto;
	font-weight: 500;
}

.doe-materiel-grid__qty {
	width: 70px;
	flex-shrink: 0;
}

.doe-materiel-grid__checkbox {
	display: flex;
	align-items: center;
	gap: 0.4em;
	white-space: nowrap;
	flex-shrink: 0;
}

.doe-materiel-grid__note {
	flex: 1 1 160px;
	min-width: 0;
}

/* Page de suivi du demandeur (?doe_token=...) */
.doe-tracking-page {
	background: #f0f0f1;
	margin: 0;
	padding: 24px;
}

.doe-tracking-container {
	max-width: 760px;
	margin: 0 auto;
	background: #fff;
	padding: 32px;
	border-radius: 6px;
}

.doe-tracking-status {
	font-size: 1.05rem;
}

.doe-tracking-hint {
	color: #555;
	margin-bottom: 1.5em;
}

.doe-tracking-decision {
	background: #f7f7f7;
	border-radius: 4px;
	padding: 16px 20px;
	margin: 1.5em 0;
}

.doe-tracking-decision ul {
	margin: 0.5em 0 0;
	padding-left: 1.2em;
}

.doe-readonly-summary__row {
	display: flex;
	gap: 16px;
	padding: 0.6em 0;
	border-bottom: 1px solid #eee;
}

.doe-readonly-summary__label {
	flex: 0 0 260px;
	font-weight: 600;
}

.doe-readonly-summary__value {
	flex: 1;
}

.doe-exchange-log--tracking {
	margin: 1.5em 0;
	padding: 16px 20px;
	background: #f7f7f7;
	border-radius: 4px;
}

.doe-exchange-log__entry {
	padding: 10px 0;
	border-bottom: 1px dashed #ccc;
}

.doe-exchange-log__entry:last-child {
	border-bottom: none;
}

.doe-exchange-log__meta {
	margin: 0 0 4px;
	font-size: 0.85em;
	color: #555;
}

.doe-exchange-log__message {
	margin: 0;
}

.doe-exchange-reply-form {
	margin-top: 1em;
}

.doe-exchange-reply-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.5em 0.7em;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
}

/* Surbrillance des champs modifiés en attente de validation */
.doe-field--pending {
	background: #fff8e1;
	border: 1px solid #f0c36d;
	border-radius: 4px;
	padding: 0.8em;
}

.doe-field__pending-notice {
	margin: 0.4em 0 0.6em;
	font-size: 0.85em;
	color: #8a6100;
	font-style: italic;
}

.doe-readonly-summary__row--pending {
	background: #fff8e1;
	border-radius: 4px;
}

.doe-readonly-summary__pending-notice {
	display: block;
	margin-top: 0.3em;
	font-size: 0.85em;
	color: #8a6100;
	font-style: italic;
}

.doe-tracking-hint--pending {
	background: #fff8e1;
	border: 1px solid #f0c36d;
	border-radius: 4px;
	padding: 0.8em;
	color: #8a6100;
}

/* Regroupement de champs sur la même ligne (row_line).
 * Chaque bloc à 2 champs est une grille à 2 colonnes égales (1fr 1fr) -
 * pas tout le formulaire : un champ seul reste en pleine largeur, en
 * dehors de toute logique de colonnes. Comme tous les blocs à 2 champs
 * font la même largeur totale (celle du formulaire) et le même partage
 * 1fr/1fr, leurs colonnes s'alignent automatiquement d'un bloc à
 * l'autre, sans grille unique sur tout le formulaire. Chaque champ
 * garde par ailleurs sa largeur propre selon son type à l'intérieur de
 * sa colonne (voir .doe-field--date, --time, --number, --select
 * ci-dessus) : il ne s'étire pas pour autant jusqu'au bord de la
 * colonne s'il n'en a pas besoin. */
.doe-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.2em;
}

@media (max-width: 600px) {
	.doe-form__row {
		grid-template-columns: 1fr;
	}
}

/* Titre de section : ligne séparatrice + libellé en gras, +2 taille */
.doe-section-title {
	margin: 1.8em 0 1em;
}

.doe-section-title__separator {
	border: none;
	border-top: 1px solid #ddd;
	margin: 0 0 1em;
}

.doe-section-title__label {
	font-weight: 700;
	font-size: calc(1em + 2px);
	margin: 0;
}

/* Descriptif de section (texte d'introduction seul) */
.doe-section-descrip {
	color: #555;
	margin: 0 0 1em;
}

/* Documents explicatifs ajoutés par l'admin (lecture seule demandeur) */
.doe-notice-form__label {
	font-weight: 600;
	margin: 0 0 0.4em;
}

.doe-notice-form__files {
	list-style: none;
	margin: 0;
	padding: 0;
}

.doe-notice-form__files li {
	margin-bottom: 0.3em;
}

/* Champ réservé service technique, affiché en lecture seule au demandeur */
.doe-staff-field__label {
	font-weight: 600;
	margin: 0 0 0.3em;
}

.doe-staff-field__value {
	background: #f7f7f7;
	border-radius: 4px;
	padding: 0.6em 0.8em;
	margin: 0;
}

/* Suivi des démarches administratives (visible demandeur en lecture seule) */
.doe-admin-checklist__label {
	font-weight: 600;
	margin: 0 0 0.5em;
}

.doe-admin-checklist__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92em;
}

.doe-admin-checklist__table th,
.doe-admin-checklist__table td {
	text-align: left;
	padding: 0.4em 0.6em;
	border-bottom: 1px solid #eee;
}
