/*
Theme Name: Madame Héritage
Theme URI: https://madame-heritage.fr
Template: hostinger-ai-theme
Author: korsio
Author URI: https://korsio.fr
Description: Thème enfant de Hostinger AI theme portant la charte Madame Héritage : ivoire, terracotta et sauge, titres Bodoni Moda et textes Inter, angles courts, sans ombre ni dégradé.
Version: 1.0.0
Requires at least: 5.6
Requires PHP: 8.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: madame-heritage
Tags: ai-theme
*/

/* -------------------------------------------------------------------------
   Ce fichier ne contient que ce que theme.json ne peut pas exprimer :
   la neutralisation de règles écrites en dur dans
   hostinger-ai-theme/assets/css/style.min.css, et les champs de formulaire.

   Il est chargé APRÈS le CSS du parent (voir functions.php), donc une
   spécificité égale suffit à l'emporter. Aucun !important.
   ---------------------------------------------------------------------- */

/* --- Champs de formulaire : seule exception au blanc pur -------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
	background-color: #ffffff;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: 2px;
	color: var(--wp--preset--color--page-text);
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 400;
	line-height: 1.6;
	box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: none;
}

input::placeholder,
textarea::placeholder {
	color: var(--wp--preset--color--desactive-texte);
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
.wp-block-button__link:disabled {
	background-color: var(--wp--preset--color--color-1);
	border-color: var(--wp--preset--color--grey);
	color: var(--wp--preset--color--desactive-texte);
}

/* --- Angles : le parent code 16px, 20px, 8px et 28px en dur ----------- */
/* Sélecteurs repris à l'identique de style.min.css du parent.            */

.hostinger-product-list ul.products li.product a img,
.woocommerce-shop main .wp-block-woocommerce-product-image {
	border-radius: 2px;
}

.hostinger-blog-posts-widget .post-thumbnail {
	border-radius: 2px;
}

.hostinger-blog-posts-widget .post-thumbnail img {
	border-radius: 2px;
}

.hostinger-elementor-contact-form .elementor-hts-contact-details form input,
.hostinger-elementor-contact-form .elementor-hts-contact-details form textarea {
	border-radius: 2px;
	background-color: #ffffff;
}

.hostinger-elementor-contact-form .elementor-hts-contact-details form input[type="submit"] {
	border-radius: 2px;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--page-background);
}

.hostinger-elementor-contact-form .elementor-hts-contact-details form input[type="submit"]:hover {
	background-color: var(--wp--preset--color--terracotta-hover);
}

/* --- Ombres portées : le parent en pose une sur le menu --------------- */
/* Le filet de séparation est désormais dans parts/header.html (attribut
   border du groupe). La classe .hostinger-ai-menu est conservée dans le part
   car elle porte aussi le comportement collant du parent :
   `.wp-site-blocks>.wp-block-template-part:has(>.hostinger-ai-menu)
    {position:sticky;top:0;z-index:500}` et les décalages .admin-bar.
   Il reste donc à neutraliser son ombre ici.                              */

.hostinger-ai-menu {
	box-shadow: none;
}

/* --- Bouton secondaire ------------------------------------------------ */
/* Défini dans theme.json via styles.blocks.core/button.variations.outline,
   qui exige WordPress 6.6+. Ce bloc sert de filet pour les versions
   antérieures et pour le style « outline » appliqué par le parent.        */

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 2px;
	color: var(--wp--preset--color--secondary);
	box-shadow: none;
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):focus {
	background-color: var(--wp--preset--color--sauge-hover);
	border-color: var(--wp--preset--color--sauge-hover);
	color: var(--wp--preset--color--page-background);
}

/* --- Séparateurs : 1px, que theme.json rend mal sur core/separator ----- */

.wp-block-separator {
	background-color: transparent;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--grey);
	opacity: 1;
}

.wp-block-separator.has-background {
	border-bottom-width: 1px;
	padding: 0;
}

/* --- Titres : jamais de gras hérité ----------------------------------- */

h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.wp-block-post-title,
.wp-block-site-title {
	font-family: var(--wp--preset--font-family--bodoni-moda);
	font-weight: 400;
	line-height: 1.15;
}

/* --- Couleurs et graisses codées en dur dans le CSS du parent --------- */
/* Relevé exhaustif : 6 × #000, 5 × #fff, #dadce0, #ccc.                  */

/* style.min.css : `.hostinger-ai-font-bold,.hostinger-ai-site-title a{font-weight:700}`
   Non corrigeable dans parts/header.html : la règle du parent vise le <a>
   interne, alors que l'attribut fontWeight du bloc site-title s'applique au
   conteneur — une règle directe sur l'enfant bat toujours l'héritage.
   La famille, elle, s'hérite : elle est déclarée dans le part via
   "fontFamily":"bodoni-moda" et n'a plus besoin d'être répétée ici.
   La classe .hostinger-ai-site-title est conservée dans le part car elle
   masque le titre quand un logo est présent :
   `.hostinger-ai-menu .wp-block-group:has(>.wp-block-site-logo img)
    .hostinger-ai-site-title{display:none}`.                                */
.hostinger-ai-site-title a {
	font-weight: 400;
}

/* Inter s'arrête à 600 : à 700 le navigateur synthétiserait un faux gras. */
.hostinger-ai-font-bold {
	font-weight: 600;
}

/* style.min.css : `.hostinger-ai-site-navigation a:hover,
   .hostinger-ai-site-title a:hover{border-bottom:1px solid #000}` */
.hostinger-ai-site-navigation a:hover,
.hostinger-ai-site-title a:hover {
	border-bottom-color: var(--wp--preset--color--grey);
}

body.hostinger-ai-builder-elementor nav .current-menu-item,
body.hostinger-ai-builder-gutenberg nav .current-menu-item {
	border-bottom-color: var(--wp--preset--color--primary);
}

/* Formes décoratives du hero boutique : #fff en fond de section. */
.hostinger-ai-hero-for-online-store-2 > .wp-block-group:before,
.hostinger-ai-hero-for-online-store-2 > .wp-block-group:after {
	background: var(--wp--preset--color--page-background);
}

.hostinger-elementor-contact-form .elementor-hts-contact-details form input,
.hostinger-elementor-contact-form .elementor-hts-contact-details form textarea {
	border-color: var(--wp--preset--color--grey);
}

.elementor-hts-contact-details-white-background form label {
	color: var(--wp--preset--color--page-text);
}

.elementor-hts-contact-details-white-background form input[type="submit"] {
	border: 1px solid var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary);
}

.elementor-hts-contact-details-white-background form input[type="submit"]:hover {
	background-color: var(--wp--preset--color--sauge-hover);
	border-color: var(--wp--preset--color--sauge-hover);
	color: var(--wp--preset--color--page-background);
}

/* DETTE CONNUE — non corrigée, décision du 30/08/2026.
   hostinger-ai-theme/assets/css/style.min.css impose
   `.hostinger-elementor-contact-form .elementor-hts-contact-details form
    input[type=submit]:disabled { background-color:#ccc!important }`.
   Le #ccc est un gris froid hors charte. Aucune spécificité ne bat un
   !important, et patcher le parent serait effacé à la prochaine mise à jour.
   État rare et peu visible : on l'accepte tel quel.

   Le spinner de soumission (`border-top-color:#fff`) reste en blanc pur sur
   fond terracotta : lisible et conforme, laissé tel quel. */

/* --- Header non collant ------------------------------------------------
   Le parent fige le header au défilement :
   `.wp-site-blocks>.wp-block-template-part:has(>.hostinger-ai-menu)
    {position:sticky;top:0;z-index:500}` (style.min.css), plus deux règles
   .admin-bar qui lui donnent un décalage.

   Sur une fiche produit c'est la barre de rappel de panier qui doit occuper
   le haut de la fenêtre, pas le menu. On rend donc le header au flux normal.

   Spécificité identique à celle du parent — 3 classes, :has() comptant pour
   son argument le plus spécifique — et cette feuille est chargée après la
   sienne, donc elle l'emporte sans !important.                            */

/* Deux mécanismes distincts, sur DEUX éléments différents :

   a. l'enveloppe .wp-block-template-part, figée par style.min.css du parent ;
   b. le groupe .hostinger-ai-menu lui-même, si le réglage « Position : Fixe »
      de l'éditeur de site est activé dessus. WordPress émet alors sa propre
      règle sur le groupe, dans core-block-supports-inline-css, imprimé APRÈS
      les feuilles mises en file — d'où une spécificité de classe qui suffit
      à l'emporter. Neutraliser (a) seul laissait donc (b) intact.

   Le groupe repasse en `relative` et non en `static`, pour rester le bloc
   conteneur d'un éventuel sous-menu positionné en absolu. */

.wp-site-blocks > .wp-block-template-part:has( > .hostinger-ai-menu ),
.admin-bar .wp-site-blocks > .wp-block-template-part:has( > .hostinger-ai-menu ) {
	position: static;
	top: auto;
	z-index: auto;
}

.wp-site-blocks .wp-block-group.hostinger-ai-menu,
.wp-site-blocks .wp-block-group.hostinger-ai-menu-wrapper {
	position: relative;
	top: auto;
	z-index: auto;
}
