/*
	LA FEUILLE COMMUNE DES APPLICATIONS
	`css/app.css` — version 1.0 (lot audit 10)

	La charte du site, mise à la disposition des Moteurs : ses couleurs, ses polices et ses formes en variables, et une vingtaine de classes pour ce qu'une application compose (titres, textes, formulaires, choix, boutons, messages, tableaux, progression). Le socle la charge avant la feuille propre d'un Moteur, une fois par page (`model/app-engine.php` 1.12) : un Moteur s'appuie sur elle, et n'écrit dans la sienne que ce qui lui est propre.

	Tout est ancré sur le bloc que pose le socle (`.app`) : rien ne touche au reste de la page. Les valeurs sont relevées dans `css/style.css` ; quand la charte du site change, elles changent ici. La description, avec des exemples, est dans `bo/cms/doc/applications-charte.md`.
*/

/* Les variables : couleurs, polices, formes. */

.app
{
	--app-paper: #fffdf5;
	--app-panel: #fff3db;
	--app-panel-hover: #fff1d4;
	--app-ink: #000;
	--app-brown: #371a01;
	--app-red: #dd0005;
	--app-red-dark: #bb0006;
	--app-grey: #a3a3a3;
	--app-grey-dark: #5d5d5d;
	--app-grey-darker: #2f2f2f;
	--app-line: #c8c8c8;
	--app-table: #faf9f8;
	--app-table-head: #d1d1d1;
	--app-table-stripe: #f1f1f1;
	--app-note: #fff1b8;
	--app-ok: #3f6b2a;

	--app-font-title: "Baskerv", serif;
	--app-font-text: "Andada", Times, serif;
	--app-font-ui: "akzidenz", Helvetica, sans-serif;
	--app-font-display: "LibreCaslonCondensed-regular", serif;

	--app-radius: 3px;
	--app-rule: 2pt solid var(--app-grey);
	--app-rule-focus: 2pt solid var(--app-grey-dark);
	--app-gap: 0.6em;
}

/* Les titres et les textes. */

.app .app-title
{
	margin: 0 0 8pt;
	font-family: var(--app-font-title);
	font-size: 26pt;
	font-weight: normal;
	line-height: 1.15;
	text-indent: 0;
	text-align: left;
	letter-spacing: normal;
}

.app .app-heading
{
	margin: 14pt 0 6pt;
	font-family: var(--app-font-ui);
	font-size: 12pt;
	font-weight: normal;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.12rem;
	text-align: left;
}

.app .app-lead
{
	margin: 0 0 14pt;
	font-family: var(--app-font-text);
	font-style: italic;
	font-size: 14pt;
	line-height: 1.25;
	text-indent: 0;
	color: var(--app-red);
}

.app .app-text
{
	margin: 0 0 8pt;
	font-family: var(--app-font-text);
	font-size: 13.5pt;
	line-height: 20pt;
	text-indent: 0;
}

.app .app-hint,
.app .app-meta
{
	margin: 4pt 0;
	font-family: var(--app-font-ui);
	font-size: 10pt;
	line-height: 1.4;
	text-indent: 0;
	color: var(--app-grey-dark);
}

.app .app-meta
{
	color: var(--app-brown);
}

.app .app-text a,
.app .app-hint a,
.app .app-message a
{
	color: var(--app-red);
}

.app .app-text a:hover,
.app .app-hint a:hover,
.app .app-message a:hover
{
	color: var(--app-grey-dark);
}

/* Le panneau : le fond crème des articles du site. */

.app .app-panel
{
	margin: 6pt 0;
	padding: 16pt;
	background: var(--app-panel);
}

.app .app-panel:hover
{
	background: var(--app-panel-hover);
}

/* Les formulaires : des champs soulignés, comme ceux de la recherche et du contact. */

.app .app-form
{
	margin: 8pt 0;
	font-family: var(--app-font-ui);
	text-indent: 0;
}

.app .app-field
{
	margin: 0 0 12pt;
}

.app .app-label
{
	display: block;
	margin: 0 0 2pt;
	font-family: var(--app-font-ui);
	font-size: 10.5pt;
	letter-spacing: 0.05rem;
}

.app .app-input,
.app .app-select,
.app .app-textarea
{
	box-sizing: border-box;
	width: 100%;
	max-width: 32em;
	margin: 0;
	padding: 3pt 2pt;
	border: none;
	border-bottom: var(--app-rule);
	border-radius: 0;
	background: transparent;
	font-family: var(--app-font-ui);
	font-size: 12.5pt;
	color: inherit;
	transition: border-color 0.3s;
}

.app .app-textarea
{
	min-height: 8em;
	resize: vertical;
}

.app .app-input:hover,
.app .app-input:focus,
.app .app-select:hover,
.app .app-select:focus,
.app .app-textarea:hover,
.app .app-textarea:focus
{
	outline: none;
	border-bottom: var(--app-rule-focus);
}

.app .app-input.is-wrong,
.app .app-select.is-wrong,
.app .app-textarea.is-wrong
{
	border-bottom-color: var(--app-red);
}

/* La question de la garde, que pose le socle dans tout formulaire public : un champ court. */

.app .app-guard .app-input
{
	width: 6em;
}

/* Les choix : boutons radio et cases, en pastilles et carrés d'un rouge franc, comme le quiz. */

.app .app-choices
{
	margin: 6pt 0 12pt;
	padding: 0;
	border: none;
	list-style: none;
}

.app .app-choice
{
	display: block;
	margin: 4pt 0;
	font-family: var(--app-font-text);
	font-size: 13.5pt;
	line-height: 1.4;
	cursor: pointer;
}

.app .app-choice input[type="radio"],
.app .app-choice input[type="checkbox"]
{
	appearance: none;
	-webkit-appearance: none;
	width: 1.05em;
	height: 1.05em;
	margin: 0 0.5em -0.15em 0;
	padding: 0;
	border: 2px solid var(--app-red);
	background: transparent;
	cursor: pointer;
}

.app .app-choice input[type="radio"]
{
	border-radius: 50%;
}

.app .app-choice input[type="checkbox"]
{
	border-radius: var(--app-radius);
}

.app .app-choice input:checked
{
	background: var(--app-red);
	box-shadow: inset 0 0 0 2px var(--app-paper);
}

.app .app-choice input:focus-visible
{
	outline: 2px solid var(--app-grey-dark);
	outline-offset: 2px;
}

/* Les boutons : rouge pour l'action principale, gris pour les autres, gris foncé pour l'élément courant. */

.app .app-actions
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--app-gap);
	margin: 12pt 0 6pt;
}

.app .app-button
{
	display: inline-block;
	margin: 0;
	padding: 3pt 10pt;
	border: none;
	border-radius: 0;
	background: var(--app-red);
	color: #fff;
	font-family: var(--app-font-ui);
	font-size: 12pt;
	letter-spacing: 0.12rem;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s;
}

.app .app-button:hover,
.app .app-button:focus-visible
{
	background: var(--app-red-dark);
	color: #fff;
	text-decoration: none;
}

.app .app-button.is-quiet
{
	background: var(--app-grey);
}

.app .app-button.is-quiet:hover,
.app .app-button.is-quiet:focus-visible
{
	background: var(--app-grey-dark);
}

.app .app-button.is-current
{
	background: var(--app-grey-dark);
}

.app .app-button.is-current:hover
{
	background: var(--app-grey-darker);
}

.app .app-button:disabled,
.app .app-button.is-disabled
{
	opacity: 0.45;
	cursor: default;
}

/* Les messages : une réponse, un refus, une indication. */

.app .app-message
{
	margin: 8pt 0;
	padding: 8pt 12pt;
	border-left: 4px solid var(--app-grey);
	background: var(--app-paper);
	font-family: var(--app-font-ui);
	font-size: 11pt;
	line-height: 1.45;
	text-indent: 0;
}

.app .app-message.is-ok
{
	border-left-color: var(--app-ok);
}

.app .app-message.is-error
{
	border-left-color: var(--app-red);
	color: var(--app-red-dark);
}

.app .app-message.is-info
{
	border-left-color: var(--app-brown);
	background: var(--app-note);
}

/* Les tableaux : ceux du site, rayés. */

.app .app-table
{
	width: 100%;
	margin: 8pt 0;
	border-collapse: collapse;
	background: var(--app-table);
	font-family: var(--app-font-ui);
	font-size: 10.5pt;
}

.app .app-table th
{
	padding: 4pt 6pt;
	background: var(--app-table-head);
	text-align: left;
	font-weight: normal;
	letter-spacing: 0.05rem;
}

.app .app-table td
{
	padding: 4pt 6pt;
	vertical-align: top;
}

.app .app-table tr:nth-child(2n+1) td
{
	background: var(--app-table-stripe);
}

/* La progression, le score, les pastilles. */

.app .app-progress
{
	height: 6px;
	margin: 6pt 0;
	background: var(--app-line);
	overflow: hidden;
}

.app .app-progress > span
{
	display: block;
	height: 100%;
	background: var(--app-red);
	transition: width 0.3s;
}

.app .app-score
{
	margin: 8pt 0;
	text-indent: 0;
	font-family: var(--app-font-display);
	font-size: 32pt;
	line-height: 1;
}

.app .app-badge
{
	display: inline-block;
	padding: 1pt 6pt;
	border-radius: var(--app-radius);
	background: var(--app-grey);
	color: #fff;
	font-family: var(--app-font-ui);
	font-size: 9pt;
	letter-spacing: 0.08rem;
	vertical-align: middle;
}

.app .app-badge.is-red
{
	background: var(--app-red);
}

/* Une liste sans puces, et ce qui ne se lit qu'à l'écran de lecture. */

.app .app-list
{
	margin: 6pt 0;
	padding: 0;
	list-style: none;
}

.app .app-list > li
{
	margin: 0 0 6pt;
}

.app .app-sr
{
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Sur un petit écran. */

@media (max-width: 450px)
{
	.app .app-title
	{
		font-size: 21pt;
	}

	.app .app-actions
	{
		flex-direction: column;
		align-items: stretch;
	}

	.app .app-button
	{
		text-align: center;
	}
}
