/* ==========================================================================
   TA PASSION AUTO — Feuille de style du design
   Chargée par le plugin WP Logical Claude (assets/design.css)

   ARCHITECTURE
   Le design cible des CLASSES (tpa-*) assignées aux éléments Elementor via
   le champ « Classes CSS », et non des ID d'éléments. Une page dupliquée
   conserve donc sa mise en forme même si Elementor régénère ses ID.

   Rappel Elementor : un container « boxed » possède un wrapper interne
   .e-con-inner qui porte le flex. Les enfants sont en .e-con-inner > .e-con
   ========================================================================== */

/* --- Polices ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

body,
.elementor-widget-text-editor,
.elementor-widget-text-editor p {
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-button,
#site-header .site-navigation a {
	font-family: 'Archivo', system-ui, -apple-system, sans-serif;
}

/* --- Nettoyage du thème ------------------------------------------------- */
.page-header { display: none !important; }
.site-main { padding: 0 !important; max-width: 100% !important; }
.page-content { margin: 0 !important; }

/* --- Header ------------------------------------------------------------- */
#site-header.site-header {
	max-width: 1240px;
	margin: 0 auto;
	padding: 22px 40px;
	align-items: center;
}

#site-header .site-navigation ul.menu {
	display: flex;
	gap: 34px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#site-header .site-navigation a {
	font-weight: 700;
	font-size: 15px;
	color: #1A1A1A;
	text-decoration: none;
	transition: color .18s ease;
}

#site-header .site-navigation a:hover,
#site-header .site-navigation .current-menu-item > a,
#site-header .site-navigation .current-menu-ancestor > a { color: #E30613; }
#site-header .custom-logo { display: block; height: auto; }

/* --- Sous-menu déroulant ------------------------------------------------- */
#site-header .site-navigation ul.menu li { position: relative; }

#site-header .site-navigation ul.sub-menu {
	position: absolute;
	top: 100%;
	left: -18px;
	min-width: 265px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .13);
	opacity: 0;
	visibility: hidden;
	transform: translateY(5px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
	z-index: 100;
}

#site-header .site-navigation ul.menu li:hover > ul.sub-menu,
#site-header .site-navigation ul.menu li:focus-within > ul.sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#site-header .site-navigation ul.sub-menu a {
	display: block;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

#site-header .site-navigation ul.sub-menu a:hover {
	background: #F4F4F4;
	color: #E30613;
}

/* Le parent d'un sous-menu n'est pas cliquable : on l'indique */
#site-header .site-navigation .menu-item-has-children > a { cursor: default; }

/* ==========================================================================
   UTILITAIRES PARTAGÉS
   ========================================================================== */

/* Colonne dont les widgets s'alignent à gauche.
   Sans cela les widgets, en tant qu'éléments flex, sont centrés. */
.tpa-stack-left > .e-con-inner { align-items: flex-start !important; }
.tpa-stack-left .elementor-widget { width: 100%; }
.tpa-stack-left .elementor-heading-title,
.tpa-stack-left .elementor-widget-text-editor { text-align: left !important; }

/* Titre forcé en foncé (sinon héritage d'une couleur du kit) */
.tpa-title-dark .elementor-heading-title { color: #1A1A1A !important; }

/* ==========================================================================
   HERO PLEINE LARGEUR
   Le width:100% de l'image se calcule sur le widget : il faut élargir
   le widget lui-même, pas seulement l'image.
   ========================================================================== */
.tpa-hero-wrap > .e-con-inner { align-items: stretch !important; }

.tpa-hero-img { width: 100% !important; max-width: none !important; }

.tpa-hero-img img {
	width: 100% !important;
	max-width: none !important;
	height: auto !important;
}

/* ==========================================================================
   BANDEAU ROUGE — photos des 3 employé·e·s
   ========================================================================== */
.tpa-people > .e-con-inner {
	align-items: flex-end !important;
	justify-content: center !important;
	gap: 22px !important;
}

.tpa-people .elementor-widget-image img {
	height: 230px !important;
	width: auto !important;
	max-width: none !important;
	object-fit: contain;
	object-position: bottom;
	display: block;
}

/* ==========================================================================
   CARTES MÉTIERS — 3 colonnes égales
   ========================================================================== */
.tpa-cards > .e-con-inner {
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: 40px !important;
}

.tpa-cards .tpa-card {
	flex: 1 1 0 !important;
	width: auto !important;
	max-width: none !important;
}

.tpa-card > .e-con-inner {
	align-items: flex-start !important;
	height: 100%;
}

.tpa-card .elementor-heading-title,
.tpa-card .elementor-widget-text-editor { text-align: left !important; }
.tpa-card .elementor-widget-button { margin-top: auto; padding-top: 10px; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.elementor-widget-button .elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	line-height: 1;
	border-radius: 0;
	transition: transform .18s ease, background-color .18s ease;
}

.elementor-widget-button .elementor-button:hover { transform: translateY(-2px); }

/* Bouton large (CTA) */
.tpa-cta-btn .elementor-button {
	min-width: 0;
	height: auto;
	padding: 16px 30px !important;
	font-size: 16px;
}

/* ==========================================================================
   SECTION GRISE — grille des formations
   ========================================================================== */
.tpa-band-grey > .e-con-inner { align-items: flex-start !important; }

.tpa-band-grey .elementor-heading-title,
.tpa-band-grey .elementor-widget-text-editor { text-align: left !important; }

.tpa-grid > .e-con-inner {
	flex-wrap: wrap !important;
	gap: 26px 34px !important;
	align-items: flex-start !important;
	width: 100%;
}

.tpa-grid .tpa-grid-item {
	flex: 0 1 300px !important;
	width: auto !important;
	max-width: 300px !important;
}

.tpa-grid-item > .e-con-inner {
	flex-direction: row !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	gap: 12px !important;
}

/* La pastille ronde ne doit jamais s'étirer */
.tpa-grid-item .tpa-dot {
	flex: 0 0 56px !important;
	width: 56px !important;
	max-width: 56px !important;
	min-width: 56px !important;
	height: 56px !important;
	min-height: 56px !important;
	border-radius: 50% !important;
	padding: 0 !important;
}

.tpa-grid-item .elementor-widget-text-editor { flex: 1 1 auto; }

/* ==========================================================================
   PAGE MÉTIER
   ========================================================================== */

/* --- Hero : photo à gauche, texte à droite ------------------------------ */
.tpa-metier-hero > .e-con-inner {
	align-items: flex-end !important;
	gap: 40px !important;
	flex-wrap: nowrap !important;
}

.tpa-metier-hero-img {
	flex: 0 0 auto !important;
	align-self: flex-end !important;
}

.tpa-metier-hero-img img {
	height: 280px !important;
	width: auto !important;
	max-width: none !important;
	object-fit: contain;
	object-position: bottom;
	display: block;
}

/* --- Sections à deux colonnes ------------------------------------------- */
.tpa-two-col > .e-con-inner {
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 48px !important;
}

.tpa-two-col-middle > .e-con-inner { align-items: center !important; }

.tpa-col-narrow { flex: 0 1 380px !important; max-width: 380px !important; }
.tpa-col-wide { flex: 1 1 auto !important; max-width: none !important; }
.tpa-col-img { flex: 0 1 320px !important; }

.tpa-col-img img {
	width: 100% !important;
	max-width: none !important;
	height: auto !important;
}

/* --- Badge « Apprentissage 4 ans » -------------------------------------- */
.tpa-badge {
	flex: 0 0 auto !important;
	width: 178px !important;
	max-width: 178px !important;
	align-self: flex-start !important;
}

.tpa-badge .elementor-heading-title { text-align: center !important; }

/* --- Collage d'images ----------------------------------------------------
   Maquette : les deux vignettes sont alignées par le bas, celle de droite
   étant nettement plus haute que celle de gauche.
   -------------------------------------------------------------------------- */
.tpa-collage-row > .e-con-inner {
	flex-wrap: nowrap !important;
	gap: 10px !important;
	align-items: flex-end !important;
}

.tpa-collage-img { flex: 1 1 0 !important; width: auto !important; }

.tpa-collage-img img {
	width: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
}

/* Vignette de gauche : plus courte */
.tpa-collage-row .tpa-collage-img:first-child img { height: 160px !important; }

/* Vignette de droite : plus haute */
.tpa-collage-row .tpa-collage-img:last-child img { height: 260px !important; }

/* --- Image large de l'atelier -------------------------------------------
   Dans la maquette elle court sur toute la largeur du contenu, sous la
   colonne de texte ET sous le collage — d'où sa sortie de la colonne droite.
   -------------------------------------------------------------------------- */
.tpa-collage-wide {
	width: 100% !important;
	max-width: 1140px !important;
	margin: 0 auto 46px !important;
}

.tpa-collage-wide img {
	width: 100% !important;
	max-width: none !important;
	height: 320px !important;
	object-fit: cover;
	display: block;
}

/* Le badge « Apprentissage » se cale en bas de la colonne de texte,
   à hauteur du bas du collage comme sur la maquette. */
.tpa-col-narrow .tpa-badge { margin-top: auto !important; }
.tpa-col-narrow > .e-con-inner { height: 100%; }

/* --- Bloc « Les autres métiers » ----------------------------------------
   Sans align-items:stretch, la rangée de cartes se réduit à son contenu
   dans un container flex en colonne.
   -------------------------------------------------------------------------- */
.tpa-others > .e-con-inner { align-items: stretch !important; }

.tpa-others .elementor-heading-title,
.tpa-others .elementor-widget-text-editor { text-align: left !important; }

/* --- CTA « Stage découverte » -------------------------------------------- */
.tpa-cta > .e-con-inner { align-items: flex-start !important; }

.tpa-cta .elementor-heading-title,
.tpa-cta .elementor-widget-text-editor { text-align: left !important; }

/* ==========================================================================
   DIVERS
   ========================================================================== */
.elementor-widget-image img { display: block; }
.elementor-heading-title a { text-decoration: none; color: inherit; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
	.tpa-cards > .e-con-inner { flex-wrap: wrap !important; }
	.tpa-cards .tpa-card { flex: 1 1 260px !important; }

	.tpa-two-col > .e-con-inner,
	.tpa-metier-hero > .e-con-inner { flex-wrap: wrap !important; }
	.tpa-col-narrow { flex: 1 1 100% !important; max-width: none !important; }
	.tpa-col-img { flex: 1 1 100% !important; }
}

@media (max-width: 767px) {
	#site-header.site-header { padding: 16px 20px; flex-wrap: wrap; }

	.tpa-people .elementor-widget-image img { height: 150px !important; }
	.tpa-cards .tpa-card { flex: 1 1 100% !important; }
	.tpa-grid .tpa-grid-item { flex: 1 1 100% !important; max-width: none !important; }

	.tpa-metier-hero-img img { height: 200px !important; }
	.tpa-collage-row > .e-con-inner { flex-wrap: wrap !important; }
	.tpa-collage-img { flex: 1 1 100% !important; }
}

/* ==========================================================================
   BLOC « LES AUTRES MÉTIERS » — rendu par [tpa_metiers_lies]
   ========================================================================== */
.tpa-related {
	background: #F4F4F4;
	padding: 60px 40px;
}

.tpa-related__title {
	color: #1A1A1A;
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 36px;
	text-align: left;
}

.tpa-related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 40px;
	align-items: stretch;
}

.tpa-related__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tpa-related__card-title {
	color: #E30613;
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}

.tpa-related__card-text {
	color: #1A1A1A;
	font-size: 15px;
	line-height: 1.6;
	flex: 1 1 auto;
}

.tpa-related__card-text p { margin: 0; }

.tpa-related__card-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-top: auto;
	background: #E30613;
	color: #fff;
	font-size: 18px;
	text-decoration: none;
	transition: transform .18s ease, background-color .18s ease;
}

.tpa-related__card-link:hover,
.tpa-related__card-link:focus-visible {
	background: #1A1A1A;
	color: #fff;
	transform: translateY(-2px);
}

@media (max-width: 767px) {
	.tpa-related { padding: 40px 20px; }
	.tpa-related__grid { gap: 28px; }
}
