/**
 * hx-page-interne.css  v1.0
 * Styles pour page-sous-page.php (template "Sous-page — Layout interne")
 * Palette Hybster · Inspiré Avantage/HR BoldThemes
 */

/* ══════════════════════════════════════════════════════
   0 · Variables
══════════════════════════════════════════════════════ */
:root {
  --hx-navy:         #0f1b35;
  --hx-blue:         #0055b1;
  --hx-blue-dark:    #003d82;
  --hx-blue-light:   #e8f0fc;
  --hx-blue-mid:     #2563eb;
  --hx-accent:       #38bdf8;
  --hx-green:        #10b981;
  --hx-bg:           #f4f6fb;
  --hx-bg2:          #eef3fc;
  --hx-border:       #dde4f0;
  --hx-text:         #1a2540;
  --hx-muted:        #64748b;
  --hx-white:        #ffffff;
  --hx-radius:       10px;
  --hx-radius-lg:    18px;
  --hx-shadow:       0 2px 12px rgba(15,27,53,.09);
  --hx-shadow-lg:    0 8px 32px rgba(15,27,53,.14);
  --hx-trans:        .22s ease;
  --hx-maxw:         1200px;
}

/* ══════════════════════════════════════════════════════
   1 · Reset & Base
══════════════════════════════════════════════════════ */
.hx-sp-wrap *,
.hx-sp-wrap *::before,
.hx-sp-wrap *::after {
  box-sizing: border-box;
}

.hx-sp-wrap {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--hx-text);
  background: var(--hx-bg);
  line-height: 1.65;
}

.hx-sp-inner {
  max-width: var(--hx-maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ══════════════════════════════════════════════════════
   2 · HERO
══════════════════════════════════════════════════════ */
.hx-sp-hero {
  position: relative;
  background: linear-gradient(135deg, var(--hx-navy) 0%, var(--hx-blue-dark) 55%, var(--hx-blue) 100%);
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

/* Variante avec image de fond */
.hx-sp-hero--img {
  background-image: var(--hx-sp-hero-bg);
  background-size: cover;
  background-position: center;
}

.hx-sp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,27,53,.88) 0%, rgba(0,61,130,.82) 100%);
}

/* Décoration géométrique fond */
.hx-sp-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.10) 0%, transparent 70%);
  pointer-events: none;
}

.hx-sp-hero .hx-sp-inner {
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.hx-sp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem;
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1.4rem;
}

.hx-sp-breadcrumb a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color var(--hx-trans);
}

.hx-sp-breadcrumb a:hover { color: #fff; }

.hx-sp-breadcrumb__sep {
  color: rgba(255,255,255,.35);
  font-size: .9em;
}

.hx-sp-breadcrumb [aria-current="page"] {
  color: var(--hx-accent);
  font-weight: 600;
}

/* Titre hero */
.hx-sp-hero__content {}

.hx-sp-hero__title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 .75rem;
  letter-spacing: -.01em;
  position: relative;
}

/* Ligne accent sous le titre */
.hx-sp-hero__title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--hx-accent), var(--hx-blue-mid));
  border-radius: 2px;
  margin-top: .8rem;
}

.hx-sp-hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  max-width: 600px;
  margin: 1.2rem 0 0;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   3 · BODY — Layout 2 colonnes
══════════════════════════════════════════════════════ */
.hx-sp-body {
  padding: 3rem 0 4rem;
}

.hx-sp-body__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ══════════════════════════════════════════════════════
   4 · SIDEBAR
══════════════════════════════════════════════════════ */
.hx-sp-sidebar {
  position: sticky;
  top: 100px; /* mis à jour via JS selon hauteur header */
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Carte générique sidebar */
.hx-sp-sidebar__card {
  background: var(--hx-white);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  box-shadow: var(--hx-shadow);
  overflow: hidden;
}

/* ── Carte identité ── */
.hx-sp-sidebar__card--id {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
}

/* Bande couleur en haut */
.hx-sp-sidebar__card--id::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: linear-gradient(135deg, var(--hx-blue-dark), var(--hx-blue));
}

/* Photo */
.hx-sp-sidebar__photo {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.hx-sp-sidebar__photo img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--hx-white);
  box-shadow: var(--hx-shadow-lg);
  display: block;
}

.hx-sp-sidebar__photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed rgba(56,189,248,.5);
  animation: hx-spin 18s linear infinite;
}

@keyframes hx-spin {
  to { transform: rotate(360deg); }
}

.hx-sp-sidebar__photo--empty {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hx-blue-light), var(--hx-bg2));
  border: 4px solid var(--hx-white);
  box-shadow: var(--hx-shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hx-sp-sidebar__photo-icon {
  font-size: 2.2rem;
}

.hx-sp-sidebar__name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--hx-navy);
  margin-bottom: .2rem;
}

.hx-sp-sidebar__role {
  font-size: .8rem;
  color: var(--hx-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1.2rem;
}

/* Infos liste */
.hx-sp-sidebar__infos {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--hx-border);
  padding-top: 1rem;
}

.hx-sp-sidebar__info-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--hx-bg2);
}

.hx-sp-sidebar__info-item:last-child {
  border-bottom: none;
}

.hx-sp-sidebar__info-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

.hx-sp-sidebar__info-label {
  display: block;
  font-size: .72rem;
  color: var(--hx-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  line-height: 1.2;
}

.hx-sp-sidebar__info-val {
  display: block;
  font-size: .88rem;
  color: var(--hx-text);
  font-weight: 500;
  line-height: 1.4;
}

/* ── Navigation latérale ── */
.hx-sp-sidebar__nav {
  padding: 1.2rem 0 .8rem;
}

.hx-sp-sidebar__nav-title {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hx-muted);
  padding: 0 1.2rem .6rem;
  border-bottom: 1px solid var(--hx-border);
  margin-bottom: .4rem;
}

.hx-sp-sidebar__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hx-sp-sidebar__nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1.2rem;
  font-size: .84rem;
  color: var(--hx-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--hx-trans);
}

.hx-sp-sidebar__nav-link:hover {
  background: var(--hx-bg2);
  color: var(--hx-blue);
  border-left-color: var(--hx-blue);
}

.hx-sp-sidebar__nav-link.is-active {
  background: var(--hx-blue-light);
  color: var(--hx-blue-dark);
  border-left-color: var(--hx-blue-dark);
  font-weight: 700;
}

.hx-sp-sidebar__nav-arrow {
  color: var(--hx-muted);
  font-size: .9rem;
  transition: transform var(--hx-trans);
}

.hx-sp-sidebar__nav-link:hover .hx-sp-sidebar__nav-arrow,
.hx-sp-sidebar__nav-link.is-active .hx-sp-sidebar__nav-arrow {
  transform: translateX(3px);
  color: var(--hx-blue);
}

/* ══════════════════════════════════════════════════════
   5 · BOUTON GÉNÉRIQUE
══════════════════════════════════════════════════════ */
.hx-sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--hx-blue);
  color: var(--hx-white);
  font-size: .88rem;
  font-weight: 700;
  padding: .65rem 1.4rem;
  border-radius: var(--hx-radius);
  text-decoration: none;
  transition: background var(--hx-trans), transform var(--hx-trans), box-shadow var(--hx-trans);
  border: 2px solid transparent;
  cursor: pointer;
  letter-spacing: .01em;
}

.hx-sp-btn:hover {
  background: var(--hx-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,85,177,.3);
}

.hx-sp-btn--full {
  width: 100%;
}

.hx-sp-btn--white {
  background: var(--hx-white);
  color: var(--hx-blue-dark);
  border-color: var(--hx-white);
}

.hx-sp-btn--white:hover {
  background: var(--hx-blue-light);
  color: var(--hx-blue-dark);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════
   6 · CONTENU PRINCIPAL — Sections communes
══════════════════════════════════════════════════════ */
.hx-sp-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hx-sp-section {
  background: var(--hx-white);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: 2.2rem 2rem;
  box-shadow: var(--hx-shadow);
}

.hx-sp-section__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hx-navy);
  margin: 0 0 1.4rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid var(--hx-blue-light);
  position: relative;
}

/* Trait accent bleu */
.hx-sp-section__title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 44px;
  height: 2px;
  background: var(--hx-blue);
  border-radius: 2px;
}

/* ── PROSE (contenu wysiwyg) ── */
.hx-sp-prose {
  font-size: .96rem;
  color: var(--hx-text);
  line-height: 1.75;
}

.hx-sp-prose p { margin: 0 0 1rem; }
.hx-sp-prose p:last-child { margin-bottom: 0; }

.hx-sp-prose h2, .hx-sp-prose h3, .hx-sp-prose h4 {
  font-weight: 800;
  color: var(--hx-navy);
  margin: 1.5rem 0 .6rem;
}

.hx-sp-prose h2 { font-size: 1.15rem; }
.hx-sp-prose h3 { font-size: 1.05rem; }

.hx-sp-prose ul, .hx-sp-prose ol {
  margin: .75rem 0 1rem 1.4rem;
}

.hx-sp-prose li {
  margin-bottom: .35rem;
}

.hx-sp-prose strong {
  color: var(--hx-navy);
  font-weight: 700;
}

.hx-sp-prose a {
  color: var(--hx-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══════════════════════════════════════════════════════
   7 · POINTS FORTS — Cards
══════════════════════════════════════════════════════ */
.hx-sp-cards .hx-sp-section__title {
  /* Pas de titre par défaut pour cette section */
}

.hx-sp-cards__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
  padding: 0; /* La section a déjà le padding */
}

/* Override : pas de padding double */
.hx-sp-cards {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.hx-sp-card {
  background: var(--hx-white);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: 1.6rem 1.4rem;
  text-align: center;
  box-shadow: var(--hx-shadow);
  transition: box-shadow var(--hx-trans), transform var(--hx-trans), border-color var(--hx-trans);
  /* Animation d'entrée */
  opacity: 0;
  transform: translateY(16px);
  animation: hx-fadein .5s ease forwards;
  animation-delay: var(--hx-card-delay, 0ms);
}

@keyframes hx-fadein {
  to { opacity: 1; transform: translateY(0); }
}

.hx-sp-card:hover {
  box-shadow: var(--hx-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--hx-blue);
}

.hx-sp-card__icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: .85rem;
  display: block;
}

.hx-sp-card__titre {
  font-size: .92rem;
  font-weight: 800;
  color: var(--hx-navy);
  margin-bottom: .5rem;
  line-height: 1.3;
}

.hx-sp-card__texte {
  font-size: .82rem;
  color: var(--hx-muted);
  line-height: 1.55;
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   8 · COMPTEURS / CHIFFRES CLÉS
══════════════════════════════════════════════════════ */
.hx-sp-counters {
  background: linear-gradient(135deg, var(--hx-navy) 0%, var(--hx-blue-dark) 100%);
  border-color: transparent;
  padding: 2.5rem 2rem;
}

.hx-sp-counters__band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.hx-sp-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.hx-sp-counter__val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--hx-white);
  line-height: 1;
  letter-spacing: -.02em;
}

/* Trait sous le chiffre */
.hx-sp-counter__val::after {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: var(--hx-accent);
  border-radius: 2px;
  margin: .45rem auto 0;
}

.hx-sp-counter__label {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════
   9 · COMPÉTENCES / BARRES
══════════════════════════════════════════════════════ */
.hx-sp-skills__list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.hx-sp-skill__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .45rem;
}

.hx-sp-skill__label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--hx-text);
}

.hx-sp-skill__pct {
  font-size: .8rem;
  font-weight: 700;
  color: var(--hx-blue);
}

.hx-sp-skill__bar {
  height: 8px;
  background: var(--hx-bg2);
  border-radius: 8px;
  overflow: hidden;
}

.hx-sp-skill__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--hx-blue-dark), var(--hx-blue-mid), var(--hx-accent));
  border-radius: 8px;
  transition: width 1.1s cubic-bezier(.4,0,.2,1);
}

.hx-sp-skill__fill.is-animated {
  width: var(--hx-pct);
}

/* ══════════════════════════════════════════════════════
   10 · TIMELINE
══════════════════════════════════════════════════════ */
.hx-sp-timeline__list {
  position: relative;
  padding: .5rem 0;
}

/* Trait vertical central */
.hx-sp-timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--hx-border);
  transform: translateX(-50%);
  z-index: 0;
}

.hx-sp-timeline__item {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-bottom: 2rem;
  z-index: 1;
}

/* Élément gauche */
.hx-sp-timeline__item--left {
  justify-content: flex-start;
  padding-right: calc(50% + 1.5rem);
}

/* Élément droite */
.hx-sp-timeline__item--right {
  justify-content: flex-end;
  padding-left: calc(50% + 1.5rem);
}

/* Point central */
.hx-sp-timeline__dot {
  position: absolute;
  left: 50%;
  top: 1.1rem;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hx-blue);
  border: 3px solid var(--hx-white);
  box-shadow: 0 0 0 2px var(--hx-blue);
  z-index: 2;
}

/* Carte timeline */
.hx-sp-timeline__card {
  background: var(--hx-white);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--hx-shadow);
  max-width: 100%;
  transition: box-shadow var(--hx-trans), transform var(--hx-trans);
}

.hx-sp-timeline__card:hover {
  box-shadow: var(--hx-shadow-lg);
  transform: translateY(-2px);
}

.hx-sp-timeline__year {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hx-white);
  background: var(--hx-blue);
  padding: .15rem .55rem;
  border-radius: 2rem;
  margin-bottom: .6rem;
}

.hx-sp-timeline__titre {
  font-size: .95rem;
  font-weight: 800;
  color: var(--hx-navy);
  margin: 0 0 .4rem;
  line-height: 1.3;
}

.hx-sp-timeline__texte {
  font-size: .84rem;
  color: var(--hx-muted);
  line-height: 1.55;
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   11 · FAQ ACCORDÉON
══════════════════════════════════════════════════════ */
.hx-sp-faq__list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.hx-sp-faq__item {
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  overflow: hidden;
  transition: border-color var(--hx-trans), box-shadow var(--hx-trans);
}

.hx-sp-faq__item.is-open {
  border-color: var(--hx-blue);
  box-shadow: 0 0 0 2px rgba(0,85,177,.08);
}

.hx-sp-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: .92rem;
  font-weight: 700;
  color: var(--hx-text);
  line-height: 1.45;
  transition: background var(--hx-trans), color var(--hx-trans);
}

.hx-sp-faq__q:hover,
.hx-sp-faq__item.is-open .hx-sp-faq__q {
  background: var(--hx-blue-light);
  color: var(--hx-blue-dark);
}

.hx-sp-faq__icon {
  flex-shrink: 0;
  color: var(--hx-blue);
  transition: transform var(--hx-trans);
}

.hx-sp-faq__item.is-open .hx-sp-faq__icon {
  transform: rotate(180deg);
}

.hx-sp-faq__a {
  padding: 0 1.2rem 1.1rem;
  border-top: 1px solid var(--hx-border);
  background: var(--hx-bg);
}

.hx-sp-faq__a p {
  margin: .8rem 0 0;
  font-size: .88rem;
  color: var(--hx-muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════
   12 · CTA FINAL
══════════════════════════════════════════════════════ */
.hx-sp-cta {
  background: linear-gradient(135deg, var(--hx-navy) 0%, var(--hx-blue-dark) 60%, var(--hx-blue) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hx-sp-cta::before {
  content: '';
  position: absolute;
  left: -100px;
  bottom: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hx-sp-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.hx-sp-cta__text {
  flex: 1;
  min-width: 280px;
}

.hx-sp-cta__titre {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--hx-white);
  margin: 0 0 .6rem;
  line-height: 1.25;
}

.hx-sp-cta__desc {
  font-size: .96rem;
  color: rgba(255,255,255,.75);
  margin: 0;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   13 · RESPONSIVE
══════════════════════════════════════════════════════ */

/* Tablette large */
@media (max-width: 1024px) {
  .hx-sp-body__inner {
    grid-template-columns: 240px 1fr;
    gap: 1.75rem;
  }
}

/* Tablette */
@media (max-width: 860px) {
  .hx-sp-body__inner {
    grid-template-columns: 1fr;
  }

  .hx-sp-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .hx-sp-sidebar__card--id {
    grid-column: 1 / -1;
  }

  /* Timeline : passer en liste simple */
  .hx-sp-timeline__line { display: none; }

  .hx-sp-timeline__item--left,
  .hx-sp-timeline__item--right {
    padding: 0;
    justify-content: flex-start;
  }

  .hx-sp-timeline__item {
    flex-direction: column;
    padding-left: 1.8rem;
  }

  .hx-sp-timeline__dot {
    left: 0;
    transform: none;
  }

  .hx-sp-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .hx-sp-hero {
    padding: 2.8rem 0 2.2rem;
  }

  .hx-sp-hero__title {
    font-size: 1.7rem;
  }

  .hx-sp-section {
    padding: 1.5rem 1.2rem;
  }

  .hx-sp-counters__band {
    grid-template-columns: repeat(2, 1fr);
  }

  .hx-sp-sidebar {
    grid-template-columns: 1fr;
  }

  .hx-sp-body {
    padding: 1.8rem 0 3rem;
  }

  .hx-sp-cta__titre {
    font-size: 1.3rem;
  }

  .hx-sp-inner {
    padding: 0 1rem;
  }
}
