/*
 * Touraine Hôtels : socle, en-tête, menu mobile, pied de page.
 * Les valeurs reprennent celles mesurées sur l'ancien site Divi.
 */

:root {
	--th-accent: #db8c1c;
	--th-accent-hover: #f77b00;
	--th-ink: #333;
	--th-text: #666;
	--th-night: #032b35;
	--th-black: #0a0a0a;
	--th-header-fixed-bg: rgba(3, 19, 23, 0.86);
	--th-container: 1080px;
	--th-font-body: "Open Sans", Arial, sans-serif;
}

/* ---------- Socle ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: #fff;
	color: var(--th-text);
	font-family: var(--th-font-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	padding-bottom: 10px;
	color: var(--th-ink);
	font-weight: 500;
	line-height: 1em;
}

h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
	margin: 0;
	padding-bottom: 1em;
}

p:last-of-type {
	padding-bottom: 0;
}

a {
	color: var(--th-accent);
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

button {
	font: inherit;
}

.container {
	width: 80%;
	max-width: var(--th-container);
	margin-inline: auto;
}

/* Texte réservé aux lecteurs d'écran. */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 1000000;
	padding: 10px 16px;
	background: #fff;
	color: var(--th-ink);
}

.skip-link:focus {
	left: 10px;
	top: 10px;
}

/* Les mots trop longs (adresses web) se coupent au lieu de déborder, comme sur l'ancien site. */
.page-content,
.entry__content {
	overflow-wrap: break-word;
}

/* Les décors qui dépassent à droite ne créent pas de défilement horizontal. */
.site-main {
	overflow-x: clip;
}

.content-area {
	padding-top: 122px;
	padding-bottom: 58px;
}

/* ---------- En-tête (au-dessus de 980 px) ---------- */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	width: 100%;
	background-color: rgba(255, 255, 255, 0);
	line-height: 23px;
	transition: background-color 0.4s;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	padding: 0 32px 0 30px;
	text-align: center;
}

/* En haut de page le logo est replié ; il apparaît quand l'en-tête devient fixe. */
.site-header__logo {
	height: 12px;
	overflow: hidden;
	transition: height 0.4s ease-in-out;
}

.site-header__logo a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.site-header__logo-img {
	width: auto;
	height: 54%;
	max-height: 54%;
	opacity: 0;
	transition: opacity 0.4s ease-in-out;
}

.site-header.is-fixed {
	background-color: var(--th-header-fixed-bg);
}

.site-header.is-fixed .site-header__logo {
	height: 64px;
}

.site-header.is-fixed .site-header__logo-img {
	opacity: 1;
}

.site-nav__list {
	list-style: none;
	font-size: 14px;
	line-height: 23px;
}

.site-nav__list > li {
	position: relative;
	display: inline-block;
	padding-right: 22px;
	line-height: 1em;
}

.site-nav__list > li:last-child {
	padding-right: 0;
}

.site-nav__list a {
	display: block;
	padding-bottom: 24px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 14px;
	transition: opacity 0.4s ease-in-out, color 0.4s ease-in-out;
}

.site-nav__list a:hover {
	opacity: 0.7;
}

.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-ancestor > a,
.site-nav__list .current_page_item > a {
	color: var(--th-accent);
}

/* Bouton d'appel du menu : classe CSS « cta-bouton » saisie sur l'élément de menu. */
.site-nav__list .cta-bouton > a,
.mobile-menu__list .cta-bouton > a {
	padding: 10px;
	border: 2px solid var(--th-accent);
	border-radius: 10px;
}

.site-nav__list .dashicons {
	margin-top: -4px;
}

/* Sous-menus */
.site-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1;
	width: 240px;
	padding: 20px 0;
	list-style: none;
	background: var(--th-header-fixed-bg);
	border-top: 3px solid var(--th-accent);
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease-in-out;
}

.site-nav__list li:hover > .sub-menu,
.site-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
}

.site-nav__list .sub-menu a {
	padding: 6px 20px;
}

/* ---------- Menu mobile (jusqu'à 980 px) ---------- */

.menu-toggle,
.mobile-menu {
	display: none;
}

@media (max-width: 980px) {
	.site-header {
		display: none;
	}

	.menu-toggle {
		position: fixed;
		top: 15px;
		right: 5%;
		z-index: 999999;
		display: block;
		width: 55px;
		height: 55px;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		cursor: pointer;
	}

	.admin-bar .menu-toggle {
		top: 61px;
	}

	.menu-toggle__box {
		position: relative;
		display: inline-block;
		width: 25px;
		height: 23px;
		vertical-align: middle;
	}

	.menu-toggle__bars,
	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		position: absolute;
		left: 0;
		width: 25px;
		height: 3px;
		border-radius: 4px;
		background-color: var(--th-accent);
		transition: transform 0.25s, opacity 0.25s;
	}

	.menu-toggle__bars {
		top: 10px;
	}

	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		content: "";
	}

	.menu-toggle__bars::before {
		top: -10px;
	}

	.menu-toggle__bars::after {
		top: 10px;
	}

	.menu-toggle.is-active .menu-toggle__bars {
		background-color: transparent;
	}

	.menu-toggle.is-active .menu-toggle__bars::before {
		transform: translateY(10px) rotate(45deg);
	}

	.menu-toggle.is-active .menu-toggle__bars::after {
		transform: translateY(-10px) rotate(-45deg);
	}

	.mobile-menu {
		position: fixed;
		top: 0;
		right: 0;
		z-index: 99998;
		display: block;
		width: 100%;
		min-width: 300px;
		max-width: 1080px;
		height: 100%;
		overflow: auto;
		background-color: rgba(0, 0, 0, 0.95);
		transform: translateX(100%);
		transition: transform 0.5s;
	}

	.mobile-menu.is-open {
		transform: translateX(0);
	}

	.mobile-menu__nav {
		padding: 10%;
	}

	.mobile-menu__list,
	.mobile-menu__list .sub-menu {
		list-style: none;
	}

	.mobile-menu__list a {
		display: block;
		height: 40px;
		padding: 0 5%;
		overflow: hidden;
		color: #fff;
		font-size: 16px;
		font-weight: 500;
		line-height: 30px;
	}

	.mobile-menu__list .cta-bouton > a {
		height: auto;
		line-height: 23px;
	}

	.mobile-menu__list .current-menu-item > a {
		color: var(--th-accent);
	}

	.mobile-menu__list .sub-menu a {
		padding-left: 10%;
		font-size: 13px;
		line-height: 40px;
	}

	body.has-open-menu {
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.site-header,
	.site-header__logo,
	.site-header__logo-img,
	.mobile-menu,
	.menu-toggle__bars,
	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		transition: none;
	}
}

/* ---------- Pied de page ---------- */

.site-footer {
	background-color: var(--th-black);
	color: #fff;
}

.site-footer__widgets {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	padding-top: 6%;
}

.site-footer__column {
	width: 47.25%;
	margin-bottom: 5.5%;
}

/* Chaque widget garde la largeur de son contenu, comme sur l'ancien site. */
.site-footer .widget {
	width: fit-content;
	max-width: 100%;
}

.site-footer .widget:not(:last-child) {
	margin-bottom: 11.64%;
}

.site-footer .widget__title {
	color: var(--th-accent);
}

.site-footer #logofooter {
	max-width: 100px;
}

.site-footer__bottom {
	padding: 15px 0 5px;
	background-color: var(--th-black);
}

.site-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0 20px;
}

.site-footer__credits {
	padding-bottom: 10px;
	color: #5e5e5e;
}

.site-footer__credits a {
	color: #5e5e5e;
	font-weight: 700;
}

.site-footer__social {
	display: flex;
	gap: 24px;
	margin-left: auto;
	list-style: none;
}

.site-footer__social a {
	display: block;
	color: #666;
	line-height: 0;
	transition: color 0.3s;
}

.site-footer__social a:hover {
	color: var(--th-accent);
}

@media (max-width: 980px) {
	.site-footer__bottom-inner {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.site-footer__social {
		order: -1;
		align-items: center;
		min-height: 26px;
		margin: 0 0 5px;
	}

	.site-footer__widgets {
		padding: 8% 0;
	}

	.site-footer__column {
		width: 46.25%;
		margin-bottom: 7.5%;
	}

	.site-footer .widget:not(:last-child) {
		margin-bottom: 16.21%;
	}
}

/* Sur tablette, les deux colonnes du pied de page n'ont pas de marge dessous. */
@media (min-width: 768px) and (max-width: 980px) {
	.site-footer__column:nth-last-child(-n+2) {
		margin-bottom: 0;
	}
}

@media (max-width: 767px) {
	.site-footer__widgets {
		padding: 10% 0;
	}

	.site-footer__column {
		width: 100%;
		margin-bottom: 9.5%;
	}

	.site-footer .widget:not(:last-child) {
		margin-bottom: 9.5%;
	}
}

@media (max-width: 479px) {
	.site-footer__widgets {
		padding: 12% 0;
	}

	.site-footer__column {
		margin-bottom: 11.5%;
	}
}

/* ---------- Retour en haut de page ---------- */

.back-to-top {
	position: fixed;
	right: 0;
	bottom: 125px;
	z-index: 99999;
	padding: 5px;
	border: 0;
	border-radius: 5px 0 0 5px;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	line-height: 0;
	cursor: pointer;
}

.back-to-top[hidden] {
	display: none;
}
