/* Override placeholder background assets to the bundled SVGs.
   main.css stays pristine; swap these for real bg.jpg / overlay.png later. */

#bg:before {
	background-image:
		linear-gradient(to top, rgba(19, 21, 25, 0.5), rgba(19, 21, 25, 0.5)),
		url("../../images/overlay.svg");
}

#bg:after {
	background-image: url("../../images/bg.svg");
}

/* .image hover overlay also points at the placeholder overlay. */
.image:before {
	background-image: url("../../images/overlay.svg");
}

/* Cross-page fade (View Transitions API, driven by the router). */
@keyframes bacariq-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes bacariq-fade-out {
	from { opacity: 1; }
	to   { opacity: 0; }
}
/* Old page fades out first, then the new page fades in — sequential, not a
   simultaneous cross-fade, so the transition reads clearly between pages. */
::view-transition-old(root) {
	animation: bacariq-fade-out 0.8s ease both;
}
::view-transition-new(root) {
	animation: bacariq-fade-in 0.8s ease 0.8s both;
}

/* The close button is an <a> (router link), so neutralize the dotted link underline. */
#main article .close {
	border-bottom: 0;
}

/* Material Icons used in the Produits page (home button + feature table). */
.material-icons {
	vertical-align: middle;
}

/* Feature table icons keep a consistent size/tint. */
#main .table-wrapper .feat-icon {
	font-size: 32px;
	color: #ffffff;
	opacity: 0.85;
}

/* Le .logo est un cercle prévu pour une icône de police ; on y met une <img>,
   donc on la centre proprement (horizontal + vertical) dans le cercle. */
#header .logo {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 0;
}
#header .logo img {
	display: block;
	width: 90%;
	height: 90%;
	object-fit: contain;
}

/* Responsive mobile : les composants de page Angular (<app-…-page>) s'insèrent
   entre #main et <article>, ce qui casse la chaîne de largeur du template
   (l'article gardait width:40rem et débordait). On contraint les enfants de
   #main pour qu'ils rétrécissent sous la largeur de l'écran. min-width:0 lève
   le minimum implicite des éléments flex. */
#main > * {
	max-width: 100%;
	min-width: 0;
}

/* Les titres .major ont width:max-content (largeur du texte, pour l'underline) ;
   sur mobile les titres longs débordaient. On les plafonne à la largeur du
   conteneur et on réduit l'interlettrage sur petit écran pour qu'ils s'enroulent. */
.major {
	max-width: 100%;
	overflow-wrap: anywhere;
}
@media screen and (max-width: 480px) {
	#main article h2.major,
	#header .content .inner h1,
	#header nav ul li a {
		letter-spacing: 0.15rem;
	}
}

/* Grilles de fonctionnalités (icône + libellé) : sur desktop, 2 fonctionnalités
   par ligne ; sur mobile, on reflue à une seule par ligne (icône | libellé)
   pour éviter que la 2ᵉ colonne soit coupée. */
@media screen and (max-width: 600px) {
	.feat-grid,
	.feat-grid tbody {
		display: block;
		width: 100%;
	}
	.feat-grid tr {
		display: grid;
		grid-template-columns: 2.75rem 1fr;
		align-items: center;
		column-gap: 0.5rem;
	}
	.feat-grid td {
		display: block;
		width: auto !important;
		padding: 0.4rem 0;
		border: 0;
		vertical-align: middle;
	}
	.feat-grid td:empty {
		display: none;
	}
}

/* Menu Produits : chaque cellule a la même largeur fixe et son contenu est
   centré, pour que tous les rectangles soient identiques et bien alignés. */
#header nav ul li {
	display: flex;
}
#header nav ul li a {
	width: 9rem;
	min-width: 0;
	padding: 0;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
