/* =============================================
   auto-max.fr — CSS v2 (mars 2026)
   Fichier externe unique, priorité 9999
   Palette: #1A1A2E / #E63946 / #457B9D
   Fonts: Inter + Source Sans 3
   ============================================= */

/* --- Variables --- */
:root {
  --am-primary: #1A1A2E;
  --am-accent: #E63946;
  --am-secondary: #457B9D;
  --am-bg: #F8F9FA;
  --am-card: #FFFFFF;
  --am-text: #2D2D2D;
  --am-muted: #6C757D;
  --am-border: #DEE2E6;
  --am-light-accent: #FFF0F1;
  --am-font-heading: 'Inter', sans-serif;
  --am-font-body: 'Source Sans 3', sans-serif;
  --am-radius: 10px;
  --am-shadow: 0 2px 12px rgba(0,0,0,0.06);
  --am-max-width: 820px;
}

/* --- Base --- */
body {
  font-family: var(--am-font-body);
  color: var(--am-text);
  line-height: 1.78;
  background: var(--am-bg);
  font-size: 1.08rem;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 {
  font-family: var(--am-font-heading);
  color: var(--am-primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: 2.1rem; margin-bottom: 1rem; }
h2 {
  font-size: 1.55rem;
  margin: 2.8rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--am-accent);
  position: relative;
}
h3 { font-size: 1.25rem; margin: 1.8rem 0 0.8rem; color: var(--am-secondary); font-weight: 600; }
p { margin-bottom: 1.2rem; max-width: var(--am-max-width); }
a { color: var(--am-secondary); text-decoration: none; transition: color 0.2s, border-color 0.2s; }
a:hover { color: var(--am-accent); }
.entry-content a:not(.wp-block-button__link):not(.am-cta-btn) {
  color: var(--am-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.entry-content a:not(.wp-block-button__link):not(.am-cta-btn):hover {
  color: var(--am-primary);
}
strong { color: var(--am-primary); }

/* --- Header --- */
.site-header {
  background: var(--am-card);
  border-bottom: 3px solid var(--am-primary);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.site-header .inside-header { max-width: 1200px; margin: 0 auto; }
.site-logo img, .custom-logo { max-height: 42px; width: auto; }
.main-navigation a { color: var(--am-primary); font-family: var(--am-font-heading); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--am-accent); }

/* --- Hero homepage --- */
.am-hero {
  position: relative;
  background: var(--am-primary);
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
  overflow: hidden;
  border-radius: 0 0 var(--am-radius) var(--am-radius);
}
.am-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.92), rgba(69,123,157,0.7));
  z-index: 1;
}
.am-hero-content { position: relative; z-index: 2; max-width: 700px; margin: 0 auto; }
.am-hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 0.8rem; }
.am-hero p { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 600px; margin: 0 auto 1.5rem; }
.am-hero .am-hero-btn {
  display: inline-block;
  background: var(--am-accent) !important;
  color: #FFFFFF !important;
  font-family: var(--am-font-heading);
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border-radius: var(--am-radius);
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
}
.am-hero .am-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.35);
  color: #FFFFFF !important;
  text-decoration: none !important;
}
.am-hero a { color: #FFFFFF !important; text-decoration: none !important; }

/* --- Cards (blog grid) --- */
.am-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.am-card {
  background: var(--am-card);
  border-radius: var(--am-radius);
  box-shadow: var(--am-shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.am-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.1); }
.am-card img { width: 100%; height: 200px; object-fit: cover; }
.am-card-body { padding: 1.2rem 1.4rem; }
.am-card-body h3 { margin-top: 0; color: var(--am-primary); font-size: 1.1rem; }
.am-card-body p { font-size: 0.92rem; color: var(--am-muted); }
.am-card-meta { font-size: 0.82rem; color: var(--am-muted); margin-bottom: 0.5rem; }

/* Blog grid GP */
.blog .post-image, .archive .post-image { border-radius: var(--am-radius) var(--am-radius) 0 0; overflow: hidden; }
.blog article, .archive article {
  background: var(--am-card);
  border-radius: var(--am-radius);
  box-shadow: var(--am-shadow);
  overflow: hidden;
  transition: transform 0.2s;
}
.blog article:hover, .archive article:hover { transform: translateY(-2px); }

/* --- Shortcode: Summary (En bref) --- */
.am-summary {
  background: var(--am-light-accent);
  border: 1px solid rgba(230,57,70,0.15);
  border-left: 4px solid var(--am-accent);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.am-summary-title {
  font-family: var(--am-font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--am-accent);
  margin-bottom: 0.6rem;
}
.am-summary ul { margin: 0; padding-left: 1.2rem; }
.am-summary li { margin-bottom: 0.4rem; line-height: 1.6; }

/* --- Shortcode: TOC --- */
.am-toc {
  background: var(--am-card);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0 2rem;
  box-shadow: var(--am-shadow);
}
.am-toc-title {
  font-family: var(--am-font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--am-primary);
  margin-bottom: 0.6rem;
}
.am-toc ol { counter-reset: toc; padding-left: 0; list-style: none; }
.am-toc li { counter-increment: toc; margin-bottom: 0.35rem; }
.am-toc li::before {
  content: counter(toc) ".";
  font-family: var(--am-font-heading);
  font-weight: 700;
  color: var(--am-accent);
  margin-right: 0.5rem;
  font-size: 0.95rem;
}
.am-toc a { color: var(--am-text); text-decoration: none; font-size: 0.95rem; }
.am-toc a:hover { color: var(--am-accent); }

/* --- Shortcode: Encart --- */
.am-encart {
  background: var(--am-card);
  border: 1px solid var(--am-border);
  border-left: 4px solid var(--am-secondary);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.am-encart-titre {
  font-family: var(--am-font-heading);
  font-weight: 700;
  color: var(--am-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* --- Shortcode: Alerte --- */
.am-alerte {
  background: var(--am-light-accent);
  border: 1px solid rgba(230,57,70,0.2);
  border-left: 4px solid var(--am-accent);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  padding: 1rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

/* --- Shortcode: Chiffres clés --- */
.am-chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.am-chiffre {
  background: var(--am-card);
  border-radius: var(--am-radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--am-shadow);
  border-top: 3px solid var(--am-accent);
}
.am-chiffre-valeur {
  font-family: var(--am-font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--am-accent);
  display: block;
}
.am-chiffre-label {
  font-size: 0.82rem;
  color: var(--am-muted);
  margin-top: 0.3rem;
  display: block;
}

/* --- Shortcode: Table --- */
.am-table-wrap { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.am-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: var(--am-card);
  border-radius: var(--am-radius);
  overflow: hidden;
  box-shadow: var(--am-shadow);
  font-size: 0.95rem;
}
.am-table-wrap thead { background: var(--am-primary); color: #fff; }
.am-table-wrap th {
  padding: 0.8rem 1rem;
  font-family: var(--am-font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  text-align: left;
  white-space: nowrap;
}
.am-table-wrap td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--am-border); }
.am-table-wrap tbody tr:hover { background: var(--am-bg); }
.am-table-wrap tbody tr:last-child td { border-bottom: none; }

/* --- Shortcode: FAQ Accordion --- */
.am-faq { margin: 2rem 0; }
.am-faq-item { border: 1px solid var(--am-border); border-radius: var(--am-radius); margin-bottom: 0.6rem; overflow: hidden; background: var(--am-card); }
.am-faq-q {
  padding: 1rem 1.3rem;
  cursor: pointer;
  font-family: var(--am-font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--am-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.am-faq-q:hover { background: var(--am-bg); }
.am-faq-q::after { content: '+'; font-size: 1.3rem; color: var(--am-accent); font-weight: 700; transition: transform 0.3s; flex-shrink: 0; margin-left: 1rem; }
.am-faq-item.open .am-faq-q::after { content: '\2212'; }
.am-faq-a { padding: 0 1.3rem 1rem; display: none; color: var(--am-text); line-height: 1.7; }
.am-faq-item.open .am-faq-a { display: block; }

/* --- Shortcode: CTA --- */
.am-cta {
  background: var(--am-bg);
  border: 1px solid var(--am-border);
  border-left: 4px solid var(--am-accent);
  border-radius: 0 var(--am-radius) var(--am-radius) 0;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.am-cta-text { flex: 1; min-width: 200px; }
.am-cta-text strong { color: var(--am-primary); font-size: 1rem; }
.am-cta-text span { font-size: 0.85rem; color: var(--am-muted); display: block; margin-top: 0.2rem; }
.am-cta-btn {
  background: var(--am-accent);
  color: #FFFFFF !important;
  font-family: var(--am-font-heading);
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.am-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230,57,70,0.3);
  color: #FFFFFF !important;
}

/* --- Bio / Author box --- */
.am-bio {
  background: var(--am-card);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  padding: 1.2rem 1.5rem;
  margin: 2.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--am-shadow);
}
.am-bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--am-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--am-font-heading);
  font-weight: 800;
  font-size: 1.4rem;
}
.am-bio-text { font-size: 0.92rem; color: var(--am-muted); line-height: 1.6; }
.am-bio-name { font-family: var(--am-font-heading); font-weight: 700; color: var(--am-primary); display: block; margin-bottom: 0.2rem; }

/* --- Calculators / interactive tools --- */
.am-calc-wrap {
  background: var(--am-card);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--am-shadow);
}
.am-calc-wrap h3 { color: var(--am-accent); margin-top: 0; }
.am-calc-wrap label { font-family: var(--am-font-heading); font-weight: 600; font-size: 0.9rem; color: var(--am-primary); display: block; margin-bottom: 0.3rem; }
.am-calc-wrap input, .am-calc-wrap select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--am-border);
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  font-family: var(--am-font-body);
  transition: border-color 0.2s;
}
.am-calc-wrap input:focus, .am-calc-wrap select:focus { border-color: var(--am-accent); outline: none; box-shadow: 0 0 0 3px rgba(230,57,70,0.1); }
.am-calc-wrap button {
  background: var(--am-accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-family: var(--am-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.am-calc-wrap button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230,57,70,0.3); }
.am-calc-result {
  background: var(--am-bg);
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}
.am-calc-result .am-result-big {
  font-family: var(--am-font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--am-accent);
}

/* --- Prix badge --- */
.am-prix {
  display: inline-block;
  background: var(--am-accent);
  color: #fff;
  font-family: var(--am-font-heading);
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* --- Badge generic --- */
.am-badge {
  display: inline-block;
  background: var(--am-secondary);
  color: #fff;
  font-family: var(--am-font-heading);
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 5px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* --- Images & figcaptions --- */
.entry-content figure { margin: 2rem 0; }
.entry-content img {
  border-radius: var(--am-radius);
  max-width: 100%;
  height: auto;
}
.entry-content figcaption {
  font-size: 0.84rem;
  color: var(--am-muted);
  margin-top: 0.5rem;
  text-align: center;
  font-style: normal;
}

/* --- Footer --- */
.site-footer {
  background: var(--am-primary);
  color: rgba(255,255,255,0.8);
  padding: 0;
}
.am-footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}
.am-footer-col h4 {
  color: #fff;
  font-family: var(--am-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.am-footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--am-accent);
}
.am-footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; display: block; margin-bottom: 0.4rem; transition: color 0.2s; text-decoration: none; }
.am-footer-col a:hover { color: var(--am-accent); }
.am-footer-brand p { font-size: 0.88rem; line-height: 1.6; margin-top: 0.8rem; color: rgba(255,255,255,0.6); }
.am-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* --- Scroll to top --- */
.am-scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--am-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background 0.2s;
}
.am-scroll-top:hover { background: var(--am-accent); }
.am-scroll-top.visible { display: flex; }

/* --- Responsive --- */
@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body { font-size: 1rem; overflow-x: hidden; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .am-hero { padding: 2.5rem 1.2rem; }
  .am-hero h1 { font-size: 1.7rem; }
  .am-hero p { font-size: 1rem; }
  .am-chiffres { grid-template-columns: repeat(2, 1fr); }
  .am-cards { grid-template-columns: 1fr; }
  .am-footer-main { grid-template-columns: 1fr; gap: 1.5rem; }
  .am-cta { flex-direction: column; text-align: center; }
  .am-bio { flex-direction: column; text-align: center; align-items: center; }
  .am-table-wrap { margin-left: -1rem; margin-right: -1rem; border-radius: 0; }
  .am-table-wrap table { font-size: 0.85rem; }
  .am-table-wrap th, .am-table-wrap td { padding: 0.5rem 0.6rem; }
  .site-header .inside-header { padding: 0.5rem 1rem; }
  p { max-width: 100%; }
}

@media (max-width: 480px) {
  .am-chiffres { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .am-chiffre { padding: 0.8rem; }
  .am-chiffre-valeur { font-size: 1.3rem; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .am-scroll-top, .am-cta, nav { display: none; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}








/* === CATEGORY CARDS SUBTLE BG === */
.am-cats-section {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.am-cats-section .am-card {
  border-left: 4px solid #E63946;
}


/* ================================================
   GP DEFINITIVE OVERRIDES (auto-max v2)
   ================================================ */

/* FOOTER: override GP --base-3 variable */
html body footer.site-footer,
html body .site-footer,
html body .site-info,
html body .inside-site-info,
html body .footer-widgets-container {
  --base-3: #1A1A2E;
  --contrast: #ffffff;
  background: #1A1A2E !important;
  background-color: #1A1A2E !important;
  color: rgba(255,255,255,0.8) !important;
}
html body .site-footer *,
html body .site-info * {
  color: rgba(255,255,255,0.75);
}
html body .site-footer a,
html body .site-info a {
  color: rgba(255,255,255,0.75) !important;
  text-decoration: none;
}
html body .site-footer a:hover,
html body .site-info a:hover {
  color: #E63946 !important;
}
html body .site-footer h4,
html body .am-footer-col h4 {
  color: #FFFFFF !important;
}

/* SIDEBAR: force hide */
#right-sidebar, #left-sidebar, .widget-area, aside.widget-area {
  display: none !important;
}
.content-area, #primary, .site-content .content-area {
  width: 100% !important;
  float: none !important;
}

/* HEADER: clean styling */
html body .site-header {
  background: #FFFFFF !important;
  border-bottom: 3px solid #1A1A2E;
}
html body .main-title,
html body .site-branding {
  display: none !important;
}
html body .site-logo a {
  text-decoration: none !important;
}

/* Hero button: force white on red */
html body .am-hero a,
html body .am-hero .am-hero-btn {
  color: #FFFFFF !important;
  text-decoration: none !important;
}

/* CTA buttons: force white text */
html body .am-cta-btn {
  color: #FFFFFF !important;
  text-decoration: none !important;
}

/* === HOMEPAGE SECTIONS CONTRAST === */
.am-tools-section {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D3047 100%) !important;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin: 3rem 0;
}
.am-tools-section h2 {
  color: #FFFFFF !important;
  border: none !important;
  text-align: center;
}
.am-tools-section .am-card {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06) !important;
}
.am-tools-section .am-card:hover {
  background: rgba(255,255,255,0.12) !important;
}
.am-tools-section .am-card-body p {
  color: rgba(255,255,255,0.7) !important;
}
.am-tools-section .am-card-body h3 {
  color: #E63946 !important;
}
.am-tools-section .am-cta-btn {
  background: #E63946 !important;
  color: #FFFFFF !important;
}

.am-cats-section {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.am-cats-section .am-card {
  border-left: 4px solid #E63946;
}

/* === COMMENTS FORM STYLED === */
.comments-area {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--am-border, #DEE2E6);
}
.comments-area .comment-reply-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #1A1A2E;
}
.comments-area label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1A1A2E;
  display: block;
  margin-bottom: 0.3rem;
}
.comments-area input[type='text'],
.comments-area input[type='email'],
.comments-area textarea {
  width: 100%;
  max-width: 500px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #DEE2E6;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.comments-area input:focus,
.comments-area textarea:focus {
  border-color: #E63946;
  outline: none;
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}
.comments-area textarea {
  max-width: 100%;
}
.comments-area .form-submit input[type='submit'] {
  background: #E63946 !important;
  color: #FFFFFF !important;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.comments-area .form-submit input[type='submit']:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230,57,70,0.3);
}
.comment-notes {
  font-size: 0.85rem;
  color: #6C757D;
}
