/**
 * ==============================================================================
 * COUCHE 01 - DISPOSITION : CONTENEURS, GRILLES & POINTS DE RUPTURE
 * Thème : The Timer's (thetimers)
 * ==============================================================================
 * BREAKPOINTS CONTRACTUELS :
 * - Mobile    : < 600px
 * - Tablette  : 600px à 1023px
 * - Bureau/PC : >= 1024px
 */

/* 1. Structure sémantique verticale globale */
.wp-site-blocks > * {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

.tt-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 !important;
  padding: 0 !important;
  background-color: var(--wp--preset--color--base, #FFFFFF);
  border-bottom: 1px solid var(--wp--preset--color--border, #E9E9E9);
  box-shadow: 0 2px 10px rgba(39, 35, 97, 0.04);
}

.tt-header > * {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

@media (min-width: 783px) {
  .admin-bar .tt-header {
    top: 32px;
  }
}

.tt-top-bar,
.wp-block-group.tt-top-bar.has-background {
  background-color: #F6F6F9 !important;
  border-bottom: 1px solid #EAEAEF;
  margin: 0 !important;
  padding: 0.4375rem 1rem !important;
  font-size: 0.84375rem;
  line-height: 1.4;
  color: var(--wp--preset--color--contrast-2, #555B62);
  text-align: center;
}

.tt-top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.tt-top-bar__text {
  margin: 0 !important;
  font-size: 0.84375rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

@media (max-width: 420px) {
  .tt-top-bar,
  .wp-block-group.tt-top-bar.has-background {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.8125rem;
  }
  .tt-top-bar__text {
    font-size: 0.8125rem;
  }
}

.tt-top-bar a {
  color: var(--wp--preset--color--primary, #272361);
  font-weight: 500;
  text-decoration: none;
}

.tt-top-bar a:hover {
  text-decoration: underline;
}

.tt-top-bar__sep {
  color: #C4C4CC;
  padding: 0 0.35rem;
}

.tt-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
}

.tt-footer {
  width: 100%;
  margin-top: auto;
  background-color: var(--wp--preset--color--primary, #272361);
  color: var(--wp--preset--color--base, #FFFFFF);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 2. Conteneurs centraux et marges de sécurité horizontales unifiées (1200px)
   Aucune section ne doit jamais toucher les bords de l'écran sur mobile. */
.tt-container {
  width: 100%;
  max-width: var(--wp--style--global--content-size, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}

.tt-container--wide {
  max-width: var(--wp--style--global--wide-size, 1360px);
}

/* 3. Comportement réactif selon les breakpoints contractuels */

/* --- MOBILE (< 600px) : 20px de marge de sécurité garantie de chaque côté --- */
@media (max-width: 599px) {
  .tt-container {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}

/* --- TABLETTE (600px - 1023px) : 28px de chaque côté --- */
@media (min-width: 600px) and (max-width: 1023px) {
  .tt-container {
    padding-left: 1.75rem !important;
    padding-right: 1.75rem !important;
  }
}

/* --- BUREAU / PC (>= 1024px) : 32px de chaque côté --- */
@media (min-width: 1024px) {
  .tt-container {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* Neutralisation du double-padding éventuel de Gutenberg sur le parent .has-global-padding
   pour que .tt-container soit l'unique référence de largeur sur 100 % des sections. */
.has-global-padding:has(> .tt-container) {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Neutralisation du margin-block-start automatique de Gutenberg (.is-layout-flow > *)
   à l'intérieur de nos conteneurs CSS Grid et Flexbox pour garantir un alignement
   horizontal et vertical strict au pixel près sur toutes les colonnes. */
:where(
  .tt-header__inner,
  .tt-footer__inner,
  .tt-footer__grid,
  .tt-footer__col,
  .tt-footer__bottom,
  .tt-featured-header,
  .tt-faq-header,
  .tt-trust-grid,
  .tt-founder-card,
  .tt-products-grid,
  .tt-seo-box,
  .tt-shop-toolbar,
  .tt-shop-concierge,
  .tt-single-product__layout,
  .tt-post-grid,
  .tt-post-card__body,
  .tt-post-card__footer,
  .tt-contact,
  .tt-contact-channels,
  .tt-about-intro-grid,
  .tt-about-commitments-grid,
  .tt-auth-grid
) > * {
  margin-block-start: 0 !important;
  margin-top: 0 !important;
}

/* Pages standard : respiration verticale et conteneur harmonisé (1200px) */
.tt-page {
  padding-top: var(--wp--preset--spacing--60, 2rem);
  padding-bottom: var(--wp--preset--spacing--80, 4.5rem);
}

/* Si une page WooCommerce native (Panier, Commande, Mon compte) emprunte page.php,
   on conserve un affichage 100 % natif sans bandeau décoratif (ADR-004). */
body.woocommerce-cart .tt-page__header,
body.woocommerce-checkout .tt-page__header,
body.woocommerce-account .tt-page__header {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 1.5rem !important;
}

body.woocommerce-cart .tt-page__header .tt-eyebrow,
body.woocommerce-checkout .tt-page__header .tt-eyebrow,
body.woocommerce-account .tt-page__header .tt-eyebrow {
  display: none !important;
}

.tt-wc-native {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

.tt-wc-native > * {
  max-width: 100% !important;
}
