/*
Theme Name: Textaz
Theme URI: https://textaz.fr
Author: Textaz
Author URI: https://textaz.fr
Description: Thème prêt à l’emploi de Textaz, atelier d’impression textile en Sarthe. À l’activation, il crée les pages et règle le site ; formulaire de maquette, référencement et sécurité intégrés, sans extension. « Vos couleurs, de A à Z. »
Version: 1.2.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: textaz
Tags: block-patterns, full-site-editing, custom-colors, editor-style, one-column, wide-blocks
*/

/* ---------- Mot-symbole ---------- */
.textaz-wordmark a {
	text-decoration: none;
	color: inherit;
}
.textaz-wordmark .textaz-az {
	color: var(--wp--preset--color--accent);
}
.has-ink-background-color .textaz-wordmark .textaz-az,
.has-ink-deep-background-color .textaz-wordmark .textaz-az {
	color: var(--wp--preset--color--accent-light);
}

/* ---------- Boutons : retour au clic (scale), survol réservé à la souris ---------- */
.wp-element-button,
.wp-block-button__link {
	transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 200ms ease, filter 200ms ease;
}
.wp-element-button:active,
.wp-block-button__link:active {
	transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
	.is-style-outline .wp-block-button__link:hover {
		background-color: rgba(255, 255, 255, 0.1);
	}
}

/* ---------- Focus clavier visible ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 2px;
}

/* ---------- Entrée du bandeau d'accueil (cascade courte, ease-out) ---------- */
.textaz-rise > * {
	opacity: 0;
	transform: translateY(8px);
	animation: textaz-rise 450ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.textaz-rise > *:nth-child(2) { animation-delay: 60ms; }
.textaz-rise > *:nth-child(3) { animation-delay: 120ms; }
.textaz-rise > *:nth-child(4) { animation-delay: 180ms; }
.textaz-rise > *:nth-child(5) { animation-delay: 240ms; }
.textaz-rise > *:nth-child(6) { animation-delay: 300ms; }
@keyframes textaz-rise {
	to { opacity: 1; transform: translateY(0); }
}
@keyframes textaz-fade {
	to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.textaz-rise > * {
		transform: none;
		animation: textaz-fade 200ms ease forwards;
	}
	.wp-element-button:active,
	.wp-block-button__link:active {
		transform: none;
	}
}
/* L'éditeur affiche le contenu immédiatement. */
.editor-styles-wrapper .textaz-rise > * {
	opacity: 1;
	transform: none;
	animation: none;
}

/* ---------- Questions fréquentes (bloc Détails) ---------- */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1rem 0;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
}
.wp-block-details > :not(summary) {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--slate);
}

/* ---------- Tableaux de prix ---------- */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table th,
.wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.85rem 0.75rem;
	text-align: left;
}
.wp-block-table thead th {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-weight: 600;
}
.wp-block-table {
	overflow-x: auto;
}

/* ---------- Lien d'évitement ---------- */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

/* ---------- Formulaire de demande de maquette ---------- */
.textaz-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	background: var(--wp--preset--color--sand);
	border-radius: 8px;
	padding: clamp(20px, 4vw, 32px);
}
.textaz-form__ligne {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
}
.textaz-form__champ {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}
.textaz-form__champ label {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}
.textaz-form input[type="text"],
.textaz-form input[type="email"],
.textaz-form input[type="tel"],
.textaz-form input[type="date"],
.textaz-form select,
.textaz-form textarea {
	font: inherit;
	padding: 12px 14px;
	border: 1px solid #8A93A3;
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	width: 100%;
	box-sizing: border-box;
}
.textaz-form input[type="file"] {
	font: inherit;
	padding: 10px;
	border: 1px dashed #8A93A3;
	border-radius: 6px;
	background: var(--wp--preset--color--white);
}
.textaz-form__facultatif {
	font-weight: 400;
	color: var(--wp--preset--color--slate);
}
.textaz-form__requis {
	color: var(--wp--preset--color--accent);
}
.textaz-form__envoi {
	margin: 0;
}
.textaz-form__envoi .wp-element-button {
	border: 0;
	cursor: pointer;
	width: 100%;
}
.textaz-form__rgpd {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--slate);
}
/* Champ piège : invisible pour les humains, rempli par les robots. */
.textaz-form__piege {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.textaz-form-message {
	border-radius: 6px;
	padding: 4px 18px;
	margin-bottom: 18px;
	font-weight: 600;
}
.textaz-form-message--ok {
	background: #E7F4EC;
	border: 1px solid #2F7D4F;
	color: #1D5434;
}
.textaz-form-message--erreur {
	background: #FBEAE5;
	border: 1px solid #9A3412;
	color: #7C2A0E;
}

/* ---------- Avis clients ---------- */
.textaz-avis__grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
}
.textaz-avis__carte {
	margin: 0;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	padding: 28px;
}
.textaz-avis__carte blockquote {
	margin: 0 0 12px;
	font-size: var(--wp--preset--font-size--large);
}
.textaz-avis__carte figcaption {
	color: var(--wp--preset--color--slate);
	font-size: var(--wp--preset--font-size--small);
}
.textaz-avis__note {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	border-radius: 8px;
	padding: 28px;
}
.textaz-avis__note a {
	color: var(--wp--preset--color--accent-light);
}
.textaz-avis__chiffre {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 800;
	font-size: var(--wp--preset--font-size--display);
	line-height: 1;
	margin: 0;
}

/* ---------- Repères « à compléter » (visibles par les administrateurs seulement) ---------- */
.textaz-todo {
	background: #FFF3BF;
	color: #5C4500;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}
.textaz-todo a {
	color: inherit;
}
.has-ink-deep-background-color .textaz-coordonnees a {
	color: inherit;
}

/* =====================================================================
   PAGE D'ACCUEIL — sections, cartes, estimateur, fondateur, devis
   ===================================================================== */
.textaz-accueil > .wp-block-group,
.textaz-accueil > .alignfull {
	margin-block: 0;
}
.textaz-section {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}
.textaz-section > .wp-block-heading,
.textaz-section > .textaz-surtitre {
	text-align: left;
}
.textaz-section > .wp-block-heading {
	margin-top: 8px;
	margin-bottom: var(--wp--preset--spacing--50);
}
.textaz-surtitre {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.has-ink-background-color .textaz-surtitre {
	color: var(--wp--preset--color--accent-light);
}

/* ---------- Bandeau d'accueil ---------- */
.textaz-hero .wp-block-columns {
	gap: var(--wp--preset--spacing--60);
}
.textaz-preuves {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 10px;
	font-size: var(--wp--preset--font-size--medium);
}
.textaz-preuves li {
	position: relative;
	padding-left: 30px;
}
.textaz-preuves li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.textaz-preuves strong {
	color: var(--wp--preset--color--white);
}
.textaz-hero__lien a {
	color: var(--wp--preset--color--accent-light) !important;
}
.textaz-hero__carte .textaz-form-wrap {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	border-radius: 12px;
	padding: clamp(20px, 3vw, 32px);
	box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
}
.textaz-hero__carte .textaz-form {
	background: transparent;
	padding: 0;
	gap: 14px;
}
.textaz-hero__carte a {
	color: var(--wp--preset--color--ink) !important;
}
.textaz-form__titre {
	margin: 0 0 4px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 800;
	font-size: 30px;
	line-height: 1.05;
	text-transform: uppercase;
}
.textaz-form__rassurance {
	margin: 0;
	text-align: center;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--slate);
}

/* ---------- Bande de confiance ---------- */
.textaz-confiance__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px 32px;
}
.textaz-confiance__liste li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 600;
}
.textaz-confiance__liste svg {
	flex: none;
	color: var(--wp--preset--color--accent);
}

/* ---------- Étapes A → Z ---------- */
.textaz-etapes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 16px;
	counter-reset: none;
}
.textaz-etapes__item {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	padding: 24px;
	background: var(--wp--preset--color--white);
}
.textaz-etapes__item--accent {
	border: 2px solid var(--wp--preset--color--accent);
	padding: 23px;
}
.textaz-etapes__lettre {
	display: block;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 800;
	font-size: 48px;
	line-height: 1;
	color: var(--wp--preset--color--ink);
}
.textaz-etapes__item--accent .textaz-etapes__lettre {
	color: var(--wp--preset--color--accent);
}
.textaz-etapes h3,
.textaz-cartes h3,
.textaz-engagements h3 {
	margin: 12px 0 8px;
	font-family: var(--wp--preset--font-family--barlow);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	text-transform: none;
	line-height: 1.3;
}
.textaz-etapes p,
.textaz-cartes p,
.textaz-engagements p {
	margin: 0;
	color: var(--wp--preset--color--slate);
	font-size: 16px;
	line-height: 1.55;
}

/* ---------- Fondateur ---------- */
.textaz-fondateur {
	display: grid;
	grid-template-columns: minmax(200px, 340px) 1fr;
	gap: var(--wp--preset--spacing--60);
	align-items: start;
}
.textaz-fondateur__photo {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 16px;
	display: block;
}
.textaz-fondateur__monogramme {
	aspect-ratio: 1;
	border-radius: 16px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 800;
	font-size: clamp(64px, 9vw, 112px);
	letter-spacing: 0.04em;
	position: relative;
	overflow: hidden;
}
.textaz-fondateur__initiales {
	position: relative;
	z-index: 1;
}
.textaz-fondateur__monogramme::after {
	content: "";
	position: absolute;
	right: -20%;
	bottom: -20%;
	width: 70%;
	height: 70%;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	opacity: 0.9;
	z-index: 0;
}
.textaz-fondateur__monogramme {
	z-index: 0;
}
.textaz-fondateur__texte h2 {
	margin: 8px 0 20px;
}
.textaz-fondateur__bio {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.6;
	margin: 0 0 16px;
}
.textaz-fondateur__signature {
	margin: 0 0 24px;
	color: var(--wp--preset--color--slate);
}
.textaz-fondateur__signature strong {
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--large);
}
.textaz-fondateur__faits {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px 24px;
	margin: 0 0 20px;
	padding: 20px 0 0;
	border-top: 1px solid var(--wp--preset--color--line);
}
.textaz-fondateur__fait dt {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.textaz-fondateur__fait dd {
	margin: 4px 0 0;
	font-size: 16px;
	line-height: 1.5;
}
.textaz-fondateur__contact {
	margin: 0;
	font-weight: 600;
}

/* ---------- Cartes « Pour qui » ---------- */
.textaz-cartes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.textaz-carte {
	position: relative;
	background: var(--wp--preset--color--white);
	border-radius: 10px;
	padding: 28px 28px 56px;
	transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 200ms ease;
}
.textaz-carte h3 a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.textaz-carte h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 10px;
}
.textaz-carte__plus {
	margin-top: 14px !important;
	font-weight: 600;
	color: var(--wp--preset--color--ink) !important;
}
.textaz-carte__fleche {
	position: absolute;
	left: 28px;
	bottom: 20px;
	font-size: 22px;
	color: var(--wp--preset--color--accent);
	transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
	.textaz-carte:hover {
		transform: translateY(-2px);
		box-shadow: 0 16px 32px -20px rgba(15, 27, 45, 0.45);
	}
	.textaz-carte:hover .textaz-carte__fleche {
		transform: translateX(4px);
	}
}
.textaz-carte:focus-within {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 2px;
}

/* ---------- Estimateur ---------- */
.textaz-estimateur {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 24px;
	align-items: stretch;
}
.textaz-estimateur__reglages {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: clamp(20px, 3vw, 32px);
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.textaz-estimateur__champ {
	margin: 0;
	border: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.textaz-estimateur__champ > label,
.textaz-estimateur__champ legend {
	font-weight: 600;
	padding: 0;
}
.textaz-estimateur__qte {
	display: flex;
	align-items: center;
	gap: 16px;
}
.textaz-estimateur__qte input[type="range"] {
	flex: 1;
	accent-color: var(--wp--preset--color--accent);
	min-height: 44px;
}
.textaz-estimateur__qte input[type="number"] {
	width: 96px;
	font: inherit;
	font-weight: 600;
	font-size: 20px;
	padding: 10px 12px;
	border: 1px solid #8A93A3;
	border-radius: 6px;
	text-align: center;
}
.textaz-choix {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-weight: 400 !important;
	cursor: pointer;
}
.textaz-choix input {
	width: 20px;
	height: 20px;
	accent-color: var(--wp--preset--color--accent);
}
.textaz-estimateur__resultat {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	border-radius: 12px;
	padding: clamp(20px, 3vw, 32px);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.textaz-estimateur__resultat p {
	margin: 0;
}
.textaz-estimateur__libelle {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-light);
}
.textaz-estimateur__total {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 800;
	font-size: clamp(56px, 8vw, 84px);
	line-height: 1;
}
.textaz-estimateur__detail {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}
.textaz-estimateur__palier {
	color: var(--wp--preset--color--accent-light);
	min-height: 1.6em;
}
.textaz-estimateur__inclus {
	color: var(--wp--preset--color--mist);
	font-size: var(--wp--preset--font-size--small);
	margin-top: auto !important;
	padding-top: 12px;
}
.textaz-estimateur__cta {
	display: block;
	text-align: center;
	margin-top: 8px;
	color: var(--wp--preset--color--white) !important;
	text-decoration: none !important;
}
.textaz-estimateur__grille {
	grid-column: 1 / -1;
}
.textaz-estimateur__grille summary {
	cursor: pointer;
	font-weight: 600;
}
.textaz-estimateur__grille table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}
.textaz-estimateur__grille th,
.textaz-estimateur__grille td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* ---------- Engagements ---------- */
.textaz-engagements {
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 32px;
}
.textaz-engagements svg {
	color: var(--wp--preset--color--accent-light);
}
.textaz-engagements h3 {
	color: var(--wp--preset--color--white);
}
.textaz-engagements p {
	color: var(--wp--preset--color--mist);
}

/* ---------- Avis : la section disparaît quand elle est vide ---------- */
.textaz-section--avis:not(:has(.textaz-avis, .textaz-todo)) {
	display: none;
}
.textaz-avis h2 {
	margin-top: 0;
}

/* ---------- Contenu éditable de l'accueil ---------- */
.textaz-section--contenu {
	border-top: 1px solid var(--wp--preset--color--line);
}
.textaz-section--contenu h2 {
	font-size: clamp(30px, 4vw, 40px);
	margin-top: var(--wp--preset--spacing--50);
}
.textaz-section--contenu h2:first-child {
	margin-top: 0;
}

/* ---------- Demande de maquette finale ---------- */
.textaz-suite {
	padding-left: 22px;
	display: grid;
	gap: 10px;
}
.textaz-devis__humain {
	font-weight: 600;
	border-left: 3px solid var(--wp--preset--color--accent);
	padding-left: 14px;
}
.textaz-devis .textaz-form {
	background: var(--wp--preset--color--white);
	box-shadow: 0 16px 40px -28px rgba(15, 27, 45, 0.5);
}

/* ---------- Bouton fixe sur mobile ---------- */
.textaz-cta-mobile {
	display: none;
}
@media (max-width: 781px) {
	.textaz-cta-mobile {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 50;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 0.96);
		border-top: 1px solid var(--wp--preset--color--line);
		margin: 0 !important;
	}
	.textaz-cta-mobile {
		transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), opacity 200ms ease;
	}
	.textaz-cta-mobile.is-hidden {
		transform: translateY(100%);
		opacity: 0;
		pointer-events: none;
	}
	.textaz-cta-mobile .wp-block-button__link {
		width: 100%;
		padding-top: 14px;
		padding-bottom: 14px;
	}
	.textaz-accueil {
		padding-bottom: 76px;
	}
	.textaz-fondateur,
	.textaz-estimateur {
		grid-template-columns: 1fr;
	}
	.textaz-fondateur__visuel {
		max-width: 240px;
	}
}

/* ---------- Pied de page : listes sans puces ---------- */
footer .wp-block-list {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 6px;
}
