/*
Theme Name:   GrandTourer Child
Theme URI:    https://grandtourer.fr
Description:  Kadence child theme for GrandTourer — accessoires et technologie pour voitures de luxe.
Author:       GrandTourer
Template:     kadence
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         child-theme, kadence, luxury, automotive
Text Domain:  grandtourer-child
*/

/* =========================================================
   GRANDTOURER BRAND VARIABLES
   Override Kadence's global palette
   ========================================================= */
:root {
  /* Kadence Global Palette overrides */
  --global-palette1: #1A2E5A;   /* deep navy — primary brand */
  --global-palette2: #2E5090;   /* mid blue — secondary */
  --global-palette3: #C8A020;   /* gold — luxury accent */
  --global-palette4: #1A1A2E;   /* near-black text */
  --global-palette5: #3D3D5C;   /* medium grey text */
  --global-palette6: #6B7280;   /* light grey text */
  --global-palette7: #F4F6FB;   /* very light blue-grey bg */
  --global-palette8: #FFFFFF;   /* white */
  --global-palette9: #EBF0FA;   /* stripe / tinted bg */

  /* GrandTourer custom tokens */
  --ap-navy:        #1A2E5A;
  --ap-blue:        #2E5090;
  --ap-gold:        #C8A020;
  --ap-gold-light:  #F0D870;
  --ap-dark:        #1A1A2E;
  --ap-grey:        #4B5563;
  --ap-light:       #F4F6FB;
  --ap-white:       #FFFFFF;
  --ap-stripe:      #EBF0FA;
  --ap-border:      #D1D9E6;

  /* Typography */
  --ap-font-heading: 'Cormorant Garant', 'Playfair Display', Georgia, serif;
  --ap-font-body:    'Inter', 'Lato', sans-serif;

  /* Spacing */
  --ap-radius:       6px;
  --ap-radius-lg:    12px;
  --ap-shadow:       0 2px 12px rgba(26,46,90,0.08);
  --ap-shadow-hover: 0 6px 24px rgba(26,46,90,0.16);
}

/* =========================================================
   GOOGLE FONTS IMPORT
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* =========================================================
   GLOBAL BASE
   ========================================================= */
body {
  font-family: var(--ap-font-body);
  color: var(--ap-dark);
  background-color: var(--ap-white);
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.entry-title,
.site-title {
  font-family: var(--ap-font-heading);
  color: var(--ap-navy);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1, .h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2, .h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; }
h3, .h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4, .h4 { font-size: 1.2rem; font-weight: 600; }

p { line-height: 1.75; margin-bottom: 1.25rem; }

a {
  color: var(--ap-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--ap-gold); }

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */
.site-header,
#masthead {
  background-color: var(--ap-navy) !important;
  border-bottom: 3px solid var(--ap-gold);
  box-shadow: 0 2px 16px rgba(26,46,90,0.25);
}

.site-branding .site-title a,
.site-title a {
  color: var(--ap-white) !important;
  font-family: var(--ap-font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Nav links */
.main-navigation a,
.kadence-navigation a,
.primary-menu a {
  color: rgba(255,255,255,0.88) !important;
  font-family: var(--ap-font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.main-navigation a:hover,
.kadence-navigation a:hover,
.primary-menu a:hover {
  color: var(--ap-gold) !important;
}

/* Active/current nav item */
.main-navigation .current-menu-item > a,
.primary-menu .current-menu-item > a {
  color: var(--ap-gold) !important;
  border-bottom: 2px solid var(--ap-gold);
}

/* Dropdown menus */
.main-navigation .sub-menu,
.kadence-navigation .sub-menu {
  background-color: var(--ap-navy) !important;
  border-top: 2px solid var(--ap-gold);
  box-shadow: var(--ap-shadow-hover);
}
.main-navigation .sub-menu a {
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* =========================================================
   LOGO / SITE IDENTITY
   ========================================================= */
.custom-logo {
  max-height: 48px;
  width: auto;
}

/* Tagline */
.site-description {
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   HERO / BANNER SECTION
   ========================================================= */
.ap-hero {
  background: linear-gradient(135deg, var(--ap-navy) 0%, #0F1E3A 60%, #1A2E5A 100%);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ap-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C8A020' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

.ap-hero h1 {
  color: var(--ap-white);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  position: relative;
}

.ap-hero h1 span.accent {
  color: var(--ap-gold);
}

.ap-hero p.lead {
  color: rgba(255,255,255,0.78);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.wp-element-button,
.wp-block-button__link,
button,
input[type="submit"],
.btn,
.ap-btn {
  background-color: var(--ap-gold) !important;
  color: var(--ap-navy) !important;
  border: none;
  border-radius: var(--ap-radius);
  padding: 0.75rem 1.75rem;
  font-family: var(--ap-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(200,160,32,0.3);
}

.wp-element-button:hover,
.wp-block-button__link:hover,
button:hover,
.btn:hover,
.ap-btn:hover {
  background-color: #A88010 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200,160,32,0.45);
}

/* Secondary button */
.ap-btn-secondary {
  background-color: transparent !important;
  color: var(--ap-navy) !important;
  border: 2px solid var(--ap-navy) !important;
  box-shadow: none !important;
}
.ap-btn-secondary:hover {
  background-color: var(--ap-navy) !important;
  color: var(--ap-white) !important;
}

/* CTA button — gold outline on dark bg */
.ap-btn-outline-gold {
  background-color: transparent !important;
  color: var(--ap-gold) !important;
  border: 2px solid var(--ap-gold) !important;
  box-shadow: none !important;
}
.ap-btn-outline-gold:hover {
  background-color: var(--ap-gold) !important;
  color: var(--ap-navy) !important;
}

/* Amazon CTA specific */
.ap-amazon-btn {
  background-color: #FF9900 !important;
  color: #111111 !important;
  border-radius: 4px;
  font-size: 0.82rem;
  padding: 0.6rem 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.ap-amazon-btn::before {
  content: '→';
  font-weight: 700;
}

/* =========================================================
   ARTICLE / POST CARDS
   ========================================================= */
.post-card,
.wp-block-post,
article.type-post {
  border-radius: var(--ap-radius-lg);
  overflow: hidden;
  box-shadow: var(--ap-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  background: var(--ap-white);
  border: 1px solid var(--ap-border);
}

.post-card:hover,
article.type-post:hover {
  box-shadow: var(--ap-shadow-hover);
  transform: translateY(-3px);
}

/* Category badge */
.entry-meta .cat-links a,
.post-categories a,
.ap-category-badge {
  background-color: var(--ap-navy);
  color: var(--ap-white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  display: inline-block;
}

/* Post title in card */
.entry-title a,
.post-title a {
  color: var(--ap-navy);
  font-family: var(--ap-font-heading);
  transition: color 0.2s;
}
.entry-title a:hover,
.post-title a:hover {
  color: var(--ap-gold);
}

/* Read more link */
.read-more-link,
.more-link {
  color: var(--ap-blue);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}
.read-more-link:hover { color: var(--ap-gold); }

/* =========================================================
   SINGLE ARTICLE / POST
   ========================================================= */
.single .entry-header {
  border-bottom: 3px solid var(--ap-gold);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.single .entry-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.75rem;
}

/* Article meta (date, author, category) */
.entry-meta {
  font-size: 0.82rem;
  color: var(--ap-grey);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

/* Article content */
.entry-content h2 {
  border-left: 4px solid var(--ap-gold);
  padding-left: 0.75rem;
  margin-top: 2.5rem;
}

.entry-content h3 {
  color: var(--ap-blue);
  margin-top: 2rem;
}

/* Blockquote */
.entry-content blockquote,
blockquote {
  border-left: 4px solid var(--ap-gold);
  background: var(--ap-stripe);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--ap-radius) var(--ap-radius) 0;
  font-style: italic;
  color: var(--ap-navy);
}

/* =========================================================
   PRODUCT COMPARISON TABLE
   ========================================================= */
.ap-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  box-shadow: var(--ap-shadow);
  border-radius: var(--ap-radius-lg);
  overflow: hidden;
}

.ap-comparison-table thead th {
  background-color: var(--ap-navy);
  color: var(--ap-white);
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--ap-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ap-comparison-table tbody tr:nth-child(even) {
  background-color: var(--ap-stripe);
}

.ap-comparison-table tbody tr:hover {
  background-color: #DBE4F5;
}

.ap-comparison-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--ap-border);
  vertical-align: middle;
  color: var(--ap-dark);
}

.ap-comparison-table td:first-child {
  font-weight: 600;
  color: var(--ap-navy);
}

/* Top pick badge in table */
.ap-top-pick {
  background-color: var(--ap-gold);
  color: var(--ap-navy);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.4rem;
}

/* =========================================================
   RECOMMENDATION / CTA BOX
   ========================================================= */
.ap-recommendation-box {
  background: linear-gradient(135deg, #F8F5E8 0%, #FDF9EC 100%);
  border: 2px solid var(--ap-gold);
  border-radius: var(--ap-radius-lg);
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  position: relative;
}

.ap-recommendation-box::before {
  content: '★ Notre recommandation';
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  background: var(--ap-gold);
  color: var(--ap-navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.75rem;
  border-radius: 3px;
}

.ap-recommendation-box h4 {
  color: var(--ap-navy);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.ap-recommendation-box p {
  font-size: 0.95rem;
  color: #4A3A0A;
  margin-bottom: 1rem;
}

/* =========================================================
   INFO / TIP BOX
   ========================================================= */
.ap-info-box {
  background: var(--ap-stripe);
  border-left: 4px solid var(--ap-blue);
  border-radius: 0 var(--ap-radius) var(--ap-radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.ap-info-box p { margin-bottom: 0; font-size: 0.92rem; }

.ap-warning-box {
  background: #FEF3C7;
  border-left: 4px solid #D97706;
  border-radius: 0 var(--ap-radius) var(--ap-radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

/* =========================================================
   AFFILIATE DISCLAIMER
   ========================================================= */
.ap-affiliate-disclaimer {
  background: #F9FAFB;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 0.9rem 1.2rem;
  margin: 2rem 0 0;
  font-size: 0.78rem;
  color: var(--ap-grey);
  font-style: italic;
  line-height: 1.6;
}

.ap-affiliate-disclaimer::before {
  content: '📌 ';
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.widget-area,
#secondary {
  padding-left: 1.5rem;
}

.widget {
  background: var(--ap-white);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--ap-shadow);
}

.widget-title,
.widgettitle {
  font-family: var(--ap-font-heading);
  color: var(--ap-navy);
  font-size: 1.1rem;
  font-weight: 600;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ap-gold);
  margin-bottom: 1rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer,
#colophon {
  background-color: var(--ap-navy);
  color: rgba(255,255,255,0.7);
  border-top: 3px solid var(--ap-gold);
  padding: 3rem 0 1.5rem;
}

.site-footer a {
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--ap-gold); }

.site-footer h3,
.footer-widget-title {
  color: var(--ap-white);
  font-family: var(--ap-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(200,160,32,0.3);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer ul li {
  padding: 0.3rem 0;
  font-size: 0.875rem;
}

/* Footer bottom bar */
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.breadcrumb-trail,
.rank-math-breadcrumb {
  font-size: 0.82rem;
  color: var(--ap-grey);
  padding: 0.6rem 0;
  margin-bottom: 1.25rem;
}

.breadcrumb-trail a,
.rank-math-breadcrumb a {
  color: var(--ap-blue);
}
.breadcrumb-trail a:hover,
.rank-math-breadcrumb a:hover { color: var(--ap-gold); }

/* =========================================================
   SEARCH
   ========================================================= */
.search-form input[type="search"] {
  border: 2px solid var(--ap-border);
  border-radius: var(--ap-radius) 0 0 var(--ap-radius);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-form input[type="search"]:focus {
  border-color: var(--ap-blue);
}
.search-form input[type="submit"] {
  border-radius: 0 var(--ap-radius) var(--ap-radius) 0 !important;
  padding: 0.6rem 1.1rem !important;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination .page-numbers,
.nav-links a {
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
  color: var(--ap-blue);
  transition: all 0.2s;
}
.pagination .page-numbers:hover,
.nav-links a:hover {
  background: var(--ap-blue);
  color: var(--ap-white);
  border-color: var(--ap-blue);
}
.pagination .current {
  background: var(--ap-navy);
  color: var(--ap-white);
  border-color: var(--ap-navy);
}

/* =========================================================
   TABLE OF CONTENTS (Rank Math)
   ========================================================= */
.rank-math-toc-widget-title,
.wp-block-rank-math-toc-block h2 {
  font-size: 1rem !important;
  color: var(--ap-navy) !important;
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ap-gold);
}

.rank-math-toc-widget-wrapper,
.wp-block-rank-math-toc-block {
  background: var(--ap-stripe);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.wp-block-rank-math-toc-block ol {
  font-size: 0.9rem;
}
.wp-block-rank-math-toc-block a {
  color: var(--ap-blue);
}
.wp-block-rank-math-toc-block a:hover { color: var(--ap-gold); }

/* =========================================================
   IMAGES
   ========================================================= */
.entry-content img,
.wp-post-image {
  border-radius: var(--ap-radius);
  max-width: 100%;
  height: auto;
}

figure.wp-block-image figcaption {
  font-size: 0.8rem;
  color: var(--ap-grey);
  text-align: center;
  font-style: italic;
  margin-top: 0.4rem;
}

/* =========================================================
   STAR RATINGS
   ========================================================= */
.ap-stars {
  color: var(--ap-gold);
  font-size: 1rem;
  letter-spacing: 0.05em;
}
.ap-rating-label {
  font-size: 0.8rem;
  color: var(--ap-grey);
  margin-left: 0.3rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .widget-area, #secondary {
    padding-left: 0;
    margin-top: 2rem;
  }

  .ap-comparison-table {
    font-size: 0.8rem;
  }

  .ap-comparison-table td,
  .ap-comparison-table th {
    padding: 0.6rem 0.75rem;
  }

  .ap-hero {
    padding: 3rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .ap-comparison-table thead {
    display: none;
  }
  .ap-comparison-table td {
    display: block;
    border: none;
    border-bottom: 1px solid var(--ap-border);
  }
  .ap-comparison-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--ap-grey);
    display: block;
    margin-bottom: 0.2rem;
  }
}

/* =========================================================
   UTILITY CLASSES
   ========================================================= */
.ap-text-gold   { color: var(--ap-gold) !important; }
.ap-text-navy   { color: var(--ap-navy) !important; }
.ap-text-blue   { color: var(--ap-blue) !important; }
.ap-bg-light    { background-color: var(--ap-light) !important; }
.ap-bg-stripe   { background-color: var(--ap-stripe) !important; }
.ap-divider-gold {
  border: none;
  border-top: 2px solid var(--ap-gold);
  margin: 2rem 0;
  opacity: 0.4;
}
