/*
Theme Name: Auto's Edition
Theme URI: https://www.autos-edition.be
Author: Basothan
Description: Thème sur mesure pour Auto's Edition, garage de voitures d'occasion à Dottignies (Mouscron). Noir, crème et rouge, typographies Archivo et Instrument Sans hébergées localement.
Version: 1.3.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: autos-edition
*/

/* ---------- Base ---------- */
h1, h2,
.wp-block-heading:is(h1, h2),
.ae-display {
	font-stretch: 125%;
	overflow-wrap: break-word;
}

mark.has-inline-color { background-color: transparent; }

/* Pas d'espace entre l'en-tête, le contenu et le pied de page */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks > main { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* ---------- Surtitre (style de paragraphe) ---------- */
.is-style-surtitre {
	font-size: 14px !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.4;
}
.is-style-surtitre:not(.has-text-color) { color: var(--wp--preset--color--rouge); }

/* ---------- Damier (style de séparateur) ---------- */
.wp-block-separator.is-style-damier {
	border: 0 !important;
	height: 12px;
	width: 100%;
	max-width: none;
	opacity: 1;
	background-color: transparent !important;
	background-image: conic-gradient(#F3F1EC 25%, #0E0E0F 0 50%, #F3F1EC 0 75%, #0E0E0F 0);
	background-size: 12px 12px;
}
.wp-block-separator.is-style-damier.ae-damier-court { width: 48px; height: 16px; background-size: 16px 16px; margin-left: 0; }

/* ---------- Cartes (styles de groupe) ---------- */
.is-style-carte {
	background: #FFFFFF;
	border: 1px solid #E2DED6;
	border-radius: 4px;
}
.is-style-carte-sombre {
	background: #18181A;
	border: 1px solid #2E2E31;
	border-radius: 4px;
	color: #F3F1EC;
}
.is-style-emplacement {
	border: 2px dashed #CFCAC1;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.5);
	color: #6B675F;
	text-align: center;
}

/* ---------- En-tête ---------- */
.ae-entete .wp-block-navigation a:hover { color: #FF6B70; }
.ae-entete .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #0E0E0F !important;
	color: #F3F1EC !important;
	padding: 32px 24px;
}
.ae-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 20px; font-size: 22px; }
.ae-logo img { height: 22px !important; width: auto !important; }
.ae-pied .ae-logo img { height: 18px !important; }

.ae-langues { margin: 0; color: #9C988F; font-weight: 600; white-space: nowrap; }
.ae-langues:empty { display: none; }
.ae-langues a { color: #C9C5BD; text-decoration: none; }
.ae-langues a:hover { color: #FF6B70; }
.ae-langues .ae-langue-active { color: #F3F1EC; }

/* ---------- Média + texte plein cadre ---------- */
.ae-split.wp-block-media-text { min-height: clamp(440px, 52vw, 720px); }
.ae-split.wp-block-media-text > .wp-block-media-text__content {
	padding: clamp(56px, 8vw, 128px) clamp(16px, 5vw, 72px);
}
.ae-split.wp-block-media-text > .wp-block-media-text__content > * { max-width: 620px; }
.ae-split.wp-block-media-text > .wp-block-media-text__content > * + * { margin-block-start: 24px; }
@media (max-width: 781px) {
	.ae-split.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media { min-height: 420px; }
	.ae-split.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content { grid-row: 1; }
	.ae-split.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__media { grid-row: 2; }
	.ae-entete .ae-logo img { height: 15px !important; }
	.ae-entete .wp-block-group.is-layout-flex { flex-wrap: nowrap; gap: 12px; }
	.ae-entete .wp-block-navigation { margin-left: auto; }
}

/* ---------- Images ---------- */
.ae-photo img { border-radius: 4px; object-fit: cover; width: 100%; }
.ae-photo-haute img { height: clamp(360px, 42vw, 560px); }
.ae-photo-moyenne img { height: clamp(280px, 34vw, 480px); }
.ae-decale { margin-top: clamp(24px, 3.4vw, 48px) !important; }
.ae-galerie .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.ae-galerie .wp-block-image { margin: 0; overflow: hidden; }
.ae-galerie .wp-block-image img { transition: transform 0.4s ease; }
.ae-galerie .is-style-carte-sombre:hover img { transform: scale(1.03); }
.wp-block-column > .is-style-carte, .wp-block-column > .is-style-carte-sombre { height: 100%; box-sizing: border-box; }

/* Liseré damier en haut du pied de page */
.ae-pied {
	background-image: conic-gradient(#F3F1EC 25%, #0E0E0F 0 50%, #F3F1EC 0 75%, #0E0E0F 0);
	background-size: 12px 12px;
	background-repeat: repeat-x;
	background-position: top left;
}

/* ---------- Boutons ---------- */
.wp-block-button .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
.wp-block-button.is-style-outline > .wp-block-button__link { border-width: 1px; }
.wp-block-button__link:hover { filter: brightness(1.08); }
.ae-bouton-petit .wp-block-button__link { min-height: 44px; padding: 10px 16px; font-size: 15px; white-space: nowrap; }

/* ---------- Divers ---------- */
.ae-etoiles { letter-spacing: 3px; color: #C98A00; }
.ae-bandeau-infos p { margin: 0; }
.ae-numero { font-family: var(--wp--preset--font-family--titres); font-stretch: 125%; font-weight: 800; }
.ae-lien-souligne a { text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }

/* ---------- Pages de texte ---------- */
.ae-page-texte h2 { font-size: clamp(22px, 2.4vw, 30px); margin-top: 48px; }
.ae-page-texte h3 { margin-top: 32px; }
.ae-page-texte table { border-collapse: collapse; width: 100%; font-size: 15px; }
.ae-page-texte th, .ae-page-texte td { border: 1px solid #E2DED6; padding: 10px 12px; text-align: left; vertical-align: top; }
.ae-page-texte th { background: #E9E6E0; }

/* ---------- Formulaire de reprise ---------- */
.ae-form { display: flex; flex-direction: column; gap: 28px; }
.ae-form fieldset { margin: 0; border: 1px solid #E2DED6; border-radius: 4px; background: #FFFFFF; padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ae-form legend { padding: 0 8px; font-family: var(--wp--preset--font-family--titres); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: 20px; }
.ae-form-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.ae-form label.ae-champ { display: block; font-size: 14px; font-weight: 700; color: #3D3A36; }
.ae-form label.ae-champ > input, .ae-form label.ae-champ > select, .ae-form label.ae-champ > textarea { display: block; margin-top: 6px; }
.ae-form input[type="text"], .ae-form input[type="tel"], .ae-form input[type="email"], .ae-form input[type="number"], .ae-form select, .ae-form textarea {
	font: inherit; font-weight: 500; min-height: 48px; padding: 0 14px; border: 1px solid #CFCAC1; border-radius: 4px; background: #FFFFFF; color: #0E0E0F; box-sizing: border-box; width: 100%;
}
.ae-form textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
.ae-form input:focus, .ae-form select:focus, .ae-form textarea:focus { outline: 2px solid #D4131B; outline-offset: 1px; }
.ae-form .ae-req { color: #D4131B; }
.ae-form .ae-aide { font-weight: 500; color: #6B675F; }
.ae-form .ae-choix { display: flex; flex-wrap: wrap; gap: 10px; }
.ae-form .ae-choix label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid #CFCAC1; border-radius: 4px; background: #FFFFFF; font-weight: 700; cursor: pointer; }
.ae-form .ae-choix input { accent-color: #D4131B; width: 18px; height: 18px; }
.ae-form .ae-dommage { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; background: #F8F6F2; border: 1px dashed #CFCAC1; border-radius: 4px; padding: 18px; }
.ae-form .ae-dommage[hidden] { display: none; }
.ae-form .ae-photos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 160px; border: 2px dashed #CFCAC1; border-radius: 4px; background: #F8F6F2; cursor: pointer; text-align: center; padding: 20px; font-weight: 700; }
.ae-form .ae-photos input[type="file"] { font-weight: 500; max-width: 100%; }
.ae-form .ae-case { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.ae-form .ae-case input { width: 22px; height: 22px; margin-top: 2px; accent-color: #D4131B; flex-shrink: 0; }
.ae-form .ae-envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.ae-form button[type="submit"] { min-height: 56px; padding: 0 32px; background: #D4131B; color: #FFFFFF; border: 0; border-radius: 4px; font: inherit; font-weight: 700; font-size: 18px; cursor: pointer; }
.ae-form button[type="submit"]:hover { background: #B0101A; }
.ae-form .ae-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ae-message { background: #FFFFFF; border: 1px solid #E2DED6; border-top: 4px solid #D4131B; border-radius: 4px; padding: clamp(28px, 5vw, 56px); }
.ae-message.ae-erreur { border-top-color: #0E0E0F; }
.ae-message h2 { margin: 0 0 12px; }
