﻿/* ============================================================
   TonPlanning.be  Design 2026  (no framework)
   ============================================================ */

/*  Variables  */
:root {
  --primary:       #1D4ED8;
  --primary-light: #3B82F6;
  --primary-dark:  #1E3A8A;
  --accent:        #0891B2;
  --success:       #10B981;
  --warning:       #F59E0B;
  --surface:       #FFFFFF;
  --surface-alt:   #F8FAFC;
  --border:        rgba(0,0,0,.07);
  --text:          #0F172A;
  --text-muted:    #64748B;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --shadow-lg:     0 20px 48px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);
  --radius:        18px;
  --radius-sm:     10px;
  --ease:          all .25s cubic-bezier(.4,0,.2,1);
  --max-w:         1200px;
}

/*  Reset  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--surface-alt);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/*  Layout helpers  */
.tp-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.tp-container--narrow { max-width: 760px; }
.text-center { text-align: center; }

/* Grid */
.tp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}
.tp-grid-4 > * { flex: 1 1 calc(25% - 1.5rem); min-width: 220px; }
.tp-grid-3 > * { flex: 1 1 calc(33% - 1.5rem); min-width: 260px; }
.tp-grid-2 > * { flex: 1 1 calc(50% - 1.5rem); min-width: 280px; }

/*  Navbar  */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.site-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}
.nav-brand { display: flex; align-items: center; }
.nav-logo  { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.nav-logo img { height: 44px; width: auto; }
.nav-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-item {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  transition: var(--ease);
  text-decoration: none;
}
.nav-item:hover,
.nav-item.is-active {
  background: rgba(29,78,216,.08);
  color: var(--primary);
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--ease);
}
.nav-burger:hover { background: rgba(29,78,216,.08); }
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--ease);
}

/*  Page banner  */
.page-banner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(2px);
}
.page-banner .tp-container {
  position: relative;
  z-index: 1;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.banner-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -.02em;
}
.banner-text {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.85;
}

/*  Sections  */
.tp-section { padding: 4rem 0; background: var(--surface-alt); }
.tp-section--alt { background: var(--surface); }

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

/* Section pills */
.section-pill {
  display: inline-block;
  padding: .3rem 1.1rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.section-pill--blue  { background: rgba(29,78,216,.10); color: var(--primary); }
.section-pill--green { background: rgba(16,185,129,.10); color: #059669; }
.section-pill--amber { background: rgba(245,158,11,.12); color: #D97706; }

/*  Cards  */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--ease);
  text-align: center;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(29,78,216,.18);
}
.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: .75rem 0 .5rem;
  letter-spacing: -.01em;
}
.card-title--blue  { color: var(--primary); }
.card-title--green { color: #059669; }
.card-title--amber { color: #D97706; }
.card-text { font-size: .9rem; color: var(--text-muted); line-height: 1.75; }

/* Feature icon */
.feat-icon {
  width: 58px; height: 58px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(29,78,216,.10), rgba(8,145,178,.12));
}
.feat-icon--green { background: linear-gradient(135deg, rgba(16,185,129,.10), rgba(5,150,105,.08)); }
.feat-icon--amber { background: linear-gradient(135deg, rgba(245,158,11,.10), rgba(217,119,6,.08)); }
.feat-icon img { width: 32px; height: 32px; object-fit: contain; }

/*  Pricing  */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--ease);
  position: relative;
  overflow: hidden;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pricing-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin-bottom: .25rem;
}
.pricing-desc { font-size: .88rem; color: var(--text-muted); margin-bottom: .5rem; }

.pricing-card.is-featured {
  background: linear-gradient(145deg, #1E3A8A, #1D4ED8);
  border-color: transparent;
}
.pricing-card.is-featured h3,
.pricing-card.is-featured .pricing-desc,
.pricing-card.is-featured .price-period,
.pricing-card.is-featured .price-setup { color: rgba(255,255,255,.85); }

.badge-recommended {
  position: absolute; top: 1.25rem; right: 1.25rem;
  background: var(--warning); color: white;
  font-size: .68rem; font-weight: 700;
  padding: .28rem .85rem; border-radius: 999px;
  letter-spacing: .05em; text-transform: uppercase;
}
.price-amount {
  font-family: 'Poppins', sans-serif;
  font-size: 2.8rem; font-weight: 800;
  color: var(--primary); line-height: 1;
  margin: .75rem 0 .25rem; display: block;
}
.pricing-card.is-featured .price-amount { color: white; }
.price-period { font-size: .85rem; color: var(--text-muted); }
.price-setup  { font-size: .8rem;  color: var(--text-muted); margin-top: .3rem; }

hr.pricing-divider {
  border: none; border-top: 1px solid var(--border); margin: 1.25rem 0;
}
.pricing-card.is-featured hr.pricing-divider { border-top-color: rgba(255,255,255,.2); }

.pricing-feature {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .3rem 0; font-size: .9rem; color: var(--text-muted); text-align: left;
}
.pricing-feature::before { content: ''; color: var(--success); font-weight: 700; flex-shrink: 0; }
.pricing-card.is-featured .pricing-feature { color: rgba(255,255,255,.85); }
.pricing-card.is-featured .pricing-feature::before { color: #6EE7B7; }

/*  Forms  */
.tp-label {
  display: block; font-weight: 500; font-size: .88rem;
  margin-bottom: .35rem; color: var(--text); text-align: left;
}
.tp-input, .tp-textarea {
  width: 100%; padding: .7rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: .92rem;
  color: var(--text); background: var(--surface);
  transition: var(--ease); outline: none;
  display: block; margin-bottom: 1rem;
}
.tp-input:focus, .tp-textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.tp-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; font-family: 'Inter', sans-serif;
  font-size: .92rem; font-weight: 600;
  padding: .75rem 2rem; border-radius: 999px;
  border: none; cursor: pointer; transition: var(--ease);
  box-shadow: 0 4px 14px rgba(29,78,216,.3);
}
.tp-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(29,78,216,.38); }
.tp-btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

/*  Login  */
.login-card {
  max-width: 420px; margin: 0 auto;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 3rem 2.5rem; text-align: center;
}
.login-card h1 {
  font-family: 'Poppins', sans-serif; color: var(--primary);
  margin-bottom: 1.75rem; font-size: 1.7rem; font-weight: 700;
}

/*  Admin table  */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.admin-table th { background: var(--primary); color: white; padding: .85rem 1rem; text-align: left; font-weight: 600; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.admin-table tr:hover td { background: rgba(29,78,216,.03); }

/*  Conclusion  */
.conclusion-box {
  background: linear-gradient(135deg, #F0FDF4, #ECFDF5);
  border: 1.5px solid rgba(16,185,129,.2);
  border-radius: var(--radius);
  padding: 3.5rem 2.5rem; text-align: center;
  box-shadow: var(--shadow-md);
}
.conclusion-title {
  font-family: 'Poppins', sans-serif; font-size: 1.8rem;
  font-weight: 800; color: #059669; margin-bottom: 1.5rem;
}
.conclusion-box p { color: var(--text); font-size: 1.05rem; line-height: 1.95; }

/*  CTA strip  */
.cta-strip {
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 50%, #0891B2 100%);
  padding: 3.5rem 1.5rem; text-align: center; position: relative; overflow: hidden;
}
.cta-strip::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 15% 50%, rgba(255,255,255,.06) 0%, transparent 55%);
  pointer-events: none;
}
.cta-title { font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 800; color: white; position: relative; }
.cta-text  { color: rgba(255,255,255,.75); margin: .75rem 0 1.5rem; font-size: 1rem; position: relative; }
.cta-btn-outline {
  display: inline-block; border: 2px solid rgba(255,255,255,.5); color: white;
  padding: .75rem 2rem; border-radius: 999px; font-weight: 600;
  font-family: 'Inter', sans-serif; font-size: .92rem;
  transition: var(--ease); text-decoration: none; position: relative;
}
.cta-btn-outline:hover { background: rgba(255,255,255,.18); border-color: white; }

/*  Footer  */
.footer {
  background: #0F172A; color: #94A3B8;
  padding: 2rem 1.5rem; text-align: center; font-size: .85rem;
}
.footer a { color: #22D3EE; }
.footer a:hover { text-decoration: underline; }

/*  Responsive  */
@media (max-width: 900px) {
  .tp-grid-4 > * { flex: 1 1 calc(50% - 1.5rem); }
}
@media (max-width: 640px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem 1rem;
    box-shadow: var(--shadow-md);
    gap: .1rem;
  }
  .nav-menu.is-open { display: flex; }
  .nav-burger { display: flex; }
  .tp-grid-4 > *, .tp-grid-3 > *, .tp-grid-2 > * { flex: 1 1 100%; }
  .page-banner .tp-container { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .login-card { padding: 2rem 1.25rem; }
  .conclusion-box { padding: 2rem 1.25rem; }
  .cta-btn-outline { display: block; margin-bottom: .75rem; }
}

/* ============================================================
   GALERIE – EFFETS VISUELS DÉVELOPPÉS
   ============================================================ */

/* Shimmer qui balaye l'image après son arrivée */
@keyframes shimmerSwipe {
  from { transform: translateX(-130%) skewX(-12deg); }
  to   { transform: translateX(210%)  skewX(-12deg); }
}

/* Halo de bienvenue qui s'estompe */
@keyframes arrivalGlow {
  0%   { opacity: .55; }
  55%  { opacity: .18; }
  100% { opacity: 0;   }
}

/* Trait de soulignement animé sur le titre */
@keyframes underlineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* --- Section --- */
.gallery-section {
  background:
    radial-gradient(ellipse 65% 45% at 10% 15%, rgba(59,130,246,.13), transparent),
    radial-gradient(ellipse 50% 40% at 90% 85%, rgba(8,145,178,.11),  transparent),
    #f8fafc;
  padding: 5rem 0;
}

.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* --- Carte (reste dans le flux, ne disparaît pas) --- */
.gallery-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
  align-items: stretch;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(29,78,216,.11);
  box-shadow: 0 2px 18px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  /* légère entrée du conteneur */
  opacity: 0;
  transform: translateY(14px) scale(.988);
  transition:
    opacity .55s ease-out,
    transform .55s cubic-bezier(.22,.7,0,1),
    box-shadow .3s ease,
    border-color .3s ease;
  pointer-events: none;
  will-change: transform, opacity;
}

.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Halo bleu qui arrive puis s'estompe */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 28% 50%, rgba(59,130,246,.32), transparent 62%);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}
.gallery-item.is-visible::before {
  animation: arrivalGlow 2s ease-out .08s forwards;
}

/* Alternance image gauche / droite */
.gallery-item:nth-child(even) {
  grid-template-columns: 1fr minmax(260px, 42%);
}
.gallery-item:nth-child(even) .gallery-image-wrapper { order: 2; }
.gallery-item:nth-child(even) .gallery-content       { order: 1; }

/* Hover : géré en JS pour le 3D tilt ; CSS gère juste ombre+bordure */
.gallery-item:hover {
  box-shadow: 0 12px 52px rgba(29,78,216,.15), 0 3px 10px rgba(0,0,0,.07);
  border-color: rgba(29,78,216,.3);
}

/* --- Image wrapper : l'élément qui « vole » --- */
.gallery-image-wrapper {
  --img-tx: 0px;
  --img-ty: 90px;
  --img-rz: 5deg;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: linear-gradient(140deg, rgba(29,78,216,.18) 0%, rgba(8,145,178,.14) 100%);
  /* état masqué : décalé + pivoté + flouté + désaturé */
  opacity: 0;
  transform: translate3d(var(--img-tx), var(--img-ty), 0) rotate(var(--img-rz)) scale(.82);
  filter: saturate(.08) brightness(1.5) blur(10px);
  transition:
    transform 1.2s cubic-bezier(.12,.84,.14,1.08),
    opacity   .9s ease-out,
    filter    1s  ease-out;
  transition-delay: .1s;
  will-change: transform, filter, opacity;
}

.gallery-item.is-visible .gallery-image-wrapper {
  opacity: 1;
  transform: translate3d(0,0,0) rotate(0deg) scale(1);
  filter: saturate(1) brightness(1) blur(0);
}

/* Trait lumineux qui balaye l'image à l'arrivée */
.gallery-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 28%,
    rgba(255,255,255,.6) 46%,
    rgba(255,255,255,.22) 54%,
    transparent 70%
  );
  transform: translateX(-135%) skewX(-12deg);
  pointer-events: none;
  z-index: 4;
}
.gallery-item.is-visible .gallery-image-wrapper::after {
  animation: shimmerSwipe 1s cubic-bezier(.4,0,.2,1) 1.1s forwards;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .85s cubic-bezier(.2,.7,.2,1);
}
.gallery-item:hover .gallery-image { transform: scale(1.055); }

/* --- Contenu texte --- */
.gallery-content {
  padding: 2.25rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Titre : glisse depuis le bas + skew qui se résorbe */
.gallery-title {
  position: relative;
  font-size: clamp(1.2rem, 1.05rem + .55vw, 1.6rem);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  line-height: 1.22;
  padding-bottom: .55rem;
  opacity: 0;
  transform: translateY(24px) skewX(-6deg);
  transition:
    opacity  .7s ease-out .36s,
    transform .7s cubic-bezier(.22,.7,0,1) .36s;
}
/* Barre de soulignement animée sous le titre */
.gallery-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0s; /* sera activée par JS */
}
.gallery-item.is-visible .gallery-title {
  opacity: 1;
  transform: translateY(0) skewX(0deg);
}
.gallery-item.is-visible .gallery-title::after {
  animation: underlineGrow .55s cubic-bezier(.22,.7,0,1) .95s forwards;
}

/* Description : glisse depuis le bas */
.gallery-description {
  color: #334155;
  line-height: 1.82;
  font-size: 1rem;
  max-width: 62ch;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity  .7s ease-out .56s,
    transform .7s cubic-bezier(.22,.7,0,1) .56s;
}
.gallery-item.is-visible .gallery-description {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .gallery-item {
    grid-template-columns: minmax(210px, 40%) 1fr;
  }
}

@media (max-width: 768px) {
  .gallery-section { padding: 3rem 0; }
  .gallery-grid { gap: 2rem; }

  .gallery-item,
  .gallery-item:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .gallery-item:nth-child(even) .gallery-image-wrapper,
  .gallery-item:nth-child(even) .gallery-content { order: initial; }

  .gallery-image-wrapper { min-height: 220px; }
  .gallery-content { padding: 1.5rem 1.4rem 1.75rem; }
  .gallery-description { font-size: .96rem; line-height: 1.75; }
}
