/*
Theme Name: TesImpôts.com
Theme URI: https://tesimpots.com
Author: TesImpôts.com
Description: Thème officiel TesImpôts.com. Header, footer, navigation mobile et fondation bilingue FR/EN.
Version: 1.0.2
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: tesimpots-theme
*/

:root {
  --ti-navy: #061b3a;
  --ti-blue: #0d3f78;
  --ti-red: #d71920;
  --ti-red-dark: #b80f16;
  --ti-ink: #14243a;
  --ti-muted: #637187;
  --ti-line: #e2e8f0;
  --ti-soft: #f6f8fb;
  --ti-white: #ffffff;
  --ti-radius: 16px;
  --ti-shadow: 0 18px 50px rgba(6, 27, 58, .08);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ti-ink);
  background: var(--ti-white);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
a { color: var(--ti-blue); }
button, input, textarea, select { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.ti-container {
  width: min(100% - 36px, 1240px);
  margin-inline: auto;
}
.ti-site-main { min-height: 58vh; }
.ti-content-wrap {
  width: min(100% - 36px, 1040px);
  margin: 0 auto;
  padding: 56px 0 80px;
}
.ti-entry-header { margin-bottom: 28px; }
.ti-entry-title {
  margin: 0;
  color: var(--ti-navy);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.ti-entry-content {
  color: #34445b;
  font-size: 17px;
  line-height: 1.75;
}
.ti-entry-content h2,
.ti-entry-content h3 {
  color: var(--ti-navy);
  letter-spacing: -.025em;
}
.ti-entry-content a { font-weight: 700; }
.ti-entry-content .wp-block-button__link,
.ti-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--ti-red);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(215, 25, 32, .2);
}
.ti-entry-content .wp-block-button__link:hover,
.ti-button:hover {
  background: var(--ti-red-dark);
  color: #fff;
}

/* Header */
.ti-site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--ti-line);
  backdrop-filter: blur(16px) saturate(170%);
}
.admin-bar .ti-site-header { top: 32px; }
.ti-header-row {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.ti-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
.ti-brand img {
  display: block;
  width: auto;
  max-width: 210px;
  max-height: 56px;
}
.ti-text-logo {
  color: var(--ti-navy);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.ti-text-logo b { font-weight: 900; }
.ti-text-logo em {
  color: var(--ti-red);
  font-size: .63em;
  font-style: normal;
}
.ti-desktop-nav {
  display: flex;
  justify-content: center;
  flex: 1;
}
.ti-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ti-menu li { position: relative; }
.ti-menu a {
  display: flex;
  align-items: center;
  padding: 12px 13px;
  border-radius: 9px;
  color: #314158;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}
.ti-menu a:hover,
.ti-menu .current-menu-item > a,
.ti-menu .current_page_item > a {
  background: var(--ti-soft);
  color: var(--ti-navy);
}
.ti-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--ti-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--ti-shadow);
}
.ti-menu li:hover > .sub-menu,
.ti-menu li:focus-within > .sub-menu { display: block; }
.ti-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.ti-header-link,
.ti-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.ti-header-link {
  color: var(--ti-navy);
  border: 1px solid #ccd5e1;
  background: #fff;
}
.ti-header-cta {
  color: #fff;
  border: 1px solid var(--ti-red);
  background: var(--ti-red);
  box-shadow: 0 8px 20px rgba(215,25,32,.18);
}
.ti-header-cta:hover { color: #fff; background: var(--ti-red-dark); }

/* Language */
.ti-language {
  position: relative;
}
.ti-language-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #ccd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--ti-navy);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.ti-language-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ti-language-button .ti-chevron { width: 13px; }
.ti-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 174px;
  padding: 7px;
  border: 1px solid var(--ti-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--ti-shadow);
}
.ti-language-menu[hidden] { display: none; }
.ti-language-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #394a61;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}
.ti-language-menu a:hover { background: var(--ti-soft); color: var(--ti-navy); }
.ti-language-menu a.is-active { color: var(--ti-red); background: #fff6f6; }

/* Mobile */
.ti-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #ccd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.ti-mobile-toggle i {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--ti-navy);
}
.ti-mobile-panel {
  border-top: 1px solid var(--ti-line);
  padding: 18px 0 22px;
}
.ti-mobile-panel[hidden] { display: none; }
.ti-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ti-mobile-menu li { border-bottom: 1px solid var(--ti-line); }
.ti-mobile-menu a {
  display: block;
  padding: 14px 3px;
  color: var(--ti-navy);
  text-decoration: none;
  font-size: 16px;
  font-weight: 780;
}
.ti-mobile-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 15px;
}
.ti-mobile-menu .sub-menu li { border: 0; }
.ti-mobile-menu .sub-menu a { padding: 8px 0; color: var(--ti-muted); font-size: 14px; }
.ti-mobile-language-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--ti-line);
  color: var(--ti-muted);
  font-size: 13px;
  font-weight: 750;
}
.ti-mobile-language-links { display: flex; gap: 5px; }
.ti-mobile-language-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  border: 1px solid var(--ti-line);
  border-radius: 9px;
  color: var(--ti-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}
.ti-mobile-language-links a.is-active {
  color: #fff;
  background: var(--ti-navy);
  border-color: var(--ti-navy);
}
.ti-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding-top: 18px;
}

/* Footer */
.ti-site-footer {
  background: var(--ti-navy);
  color: #fff;
}
.ti-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr .8fr;
  gap: 44px;
  padding: 58px 0 44px;
}
.ti-footer-brand img {
  width: auto;
  max-width: 220px;
  max-height: 58px;
  filter: brightness(0) invert(1);
}
.ti-footer-brand .ti-text-logo { color: #fff; }
.ti-footer-brand p {
  max-width: 410px;
  margin: 18px 0 0;
  color: #b9c5d4;
  line-height: 1.65;
}
.ti-footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.ti-footer-column > strong {
  margin-bottom: 6px;
  color: #fff;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ti-footer-column a {
  color: #c6d0dd;
  text-decoration: none;
  font-size: 14px;
}
.ti-footer-column a:hover { color: #fff; }
.ti-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ti-footer-menu li { margin: 0 0 9px; }
.ti-footer-language { display: flex; gap: 5px; }
.ti-footer-language a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 9px;
}
.ti-footer-language a.is-active { color: var(--ti-navy); background: #fff; }
.ti-footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
  color: #9faec0;
  font-size: 12px;
}

/* 404 */
.ti-404 {
  text-align: center;
  padding: 100px 0 120px;
}
.ti-404 strong {
  display: block;
  color: var(--ti-navy);
  font-size: clamp(90px, 16vw, 190px);
  line-height: .85;
  letter-spacing: -.06em;
}
.ti-404 h1 { color: var(--ti-navy); font-size: clamp(30px, 5vw, 54px); }
.ti-404 p { color: var(--ti-muted); font-size: 18px; }

@media (max-width: 1100px) {
  .ti-desktop-nav,
  .ti-header-actions > .ti-language,
  .ti-header-actions > .ti-header-link,
  .ti-header-actions > .ti-header-cta { display: none; }
  .ti-mobile-toggle { display: block; }
  .ti-brand { margin-right: auto; }
  .ti-header-row { min-height: 72px; }
  .ti-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .ti-footer-grid > .ti-footer-column:last-child { display: none; }
}
@media (max-width: 782px) {
  .admin-bar .ti-site-header { top: 46px; }
}
@media (max-width: 720px) {
  .ti-container,
  .ti-content-wrap { width: min(100% - 24px, 1240px); }
  .ti-mobile-actions { grid-template-columns: 1fr; }
  .ti-footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 42px 0; }
  .ti-brand img { max-width: 175px; max-height: 50px; }
}
