/*
Theme Name:   GeneratePress Child — Traducteur Allemand Marrakech
Theme URI:    https://traducteur-allemand-marrakech.com/
Description:  Thème enfant GeneratePress sur mesure (templates PHP, zéro page builder) pour le cabinet de traduction assermentée allemand ↔ français, arabe et anglais à Marrakech. 4 langues via Polylang (fr, de, ar RTL, en).
Author:       Traducteur Allemand Marrakech
Template:     generatepress
Version:      1.0.0
Requires PHP: 8.1
Text Domain:  generatepress-child
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   1. Variables
   ========================================================================== */
:root {
	--tam-font-latin: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tam-font-arabic: "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Arabic Typesetting", sans-serif;
	--tam-color-text: #1f2933;
	--tam-color-accent: #0b3d91;
	--tam-color-muted: #52606d;
	--tam-radius: 6px;
}

body {
	font-family: var(--tam-font-latin);
	color: var(--tam-color-text);
}

/* ==========================================================================
   2. RTL (arabe) — WordPress pose body.rtl + <html dir="rtl"> sur /ar/.
   GeneratePress charge déjà sa feuille RTL ; ici seulement les compléments.
   Règle : écrire les nouveaux composants avec des propriétés logiques
   (margin-inline-start, padding-inline-end, inset-inline-*, text-align: start)
   pour qu'ils fonctionnent dans les deux sens sans surcharge.
   ========================================================================== */
.rtl body,
body.rtl {
	font-family: var(--tam-font-arabic);
	line-height: 1.8; /* l'arabe a besoin de plus d'interligne */
	letter-spacing: 0; /* jamais d'espacement de lettres en arabe (casse les ligatures) */
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
	font-family: var(--tam-font-arabic);
	letter-spacing: 0;
	text-transform: none;
}

/* Listes et citations : retrait du bon côté */
body.rtl .entry-content ul,
body.rtl .entry-content ol {
	margin-left: 0;
	margin-right: 0;
	padding-inline-start: 1.5em;
}

body.rtl blockquote {
	border-left: 0;
	border-right: 5px solid rgba(0, 0, 0, 0.05);
	padding-left: 0;
	padding-right: 20px;
}

/* Icônes directionnelles (flèches, chevrons) : miroir en RTL */
body.rtl .tam-icon-dir {
	transform: scaleX(-1);
}

/* Contenus toujours LTR dans une page arabe : téléphone, e-mail, références, IBAN, noms allemands */
.tam-ltr,
body.rtl a[href^="tel:"],
body.rtl a[href^="mailto:"] {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}

/* Champs de formulaire */
body.rtl input,
body.rtl textarea,
body.rtl select {
	text-align: start;
}
body.rtl input[type="tel"],
body.rtl input[type="email"],
body.rtl input[type="url"] {
	direction: ltr;
	text-align: right;
}

/* ==========================================================================
   3. Composants du site (à compléter avec les templates)
   ========================================================================== */
.tam-lang-switcher {
	display: flex;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.tam-lang-switcher .current-lang a {
	font-weight: 700;
	text-decoration: underline;
}
