/*
 * Africa Smile AVID — décors de la charte graphique 2026.
 * Les couleurs, polices et tailles viennent de theme.json (variables --wp--preset--*).
 */

:root {
	--as-jaune: var(--wp--preset--color--jaune, #fdc118);
	--as-jaune-clair: var(--wp--preset--color--jaune-clair, #fee08b);
	--as-rouge: var(--wp--preset--color--rouge, #fe0506);
	--as-rouge-fonce: var(--wp--preset--color--rouge-fonce, #8f0001);
	--as-bleu: var(--wp--preset--color--bleu, #2888c5);
	--as-bleu-fonce: var(--wp--preset--color--bleu-fonce, #00416b);
	--as-vert: var(--wp--preset--color--vert, #a4c923);
	--as-vert-fonce: var(--wp--preset--color--vert-fonce, #617d00);
	--as-rayon: var(--wp--custom--rayon, 1.1rem);
	--as-frise: linear-gradient(90deg, var(--as-vert) 0 20%, var(--as-jaune) 20% 40%, var(--as-rouge) 40% 60%, var(--as-bleu) 60% 80%, var(--as-vert) 80%);
	--as-ombre: 0 18px 50px rgba(0, 0, 0, 0.14);
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

body .wp-site-blocks > * {
	margin-block-start: 0;
}

.as-page .wp-block-post-title,
.as-page h1.wp-block-heading,
.as-page .wp-block-query-title {
	font-size: var(--wp--preset--font-size--tres-grand);
}

::selection {
	background: var(--as-jaune);
	color: #000;
}

:focus-visible {
	outline: 3px solid var(--as-bleu);
	outline-offset: 3px;
}

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

header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	margin-block-start: 0;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part {
		top: 0;
	}
}

.as-entete {
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
	padding-block: 0.6rem;
	position: relative;
}

.as-entete::before,
.as-pied::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 7px;
	background: var(--as-frise);
}

.as-entete::before {
	inset: auto 0 -7px;
}

.as-entete .wp-block-site-logo img,
.as-entete .as-logo img {
	width: clamp(110px, 12vw, 150px);
	height: auto;
}

.as-entete .wp-block-navigation a {
	text-decoration: none;
}

.as-entete .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.4rem;
	border-bottom: 3px solid transparent;
}

.as-entete .wp-block-navigation .wp-block-navigation-item__content:hover,
.as-entete .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--as-jaune);
	color: inherit;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--as-jaune) !important;
	color: #000 !important;
	font-family: var(--wp--preset--font-family--titre);
	text-transform: uppercase;
	font-size: 1.4rem;
}

.as-entete .wp-block-button__link {
	padding: 0.65em 1.2em;
}

/* Le menu passe en mode « hamburger » dès que la place manque (au lieu de 600px par défaut). */
@media (max-width: 1080px) {
	.as-entete .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}

	.as-entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none !important;
	}
}

@media (max-width: 600px) {
	.as-entete .wp-block-button__link {
		padding: 0.55em 0.9em;
	}
}

.as-usages p.as-chiffre__nombre {
	font-size: 1.6rem;
}

/* ---------- Titres en onglet (comme la brochure) ---------- */

.is-style-onglet,
.is-style-onglet-bord {
	width: fit-content;
	max-width: 100%;
	background: var(--as-jaune);
	color: #000;
	padding: 0.38em 0.85em 0.3em;
	border-radius: 0.55em;
}

.is-style-onglet-bord {
	padding-left: 0;
	border-radius: 0 0.55em 0.55em 0;
	box-shadow: 0 0 0 100vw var(--as-jaune);
	clip-path: inset(0 0 0 -100vw round 0 0.55em 0.55em 0);
}

.is-layout-constrained > .is-style-onglet,
.is-layout-constrained > .is-style-onglet-bord {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

.is-layout-constrained > .alignwide.is-style-onglet,
.is-layout-constrained > .alignwide.is-style-onglet-bord {
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

.as-centre > .is-style-onglet,
.is-layout-constrained.as-centre > .is-style-onglet {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ---------- Textes ---------- */

.is-style-accroche {
	font-family: var(--wp--preset--font-family--accent);
	font-style: italic;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.35;
	letter-spacing: 0.01em;
}

.is-style-surtitre {
	font-family: var(--wp--preset--font-family--titre);
	font-size: 0.78rem;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	line-height: 1.6;
}

.as-centre {
	text-align: center;
}

.as-centre > * {
	margin-left: auto;
	margin-right: auto;
}

.as-centre .wp-block-buttons {
	justify-content: center;
}

.as-intro-page h1 {
	font-size: var(--wp--preset--font-size--tres-grand);
}

.as-intro {
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.6;
}

.as-lien-fleche a {
	font-weight: 700;
	text-decoration: none;
	border-bottom: 3px solid var(--as-jaune);
}

.as-lien-fleche a::after {
	content: " →";
}

.as-lien-fleche a:hover {
	color: #000;
	border-bottom-color: var(--as-rouge);
}

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

.wp-block-button__link {
	transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.wp-block-button__link:active {
	transform: scale(0.98);
}

.wp-block-button.is-style-rouge .wp-block-button__link {
	background: var(--as-rouge);
	color: #fff;
	font-size: 1.2rem;
}

.wp-block-button.is-style-rouge .wp-block-button__link:hover {
	background: var(--as-rouge-fonce);
	color: #fff;
}

.wp-block-button.is-style-contour .wp-block-button__link {
	background: transparent;
	color: currentColor;
	box-shadow: inset 0 0 0 3px currentColor;
}

.wp-block-button.is-style-contour .wp-block-button__link:hover {
	background: #000;
	color: #fff;
	box-shadow: inset 0 0 0 3px #000;
}

.wp-block-button.is-style-blanc .wp-block-button__link {
	background: #fff;
	color: #000;
}

.wp-block-button.is-style-blanc .wp-block-button__link:hover {
	background: var(--as-jaune);
	color: #000;
}

/* ---------- Fonds et sections ---------- */

.is-style-bandes {
	background: var(--as-vert) url("../images/bandes.svg") center / cover no-repeat;
}

.is-style-cadre {
	background: #fff;
	color: #000;
	border-radius: var(--as-rayon);
	padding: clamp(1.5rem, 4vw, 3.5rem);
	box-shadow: var(--as-ombre);
}

.is-style-carte {
	background: #fff;
	color: #000;
	border-radius: var(--as-rayon);
	padding: 1.75rem;
	box-shadow: var(--as-ombre);
}

.is-style-carte h3 {
	font-size: 1.3rem;
}

.is-style-carte h2 {
	font-size: 1.5rem;
}

.as-section {
	padding-block: var(--wp--preset--spacing--60);
}

.as-section--serree {
	padding-block: var(--wp--preset--spacing--50);
}

.as-fond-jaune {
	background: var(--as-jaune);
	color: #000;
}

.as-fond-jaune-clair {
	background: var(--as-jaune-clair);
	color: #000;
}

.as-fond-bleu-fonce {
	background: var(--as-bleu-fonce);
	color: #fff;
}

.as-fond-bleu-fonce a:where(:not(.wp-element-button)) {
	color: #fff;
}

.as-fond-gris {
	background: #f6f6f4;
}

/* Bandeau de séparation multicolore */
.as-frise-haut {
	position: relative;
}

.as-frise-haut::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 7px;
	background: var(--as-frise);
}

/* ---------- Accueil : héros ---------- */

.as-hero {
	padding-block: clamp(2rem, 6vw, 5rem);
}

.as-hero .wp-block-columns {
	align-items: center;
}

h1.as-hero__titre {
	display: inline;
	font-size: clamp(2.2rem, 5vw, 4.1rem);
	line-height: 1.42;
	background: var(--as-jaune);
	padding: 0.06em 0.28em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	border-radius: 0.2em;
}

h1.as-hero__titre + * {
	margin-block-start: 1.6rem;
}

/* ---------- Images ---------- */

.wp-block-image img {
	height: auto;
}

.is-style-ombre-jaune img,
.is-style-ombre-bleue img,
.is-style-ombre-rouge img {
	box-shadow: 14px 14px 0 var(--as-ombre-couleur, var(--as-jaune));
}

.is-style-ombre-jaune,
.is-style-ombre-bleue,
.is-style-ombre-rouge {
	margin-right: 14px;
	margin-bottom: 14px;
}

.is-style-ombre-bleue {
	--as-ombre-couleur: var(--as-bleu);
}

.is-style-ombre-rouge {
	--as-ombre-couleur: var(--as-rouge);
}

.as-photo-carree img {
	aspect-ratio: 1;
	object-fit: cover;
	width: 100%;
}

.as-photo-portrait img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

.as-photo-paysage img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

/* ---------- Chiffres clés ---------- */

.as-chiffre {
	border-radius: var(--as-rayon);
	padding: 1.6rem 1.5rem;
	height: 100%;
}

.as-chiffre p {
	margin: 0;
	line-height: 1.45;
	font-weight: 600;
}

p.as-chiffre__nombre {
	font-family: var(--wp--preset--font-family--titre);
	font-weight: 400;
	font-size: clamp(2.6rem, 5vw, 3.6rem);
	line-height: 1;
	margin-bottom: 0.6rem;
}

.as-chiffre--bleu { background: var(--as-bleu-fonce); color: #fff; }
.as-chiffre--jaune { background: var(--as-jaune); color: #000; }
.as-chiffre--rouge { background: var(--as-rouge); color: #000; }
.as-chiffre--vert { background: var(--as-vert); color: #000; }

/* ---------- Cartes (domaines, projets) ---------- */

.as-carte {
	background: #fff;
	border-radius: var(--as-rayon);
	overflow: hidden;
	box-shadow: var(--as-ombre);
	border-top: 7px solid var(--as-carte-couleur, var(--as-jaune));
	height: 100%;
	padding-bottom: 1.5rem;
	transition: transform 0.25s ease;
}

.as-carte:hover {
	transform: translateY(-4px);
}

.as-carte > :not(.wp-block-image) {
	padding-inline: 1.5rem;
}

.as-carte > .wp-block-image {
	margin: 0;
}

.as-carte > .wp-block-image img {
	border-radius: 0;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

.as-carte h3 {
	font-size: 1.35rem;
}

.as-carte--rouge { --as-carte-couleur: var(--as-rouge); }
.as-carte--bleu { --as-carte-couleur: var(--as-bleu); }
.as-carte--vert { --as-carte-couleur: var(--as-vert); }
.as-carte--jaune { --as-carte-couleur: var(--as-jaune); }

/* ---------- Valeurs ---------- */

p.as-valeurs__liste {
	font-family: var(--wp--preset--font-family--titre);
	text-transform: uppercase;
	font-size: clamp(1.25rem, 3vw, 2.3rem);
	line-height: 1.4;
	margin: 0;
}

/* ---------- Appels à l'engagement ---------- */

.as-appel {
	border-radius: var(--as-rayon);
	padding: clamp(1.5rem, 3vw, 2.5rem);
	height: 100%;
	display: flex;
	flex-direction: column;
}

.as-appel > .wp-block-buttons {
	margin-top: auto;
	padding-top: 1rem;
}

.as-appel h3 {
	font-size: 1.6rem;
}

.as-appel--jaune { background: var(--as-jaune); color: #000; }
.as-appel--bleu { background: var(--as-bleu-fonce); color: #fff; }
.as-appel--vert { background: var(--as-vert-fonce); color: #fff; }

/* ---------- Chronologie ---------- */

.as-etape {
	border-top: 7px solid var(--as-etape-couleur, var(--as-jaune));
	padding-top: 1rem;
}

.as-etape p.as-etape__annee {
	font-family: var(--wp--preset--font-family--titre);
	font-size: 2.2rem;
	line-height: 1;
	margin: 0 0 0.5rem;
}

.as-etape h3 {
	font-size: 1.15rem;
	margin-top: 0.4rem;
}

.as-etape--rouge { --as-etape-couleur: var(--as-rouge); }
.as-etape--bleu { --as-etape-couleur: var(--as-bleu); }
.as-etape--vert { --as-etape-couleur: var(--as-vert); }

/* ---------- Équipe ---------- */

.as-membre > .wp-block-image img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

.as-membre h3 {
	font-size: 1.1rem;
	margin-bottom: 0.2rem;
}

.as-membre p {
	margin-top: 0;
}

/* ---------- Listes ---------- */

ul.is-style-pastilles {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

ul.is-style-pastilles li {
	background: #fff;
	border: 2px solid #000;
	border-radius: 999px;
	padding: 0.35em 1em;
	font-weight: 700;
	margin: 0;
}

ul.is-style-pastilles li a {
	text-decoration: none;
}

ul.is-style-pastilles li:has(a:hover) {
	background: var(--as-jaune);
}

.as-liste-coches {
	list-style: none;
	padding-left: 0;
}

.as-liste-coches li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.6rem;
}

.as-liste-coches li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--as-jaune);
	box-shadow: inset 0 0 0 4px #fff, 0 0 0 2px #000;
}

/* ---------- Citation ---------- */

.as-citation {
	border-left: 0 !important;
	padding-left: 0 !important;
	font-style: normal;
}

.as-citation p {
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.6;
}

.as-citation p:first-child::before {
	content: "“";
	display: block;
	font-family: var(--wp--preset--font-family--titre);
	font-size: 5rem;
	line-height: 0.6;
	color: var(--as-rouge);
	margin-bottom: 0.4rem;
}

.as-citation cite {
	font-style: normal;
	font-weight: 700;
	display: block;
	margin-top: 1rem;
}

/* ---------- Questions fréquentes ---------- */

.wp-block-details {
	border-bottom: 2px solid #000;
	padding-block: 1rem;
}

.wp-block-details summary {
	font-weight: 700;
	font-size: 1.1rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--titre);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--as-rouge);
	transition: transform 0.2s;
}

.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

/* ---------- Pied de page ---------- */

.as-pied {
	position: relative;
	padding-top: calc(var(--wp--preset--spacing--50) + 7px);
	background: #fff;
}

.as-pied h2 {
	font-size: 1rem;
	letter-spacing: 0.08em;
}

.as-pied .as-logo img {
	width: 200px;
	height: auto;
}

.as-pied .as-logo-academie img {
	width: 110px;
	height: auto;
}

.as-pied .wp-block-navigation a {
	text-decoration: none;
	font-weight: 600;
}

.as-pied .wp-block-navigation a:hover {
	text-decoration: underline;
}

.as-pied__bas {
	background: #000;
	color: #fff;
	font-size: var(--wp--preset--font-size--petit);
	padding-block: 1rem;
	margin-top: var(--wp--preset--spacing--50);
}

.as-pied__bas p {
	margin: 0;
}

.as-pied__bas a {
	color: #fff;
}

/* ---------- Formulaire de contact ---------- */

.as-formulaire {
	display: grid;
	gap: 0.2rem;
}

.as-formulaire p {
	margin: 0 0 0.9rem;
}

.as-formulaire label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.as-formulaire input[type="text"],
.as-formulaire input[type="email"],
.as-formulaire select,
.as-formulaire textarea {
	box-sizing: border-box;
	width: 100%;
	font: inherit;
	padding: 0.8rem 1rem;
	border: 2px solid #000;
	border-radius: 0.6rem;
	background: #fff;
	color: #000;
}

.as-formulaire input:focus,
.as-formulaire select:focus,
.as-formulaire textarea:focus {
	outline: 3px solid var(--as-jaune);
	outline-offset: 1px;
}

.as-formulaire__ligne {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 0 1rem;
}

.as-formulaire__accord {
	display: flex;
	gap: 0.7rem;
	align-items: flex-start;
	font-size: var(--wp--preset--font-size--petit);
}

.as-formulaire__accord label {
	font-weight: 400;
}

.as-formulaire__accord input {
	width: 1.2rem;
	height: 1.2rem;
	margin-top: 0.15rem;
	accent-color: #000;
	flex-shrink: 0;
}

.as-formulaire button {
	border: 0;
	cursor: pointer;
}

.as-formulaire__piege {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.as-formulaire__retour {
	padding: 1rem 1.2rem;
	border-radius: 0.6rem;
	font-weight: 700;
}

.as-formulaire__retour--ok {
	background: var(--as-vert);
}

.as-formulaire__retour--erreur {
	background: var(--as-rouge);
	color: #fff;
}

/* ---------- Actualités ---------- */

.as-actus .wp-block-post-featured-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--as-rayon);
}

.as-actus .wp-block-post-title a {
	text-decoration: none;
}

/* ---------- Petits écrans ---------- */

@media (max-width: 781px) {
	.as-section {
		padding-block: var(--wp--preset--spacing--50);
	}

	.is-style-cadre {
		padding: 1.25rem;
	}

	.as-inverse-mobile {
		flex-direction: column-reverse;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
