/*
Theme Name: SCSE Ollie Child
Theme URI: https://scse.ca
Description: Child theme for Ollie — applies the SCSE corporate palette (#04315A / #000 / #fff).
Author: SCSE
Version: 1.0.5
Template: ollie
Text Domain: scse-ollie-child
*/

/* ------------------------------------------------------------------
 * Tableaux SCSE — core table block with className "scse-table".
 * Core already sets overflow-x:auto on the <figure>, which both keeps
 * wide tables scrollable on mobile and clips the rounded corners.
 * ------------------------------------------------------------------ */

.wp-block-table.scse-table {
	margin-block: var(--wp--preset--spacing--medium);
	border: 1px solid var(--wp--preset--color--border-light);
	border-radius: 12px;
}

.wp-block-table.scse-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 1rem;
}

.wp-block-table.scse-table thead th {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border: 0;
	padding: 0.9rem 1.25rem;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-align: left;
}

/* Only the year column stays on one line; wrapping the other headings is what
   lets the table fit a 390px viewport without a horizontal scroll. */
.wp-block-table.scse-table thead th:first-child {
	white-space: nowrap;
}

.wp-block-table.scse-table tbody td {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--border-light);
	padding: 0.7rem 1.25rem;
	vertical-align: baseline;
}

.wp-block-table.scse-table tbody tr:nth-child(even) {
	background-color: var(--wp--preset--color--tertiary);
}

.wp-block-table.scse-table tbody tr:hover {
	background-color: var(--wp--preset--color--primary-accent);
}

.wp-block-table.scse-table tbody td:first-child {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.wp-block-table.scse-table table {
		font-size: 0.9rem;
	}

	.wp-block-table.scse-table thead th,
	.wp-block-table.scse-table tbody td {
		padding: 0.6rem 0.75rem;
	}
}

/* ------------------------------------------------------------------
 * En-tête — les libellés de "La Société" sont longs et se cassaient
 * sur trois lignes dans la largeur par défaut du sous-menu.
 * ------------------------------------------------------------------ */

/* Ollie pins this at 225px !important in assets/styles/core-navigation.css,
   so the override has to match its selector and its !important. */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
	min-width: 17rem !important;
}

/* ------------------------------------------------------------------
 * Logos — the SVGs carry no attachment metadata, so WordPress cannot
 * derive intrinsic dimensions and the site-logo block's width setting
 * has nothing to act on. Size them here instead.
 * ------------------------------------------------------------------ */

.wp-block-site-logo img {
	width: 260px;
	max-width: 100%;
	height: auto;
}

.scse-footer-logo img {
	width: 240px;
	max-width: 100%;
	height: auto;
}

@media (max-width: 781px) {
	.wp-block-site-logo img {
		width: 190px;
	}
}
