/* ================================================================
   TELEPILOTE SAS — Inner Pages CSS
   Fixes inline-styled WordPress content (missing display properties)
   ================================================================ */

/* ===== CSS VARIABLES (used in inline styles) ===== */
:root {
  --teal: #2BBCC0; --teal-d: #229A9D; --teal-l: #E8F8F8; --teal-xl: #F3FCFC;
  --navy: #1B2A4A; --navy-d: #0F1B33; --navy-m: #162240;
  --orange: #E8761B; --orange-l: #FFF3E8;
  --lime: #8CB82B; --lime-l: #F3F9E8;
  --white: #FFF; --off: #F7F9FC; --gray: #EEF1F5;
  --text: #2D3142; --text-l: #5A6178; --text-m: #8B90A0;
  --border: #E2E6ED;
  --r-s: 8px; --r: 14px; --r-l: 22px; --r-xl: 30px;
  --sh-s: 0 1px 3px rgba(27,42,74,.06);
  --sh-m: 0 4px 16px rgba(27,42,74,.08);
  --sh-l: 0 8px 32px rgba(27,42,74,.12);
}

/* ===== BREADCRUMB (custom tp-breadcrumb) ===== */
nav.tp-breadcrumb,
.tp-breadcrumb {
  background: #F7F9FC;
  padding: 10px 0;
  font-size: .82rem;
  color: var(--text-m);
  border-bottom: 1px solid var(--border);
}
.tp-breadcrumb .tp-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}
.tp-breadcrumb a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}
.tp-breadcrumb a:hover {
  text-decoration: underline;
}
.tp-breadcrumb-sep {
  margin: 0 8px;
  color: var(--text-m);
  font-size: .9em;
}
.tp-breadcrumb-current {
  color: var(--text-l);
  font-weight: 500;
}

/* ===== CRITICAL: Fix missing display properties on inline-styled elements ===== */
/* Grid containers: any div with grid-template-columns needs display:grid */
div[style*="grid-template-columns"] {
  display: grid !important;
}

/* Flex containers: divs with gap + justify-content or flex-wrap */
div[style*="gap"][style*="justify-content"],
div[style*="gap"][style*="flex-wrap"] {
  display: flex !important;
}

/* Summary elements with flex properties */
summary[style*="justify-content"],
summary[style*="align-items"] {
  display: flex !important;
}

/* Inline links used as buttons - need inline-flex for alignment */
a[style*="padding"][style*="border-radius"][style*="background"] {
  display: inline-flex !important;
  align-items: center;
  text-decoration: none !important;
  transition: opacity .2s ease, transform .2s ease;
}
a[style*="padding"][style*="border-radius"][style*="background"]:hover {
  opacity: .9;
  transform: translateY(-1px);
}

/* Links used as card blocks */
a[style*="border-radius"][style*="padding"][style*="border"] {
  display: block !important;
  text-decoration: none !important;
  transition: box-shadow .2s ease, transform .2s ease;
}
a[style*="border-radius"][style*="padding"][style*="border"]:hover {
  box-shadow: var(--sh-m);
  transform: translateY(-2px);
}

/* Divs with flex alignment props but no display */
div[style*="align-items"][style*="justify-content"] {
  display: flex !important;
}

/* ===== INNER PAGE LAYOUT ===== */
.tp-main {
  min-height: 60vh;
}

/* Fix Astra container on inner pages */
.tp-main .ast-container,
.tp-main .ast-article-single,
.tp-main .entry-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* The old .container class used in page content */
.tp-main .container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hub hero (used on centres, contact, blog pages) */
.hub-hero {
  background: linear-gradient(135deg, #1B2A4A, #0F1B33);
  padding: clamp(50px, 8vw, 80px) 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 -20px;
}
.hub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 30%, rgba(43,188,192,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hub-hero h1 {
  color: #fff !important;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}
.hub-hero p {
  color: rgba(255,255,255,.75);
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ===== HERO SECTIONS (inline-styled dark heroes) ===== */
/* Fix hero overlay divs with position:absolute but no dimensions */
div[style*="position:absolute"][style*="radial-gradient"] {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* ===== FORMATION PAGES (template classes) ===== */
.tp-hero {
  background: linear-gradient(165deg, #06101F 0%, #0B1D3A 40%, #112B52 100%);
  padding: clamp(60px, 10vw, 120px) 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tp-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.tp-hero-badge {
  display: inline-block;
  background: rgba(43,188,192,.15);
  color: #2BBCC0;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.tp-hero h1 {
  color: #fff !important;
  font-size: clamp(1.6rem, 4.5vw, 2.8rem);
  margin-bottom: 14px;
  letter-spacing: -.02em;
}
.tp-hero-sub {
  color: rgba(255,255,255,.8);
  font-size: clamp(.9rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 24px;
}

/* Hero stats */
.tp-hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tp-hero-stats > div {
  text-align: center;
}
.tp-stat-num {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
}
.tp-stat-lbl {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
}

/* Hero buttons */
.tp-hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-f {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: all .2s ease;
  min-height: 48px;
}
.btn-f-p {
  background: #F5820D;
  color: #fff;
}
.btn-f-p:hover {
  background: #e07409;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,130,13,.3);
}
.btn-f-o {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.btn-f-o:hover {
  background: rgba(255,255,255,.15);
}

/* Trust bar */
.tp-trust {
  background: #f0f4f8;
  border-top: 1px solid #e2e6ed;
  padding: 16px 0;
}
.tp-trust-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
}
.tp-trust-inner span {
  font-size: .72rem;
  color: #5A6178;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tp-trust-inner img {
  height: 32px;
  width: auto;
  opacity: .7;
  filter: grayscale(100%);
  transition: all .2s ease;
}
.tp-trust-inner img:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* Formation body */
.tp-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Formation fiche */
.tp-fiche {
  background: linear-gradient(135deg, #F3FCFC, #E8F8F8);
  border-radius: 16px;
  padding: 28px;
  margin: 32px 0;
}
.tp-fiche h2 {
  color: var(--navy);
  margin-bottom: 16px;
  font-size: 1.3rem;
}
.tp-fiche table {
  width: 100%;
  border-collapse: collapse;
}
.tp-fiche td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(43,188,192,.15);
  font-size: .9rem;
  vertical-align: top;
}
.tp-fiche td:first-child {
  font-weight: 600;
  color: var(--navy);
  width: 40%;
}
.tp-fiche td:last-child {
  color: var(--text-l);
}

/* FAQ accordion */
.tp-faq-section {
  margin: 40px 0;
}
.tp-faq-section h2 {
  color: var(--navy);
  margin-bottom: 20px;
}
details {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow .2s ease;
}
details[open] {
  box-shadow: var(--sh-s);
}
details summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  font-size: .92rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--teal);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}
details[open] summary::after {
  content: '\2212';
  transform: rotate(180deg);
}
details > div,
details > p {
  padding: 0 20px 16px;
  font-size: .88rem;
  color: var(--text-l);
  line-height: 1.7;
}

/* CTA section */
.tp-cta-section {
  background: linear-gradient(135deg, #1B2A4A, #0F1B33);
  padding: clamp(40px, 6vw, 60px) 20px;
  text-align: center;
  margin: 40px 0 0;
}
.tp-cta-inner {
  max-width: 640px;
  margin: 0 auto;
}
.tp-cta-section h2 {
  color: #fff;
  margin-bottom: 12px;
}
.tp-cta-section p {
  color: rgba(255,255,255,.75);
  margin-bottom: 24px;
}
.tp-cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BLOG CARDS (inline-styled) ===== */
/* Category badge - missing background */
span[style*="position:absolute"][style*="border-radius:50px"][style*="font-weight:700"] {
  background: rgba(43,188,192,.12) !important;
}

/* Card image placeholder */
div[style*="height:180px"][style*="overflow:hidden"] {
  background: linear-gradient(135deg, #1B2A4A, #112B52);
  display: flex;
  align-items: center;
  justify-content: center;
}
div[style*="height:180px"][style*="overflow:hidden"]::after {
  content: '\1F4F0';
  font-size: 3rem;
  opacity: .3;
}

/* Product image placeholder (drone store) */
div[style*="min-height:200px"][style*="background:#F7F9FC"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
div[style*="min-height:200px"][style*="background:#F7F9FC"]::after {
  content: '\1F681';
  font-size: 3.5rem;
  opacity: .2;
}

/* ===== CONTACT PAGE ===== */
/* Make contact hero work when content is minimal */
.page-id-229 .tp-main .container,
.page-slug-contact .tp-main .container {
  max-width: 100% !important;
  padding: 0 !important;
}

/* ===== INNER PAGE FORMS ===== */
.tp-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tp-form input,
.tp-form select,
.tp-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tp-form input:focus,
.tp-form select:focus,
.tp-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(43,188,192,.15);
}
.tp-form button[type="submit"] {
  background: #F5820D;
  color: #fff;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s ease;
}
.tp-form button[type="submit"]:hover {
  background: #e07409;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,130,13,.3);
}
.tp-form-legal {
  font-size: .72rem;
  color: var(--text-m);
  text-align: center;
  line-height: 1.5;
}

/* Success/error messages */
.tp-msg-ok {
  background: #E8F8F0;
  color: #0B6B3A;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}
.tp-msg-err {
  background: #FEE;
  color: #B91C1C;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}

/* ===== IMAGE WRAPS ===== */
.tp-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  margin: 24px 0;
}
.tp-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== ENTRY CONTENT TYPOGRAPHY (Astra inner pages) ===== */
.entry-content h2 {
  color: var(--navy);
  margin: 32px 0 16px;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}
.entry-content h3 {
  color: var(--navy);
  margin: 24px 0 12px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}
.entry-content p {
  margin-bottom: 14px;
  line-height: 1.7;
  color: var(--text);
}
.entry-content a {
  color: var(--teal);
  font-weight: 600;
}
.entry-content a:hover {
  text-decoration: underline;
}
.entry-content ul,
.entry-content ol {
  margin: 14px 0;
  padding-left: 24px;
}
.entry-content li {
  margin-bottom: 8px;
  line-height: 1.6;
  list-style: disc;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tp-hero-stats {
    gap: 12px;
  }
  .tp-hero-btns,
  .tp-cta-btns {
    flex-direction: column;
    align-items: center;
  }
  .btn-f {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
  .tp-form-row {
    grid-template-columns: 1fr;
  }
  .tp-trust-inner img {
    height: 24px;
  }
  .hub-hero {
    padding: clamp(30px, 6vw, 50px) 16px;
    margin: 0 -16px;
  }
  /* Fix grids on mobile */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* Fix inline flex containers on mobile */
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .tp-fiche td {
    display: block;
    width: 100%;
  }
  .tp-fiche td:first-child {
    padding-bottom: 2px;
    border-bottom: none;
  }
}
