/* =====================================================================
   Immo Taroudant — couche typographique 2026 (chargée en tout dernier)
   Objectif : lisibilité. Aucune couleur ni structure de page modifiée.
   - polices système cross-plateforme (Segoe UI n'existe pas sur Mac/iOS/Android)
   - taille minimale 13 px pour le texte utile (fiches, liens, aides)
   - grille des biens : cartes ≥ 270 px (fini les 6 colonnes de 206 px)
   - titres fluides (clamp) au lieu de tailles fixes
   ===================================================================== */

/* Polices : Manrope (interface) + Playfair Display (titres), chargées par typography.php.
   Si les polices web sont désactivées, les replis système prennent le relais. */
html body.imt-page{
	--imt-font-sans: "Manrope",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
	--imt-font-serif: "Playfair Display",Georgia,"Times New Roman",Times,serif;
	font-family: var(--imt-font-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
html body.imt-page :where(input,select,textarea,button){font-family:inherit}

/* ---------- Titres : Playfair Display, échelle fluide ---------- */
html body.imt-page :is(h1,h2,h3),
html body.imt-page .imt-brand{font-family:var(--imt-font-serif)}
html body.imt-page h1{font-weight:500;letter-spacing:-.02em}
html body.imt-page :is(h2,h3){font-weight:500;letter-spacing:-.015em}
html body.imt-page :where(h1,h2,h3){text-wrap:balance}

/* ---------- Menu principal : Manrope ----------
   Le CSS additionnel fixe le menu en Georgia avec !important :
   mêmes sélecteurs ici (chargés après) ; les tailles d'origine sont conservées. */
html body.imt-page #imt-navigation > .imt-menu > li > a,
html body.imt-page:not(.page-id-24106) > header#imt-header-aligned.imt-header #imt-navigation > .imt-menu > li > a{
	font-family:var(--imt-font-sans)!important;
	font-weight:600!important;
	letter-spacing:.005em!important;
}
html body.imt-page #imt-navigation > .imt-menu > li.current-menu-item > a,
html body.imt-page:not(.page-id-24106) > header#imt-header-aligned.imt-header #imt-navigation > .imt-menu > li.current-menu-item > a{
	font-weight:800!important;
}
html body.imt-page #imt-navigation .sub-menu a{font-family:var(--imt-font-sans)!important;font-weight:500}

/* ---------- Boutons, sur-titres, prix : Manrope ---------- */
html body.imt-page .imt-button,
html body.imt-page .imt-owner-action{font-family:var(--imt-font-sans);font-weight:700;letter-spacing:.01em}
html body.imt-page .imt-eyebrow{font-family:var(--imt-font-sans);font-weight:700;letter-spacing:.14em}
html body.imt-page .imt-price{font-family:var(--imt-font-sans);font-weight:800;letter-spacing:-.01em}
html body.imt-page h3{font-size:clamp(1.3rem,1.05rem + .9vw,1.8rem)}
/* Titres des cartes : Manrope (plus lisible qu'un serif à cette taille) */
html body.imt-page .imt-card-copy h2,
html body.imt-page .imt-catalogue-grid .imt-card-copy > h2{
	font-family:var(--imt-font-sans);
	font-size:clamp(15.5px,.9rem + .25vw,17px);
	line-height:1.3;
	font-weight:700;
	letter-spacing:-.01em;
}

/* ---------- Grille des biens : cartes plus larges ---------- */
/* Spécificité alignée sur « .imt-page .imt-catalogue-grid:not(.imt-results-list) »
   (la vue « liste » de la page des biens n'est pas concernée). */
@media (min-width:621px){
	html body.imt-page .imt-catalogue-grid:not(.imt-results-list){
		grid-template-columns:repeat(auto-fill,minmax(270px,1fr));
	}
}
@media (max-width:620px){
	html body.imt-page .imt-catalogue-grid:not(.imt-results-list){grid-template-columns:1fr}
}

/* ---------- Fiches des biens : texte lisible (≥ 13 px) ---------- */
html body.imt-page .imt-catalogue-grid .imt-card-reference,
html body.imt-page .imt-card-reference{font-size:13px;letter-spacing:.02em}
html body.imt-page .imt-catalogue-grid .imt-status,
html body.imt-page .imt-status{font-size:12px;letter-spacing:.04em}
html body.imt-page .imt-catalogue-grid .imt-card-location,
html body.imt-page .imt-catalogue-grid .imt-card-facts,
html body.imt-page .imt-catalogue-grid .imt-card-facts *,
html body.imt-page .imt-catalogue-grid .imt-card-copy li,
html body.imt-page .imt-catalogue-grid .imt-card-copy p:not(.imt-price):not(.imt-card-reference){
	font-size:13.5px;
	line-height:1.45;
}
html body.imt-page .imt-catalogue-grid .imt-price,
html body.imt-page .imt-price{font-size:clamp(18px,1rem + .3vw,20px);line-height:1.25}
html body.imt-page .imt-catalogue-grid .imt-card-copy > .imt-text-link,
html body.imt-page .imt-catalogue-grid .imt-text-link,
html body.imt-page .imt-catalogue-grid .imt-card-actions,
html body.imt-page .imt-catalogue-grid .imt-card-actions *,
html body.imt-page .imt-catalogue-grid [class*="action"] span{font-size:13px}

/* ---------- Bandeau du haut, aides, petits textes ---------- */
html body.imt-page .imt-topline,
html body.imt-page .imt-topline a,
html body.imt-page .imt-topline span{font-size:13px}
html body.imt-page #imt-main .imt-natural-help,
html body.imt-page .imt-natural-help,
html body.imt-page .imt-note,
html body.imt-page .imt-origin,
html body.imt-page .imt-map-credit{font-size:13.5px;line-height:1.5}
html body.imt-page .imt-brand small{font-size:12px}
/* Bandeau « Explorez Taroudant » (surchargé à 10–11 px dans le CSS additionnel) */
html body.home.imt-page > #imt-taroudant-map-top .imt-map-copy p{font-size:13px}
/* Aide de la recherche IA dans le hero (12 px dans le CSS additionnel) */
html body.imt-page #imt-main .imt-hero-search .imt-natural-help,
html body.home.imt-page #imt-main .imt-hero-search .imt-natural-help{font-size:13.5px;line-height:1.5}
/* Petites mentions dans les cartes (« Conversions indicatives », bandeaux, avatar) */
html body.imt-page .imt-catalogue-grid small,
html body.imt-page .imt-catalogue-grid .imt-origin small{font-size:12px}
html body.imt-page .imt-card-image .imt-sidi-photo-banner,
html body.imt-page .imt-mode-avatar .imt-avatar-name{font-size:12px}
/* Note du convertisseur de devises (9 px) */
html body .itda-panel .itda-note{font-size:12px;line-height:1.4}
html body.imt-page .imt-footer-bottom{font-size:13.5px}
html body.imt-page .imt-footer p{font-size:15px;line-height:1.6}

/* ---------- Formulaires Contact Form 7 ---------- */
/* Le conteneur des champs cachés de CF7 s'affichait comme un cadre vide
   (la feuille de style de CF7 n'est pas chargée). Les champs restent envoyés. */
html body .wpcf7 .hidden-fields-container{display:none}

/* Newsletter « Recevez nos nouveaux biens » : CF7 ajoute un <p> et un <br>
   autour du champ et du bouton, ce qui cassait l'alignement côte à côte. */
html body .it-newsletter-controls > p{
	position:relative;
	display:flex;
	align-items:center;
	justify-content:center;
	gap:10px;
	width:100%;
	margin:0;
}
html body .it-newsletter-controls > p > br{display:none}
html body .it-newsletter-controls .wpcf7-form-control-wrap{flex:1 1 auto;min-width:0}
html body .it-newsletter input[type="submit"]{
	margin:0!important;
	flex:0 0 auto;
	cursor:pointer;
	transition:opacity .2s,transform .2s;
}
html body .it-newsletter input[type="submit"]:not(:disabled):hover{transform:translateY(-1px)}
/* Bouton désactivé tant que la case de consentement n'est pas cochée */
html body .it-newsletter input[type="submit"]:disabled{opacity:.55;cursor:not-allowed}
html body .it-newsletter .wpcf7-spinner{position:absolute;margin:0}
html body .it-newsletter-consent{max-width:680px;margin:12px auto 0}
html body .it-newsletter-consent label{gap:8px;cursor:pointer}
@media (max-width:650px){
	html body .it-newsletter-controls > p{flex-direction:column;align-items:stretch;gap:8px}
	html body .it-newsletter input[type="submit"]{width:100%!important}
}

/* ---------- Bouton WhatsApp flottant : design animé ----------
   Le <style> du pied de page force « background:#128c7e!important » : la classe
   est répétée ici pour l'emporter en spécificité. Position inchangée. */
@keyframes imt-wa-in{0%{opacity:0;scale:.3}60%{opacity:1;scale:1.12}80%{scale:.96}100%{opacity:1;scale:1}}
@keyframes imt-wa-pulse{
	0%{box-shadow:0 0 0 0 rgba(37,211,102,.55),0 12px 26px -8px rgba(7,94,84,.65)}
	70%{box-shadow:0 0 0 18px rgba(37,211,102,0),0 12px 26px -8px rgba(7,94,84,.65)}
	100%{box-shadow:0 0 0 0 rgba(37,211,102,0),0 12px 26px -8px rgba(7,94,84,.65)}
}
@keyframes imt-wa-ring{0%,86%,100%{rotate:0deg}88%{rotate:-16deg}90%{rotate:14deg}92%{rotate:-10deg}94%{rotate:6deg}96%{rotate:-2deg}}
@keyframes imt-wa-dot{0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,.9)}50%{box-shadow:0 0 0 4px rgba(255,255,255,0)}}

html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]{
	width:60px;
	height:60px;
	overflow:visible;
	background:radial-gradient(circle at 30% 25%,#5ef59a 0%,#25d366 42%,#128c7e 100%)!important;
	border:2px solid rgba(255,255,255,.95)!important;
	box-shadow:0 12px 26px -8px rgba(7,94,84,.65);
	transition:transform .3s cubic-bezier(.2,.8,.2,1),filter .3s;
	/* apparition (1 s après le chargement) puis onde douce */
	animation:imt-wa-in .7s cubic-bezier(.2,.8,.2,1) .9s both,imt-wa-pulse 2.8s ease-out 2s infinite;
}
/* l'icône « sonne » brièvement toutes les 6 s */
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href] svg{
	width:30px;
	height:30px;
	transform-origin:50% 55%;
	filter:drop-shadow(0 1px 1px rgba(0,0,0,.25));
	animation:imt-wa-ring 6s ease-in-out 3s infinite;
}
/* pastille « en ligne » */
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]::before{
	content:"";
	position:absolute;
	top:3px;
	right:3px;
	width:12px;
	height:12px;
	box-sizing:border-box;
	border-radius:50%;
	background:#fff;
	border:3px solid #25d366;
	animation:imt-wa-dot 2s ease-in-out infinite;
}
/* étiquette au survol (ordinateur) : reprend le title « WhatsApp +212 … » */
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]::after{
	content:attr(title);
	position:absolute;
	right:calc(100% + 14px);
	top:50%;
	transform:translate(10px,-50%);
	white-space:nowrap;
	padding:9px 14px;
	border-radius:999px;
	background:#fff;
	color:#0b3a34;
	font:700 14px/1 var(--imt-font-sans,system-ui,sans-serif);
	letter-spacing:.01em;
	box-shadow:0 10px 24px -8px rgba(0,0,0,.35);
	opacity:0;
	pointer-events:none;
	transition:opacity .25s,transform .3s cubic-bezier(.2,.8,.2,1);
}
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]:hover,
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]:focus-visible{
	transform:translateY(-3px);
	background:radial-gradient(circle at 30% 25%,#4be98c 0%,#1fbf5c 40%,#0d7064 100%)!important;
	animation-play-state:paused,paused;
}
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]:hover svg{animation-play-state:paused}
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]:hover::after,
html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]:focus-visible::after{opacity:1;transform:translate(0,-50%)}
@media (max-width:700px){
	html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]{width:54px;height:54px}
	html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href] svg{width:27px;height:27px}
	html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]::after{display:none}
}
@media (prefers-reduced-motion:reduce){
	html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href],
	html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href] svg,
	html body.imt-page a.imt-whatsapp-float.imt-whatsapp-float[href]::before{animation:none!important}
}

/* ---------- Texte courant : longueur de ligne confortable ---------- */
html body.imt-page :where(.imt-prose,.entry-content,.imt-page-content) p{max-width:72ch}

/* ---------- Accessibilité : focus visible au clavier ---------- */
html body.imt-page :where(a,button,input,select,textarea,summary):focus-visible{
	outline:3px solid #c9a24a;
	outline-offset:2px;
	border-radius:4px;
}

/* ---------- Mobile ---------- */
@media (max-width:700px){
	html body.imt-page{font-size:16.5px}
	html body.imt-page .imt-topline,
	html body.imt-page .imt-topline a,
	html body.imt-page .imt-topline span{font-size:12.5px}
	html body.imt-page .imt-catalogue-grid .imt-card-copy > h2{font-size:16px}
	html body.imt-page .imt-catalogue-grid .imt-status{font-size:12px}
	html body.imt-page .imt-search input,
	html body.imt-page .imt-search select{font-size:16px} /* évite le zoom iOS */
}

@media (prefers-reduced-motion:reduce){
	html body.imt-page *{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
