/* assets/css/pages/formations.css */

:root{
  --green: #2f9e44;
  --green-dark: #25853a;
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #7c7c7c;
  --panel: #f1f1f1;
  --shadow: 0 10px 26px rgba(0,0,0,.10);
  --border-strong: rgba(0,0,0,.45);
  --border-soft: rgba(0,0,0,.14);
}

.formations-page{
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* HERO */
.form-hero{
  position: relative;
  height: 290px;
  overflow: hidden;
  background: #e9eef3;
}

.form-hero__bg{
  position: absolute;
  inset: 0;
  background: url("/assets/images/formation-hero.png") center / cover no-repeat;
}

.form-hero__overlay{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.62);
}

.form-hero__inner{
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 16px 18px;
  gap: 16px;
}

.form-hero__title{
  margin: 0 0 10px;
  font-weight: 900;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.3px;
}

.t-dark{ color: #111827; }
.t-green{ color: var(--green); }

.form-hero__subtitle{
  margin: 0;
  max-width: 920px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
}

.btn-back{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 22px;
  border-radius: 3px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(42,166,80,.18);
  transition: transform .18s ease, background .18s ease;
}

.btn-back:hover{
  transform: translateY(-2px);
  background: var(--green-dark);
}

.btn-back__ico{
  font-size: 16px;
  line-height: 1;
  transform: translateY(-1px);
}

/* BODY */
.form-body{
  padding: 18px 0 18px;
}

.form-wrap{
  max-width: 980px;
}

.form-section{
  margin-bottom: 20px;
}

/* PANEL 1 (grey card like prototype) */
.form-panel{
  background: var(--panel);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px 22px 16px;
}

.form-panel__title{
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--green);
}

.form-panel__subtitle{
  margin: 8px auto 0;
  text-align: center;
  max-width: 860px;
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.65;
  font-weight: 600;
}

/* Trainings cards (3 images) */
.trainings-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 14px 0 0;
}

.training-card{
  margin: 0;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.12);
  background: #dde6ef;
  height: 110px;
}

.training-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.02);
}

.training-card figcaption{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  color: rgba(42,166,80,.90);
  text-shadow: 0 10px 22px rgba(0,0,0,.14);
  text-align: center;
  padding: 0 10px;
}

/* Section titles (green underline) */
.section-title{
  margin: 18px 0 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

/* Objectives block */
.objective-panel{
  background: #f6f6f6;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: center;
}

.objective-media img{
  width: 100%;
  height: 170px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.objective-text{
  text-align: center;
  font-weight: 700;
  color: #1f2937;
}

.objective-text p{
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
}

.objective-text p:last-child{
  margin-bottom: 0;
}

/* Themes grid */
.themes-grid{
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.themes-grid--3{
  grid-template-columns: repeat(3, 1fr);
}

.themes-grid--2{
  grid-template-columns: 1fr 1fr;
  max-width: 690px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 16px;
}

.theme-card{
  background: #ffffff;
  border: 1px solid rgba(42,166,80,.35);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.theme-card img{
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.theme-cap{
  padding: 12px 12px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--green);
  font-weight: 900;
  line-height: 1.3;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom band */
.form-band{
  margin-top: 14px;
  background: #2f944a;
  padding: 18px 0 20px;
}

.form-band__inner{
  max-width: 980px;
  text-align: center;
}

.form-band__inner p{
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.form-band__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 22px;
  border-radius: 4px;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,.10);
  transition: transform .18s ease;
}

.form-band__btn:hover{
  transform: translateY(-2px);
}

/* ===========================
   Animations (modern, keep prototype)
   =========================== */

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

.form-hero.is-animate .form-hero__bg{
  transform: scale(1.06);
  animation: heroZoom 1.2s ease forwards;
}

.form-hero.is-animate .form-hero__overlay{
  opacity: 0;
  animation: heroOverlayIn .9s ease forwards;
}

.form-hero.is-animate .form-hero__title{
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .8s ease .12s forwards;
}

.form-hero.is-animate .form-hero__subtitle{
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .8s ease .24s forwards;
}

.form-hero.is-animate .btn-back{
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .75s ease .32s forwards;
}

.reveal{
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .85s ease forwards;
}

.panel-reveal{
  opacity: 0;
  transform: translateY(14px) scale(.99);
  animation: panelIn .75s ease .12s forwards;
}

/* hover micro-interactions */
.training-card,
.theme-card,
.objective-panel,
.form-panel{
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform;
}

.training-card:hover,
.theme-card:hover,
.objective-panel:hover,
.form-panel:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,.12);
}

/* Keyframes */
@keyframes fadeUp{
  to{ opacity: 1; transform: translateY(0); }
}

@keyframes panelIn{
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroZoom{
  to{ transform: scale(1); }
}

@keyframes heroOverlayIn{
  to{ opacity: 1; }
}

/* Responsive */
@media (max-width: 992px){
  .form-hero{ height: 240px; }
  .form-hero__title{ font-size: 32px; }
  .form-hero__subtitle{ font-size: 12px; }
  .trainings-grid{ grid-template-columns: repeat(2, 1fr); }
  .training-card{ height: 140px; }
  .objective-panel{ grid-template-columns: 1fr; }
  .objective-media img{ height: 180px; }
  .themes-grid--3{ grid-template-columns: repeat(2, 1fr); }
  .themes-grid--2{ 
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

@media (max-width: 768px){
  .form-body{ padding: 12px 0; }
  .form-hero{
    height: 240px;
    padding: 14px 16px;
  }
  .form-hero__inner{
    padding: 0;
    gap: 12px;
    justify-content: flex-start;
    padding-top: 16px;
  }
  .form-hero__title{
    font-size: 26px;
    margin: 0 0 6px;
  }
  .form-hero__subtitle{
    font-size: 11px;
    margin: 0;
    line-height: 1.4;
  }
  .btn-back{ font-size: 11px; padding: 0 16px; height: 32px; margin-top: 8px; }
  .form-panel{ padding: 12px 14px; }
  .form-panel__title{ font-size: 18px; }
  .form-panel__subtitle{ font-size: 12px; }
  .trainings-grid{ grid-template-columns: 1fr; gap: 12px; }
  .training-card{ height: 120px; }
  .section-title{ font-size: 18px; margin: 14px 0 12px; }
  .objective-panel{ padding: 12px; gap: 12px; }
  .objective-media img{ height: 140px; }
  .objective-text p{ font-size: 11px; }
  .themes-grid{ gap: 14px; }
  .themes-grid--3{ grid-template-columns: 1fr; }
  .themes-grid--2{ 
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-top: 0;
  }
  .theme-card img{ height: 120px; }
  .theme-cap{ font-size: 12px; padding: 10px; }
  .form-band{ padding: 12px 0 14px; }
  .form-band__inner p{ font-size: 11px; }
  .form-band__btn{ height: 28px; font-size: 10px; }
}

@media (max-width: 520px){
  .form-hero{
    height: 220px;
    padding: 12px 16px;
  }
  .form-hero__inner{
    padding: 0;
    gap: 10px;
    justify-content: flex-start;
    padding-top: 14px;
  }
  .form-hero__title{
    font-size: 22px;
    margin-bottom: 4px;
  }
  .form-hero__subtitle{
    font-size: 10px;
    line-height: 1.35;
  }
  .btn-back{ font-size: 10px; padding: 0 14px; height: 28px; margin-top: 6px; }
  .form-body{ padding: 10px 0; }
  .form-panel{ padding: 10px 12px; border-radius: 8px; }
  .form-panel__title{ font-size: 16px; }
  .form-panel__subtitle{ font-size: 11px; }
  .trainings-grid{ grid-template-columns: 1fr; }
  .training-card{ height: 110px; }
  .training-card figcaption{ font-size: 16px; }
  .section-title{ font-size: 16px; }
  .objective-panel{ padding: 10px; }
  .objective-media img{ height: 120px; }
  .objective-text p{ font-size: 10px; }
  .themes-grid{ gap: 10px; }
  .themes-grid--3{ grid-template-columns: 1fr; }
  .themes-grid--2{ 
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-top: 0;
  }
  .theme-card img{ height: 110px; }
  .theme-cap{ font-size: 10px; padding: 8px; }
  .form-band{ margin-top: 10px; padding: 10px 0 12px; }
  .form-band__inner p{ font-size: 10px; }
  .form-band__btn{ height: 26px; padding: 0 12px; font-size: 9px; }
}