/* Thème clair moderne pour BIMCOT – ambiance 2030 */
:root {
  /* Brand */
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-2: #2563eb;
  --accent: #06b6d4;
  --accent-2: #22d3ee;
  --primary-soft: rgba(79, 70, 229, 0.1);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #7c3aed 0%, #4f46e5 36%, #2563eb 68%, #06b6d4 100%);
  --grad-hero: linear-gradient(140deg, #2e1065 0%, #312e81 30%, #1e3a8a 64%, #0e7490 100%);
  --grad-page: linear-gradient(135deg, #5b21b6 0%, #4f46e5 42%, #2563eb 74%, #0891b2 100%);
  --grad-text: linear-gradient(120deg, #7c3aed, #06b6d4);

  /* Surfaces / neutrals */
  --bg: #f5f6fb;
  --bg-soft: #eef2ff;
  --bg-alt: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0b1220;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --border-subtle: rgba(15, 23, 42, 0.08);

  /* Elevation */
  --shadow-soft: 0 22px 55px -16px rgba(30, 27, 75, 0.22);
  --shadow-md: 0 12px 32px -12px rgba(30, 27, 75, 0.2);
  --shadow-lg: 0 36px 80px -24px rgba(30, 27, 75, 0.32);

  /* Radii */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Type */
  --font-display: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Motion */
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 100% -5%, rgba(6, 182, 212, 0.08), transparent 60%),
    radial-gradient(1000px 600px at -10% 6%, rgba(79, 70, 229, 0.09), transparent 60%), var(--bg);
}

body {
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly: remove 300ms tap delay on buttons/links */
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
  max-width: 100%;
  overflow-x: hidden;
}

main {
  padding-top: var(--header-height, 80px);
  overflow-x: hidden;
  max-width: 100%;
}

/* Alerts / notifications: when scrolled into view, sit below fixed header */
#alert-container .alert,
.alert.alert-success,
.alert.alert-error,
.contact-notification,
.error-message,
.success-message,
#elearning-success-message,
#elearning-error-message {
  scroll-margin-top: calc(var(--header-height, 58px) + 16px);
}

/* Shared toast notifications (BimcotUtils.showToast) */
.bimcot-toast-container {
  position: fixed;
  top: calc(var(--header-height, 58px) + 16px);
  right: 16px;
  left: auto;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.bimcot-toast {
  pointer-events: auto;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #fff;
  background: #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  border-left: 4px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  word-break: break-word;
}

.bimcot-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.bimcot-toast-success {
  background: #ecfdf5;
  color: #065f46;
  border-left-color: #10b981;
}

.bimcot-toast-error {
  background: #fef2f2;
  color: #991b1b;
  border-left-color: #ef4444;
}

.bimcot-toast-info {
  background: #eff6ff;
  color: #1e3a8a;
  border-left-color: #3b82f6;
}

@media (max-width: 480px) {
  .bimcot-toast-container {
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

/* Header & navigation */
.site-header {
  --header-height: 58px; /* fallback; updated by JS to match actual height */
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.9), rgba(248, 250, 252, 0.9));
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow var(--transition-med),
    background-color var(--transition-med);
  /* overflow: visible so profile dropdown (and flyout panels) are not clipped below the header */
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.6rem;
  padding-inline: 1.25rem;
  gap: 1.5rem;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Flex/grid children in header must not overflow the header box */
.header-inner .logo,
.header-inner .main-nav,
.header-inner .header-cta-group,
.header-inner .header-auth-buttons,
.header-inner .header-profile-dropdown,
.header-inner .nav-toggle {
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.logo-img {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.logo-tagline {
  font-size: 0.72rem;
  color: var(--text-soft);
  font-weight: 500;
  line-height: 1.25;
  max-width: 240px;
  white-space: normal;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 40%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: radial-gradient(circle at 20% 0, #eff6ff, #60a5fa 40%, #2563eb 70%, #1d4ed8);
  color: #0b1120;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.55);
  animation: orbit-glow 14s ease-in-out infinite alternate;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-main {
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.nav-link,
.nav-button {
  position: relative;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform 0.14s ease-out;
}

.nav-link::after {
  content: '';
  position: absolute;
  inset-inline: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.9));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease-out;
  opacity: 0.8;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-button:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(191, 219, 254, 0.9);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #0f172a;
  background: radial-gradient(circle at top, rgba(191, 219, 254, 0.8), transparent 60%);
  border-color: rgba(59, 130, 246, 0.9);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.header-cta {
  font-size: 0.85rem;
  padding-inline: 1rem;
}

.header-cta-group {
  flex-direction: row;
  width: auto;
  gap: 0.4rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.header-auth-buttons {
  width: auto;
  gap: 0.4rem;
}

.header-auth-btn {
  flex: 0 0 auto;
  justify-content: center;
}

.header-profile-picture-btn {
  width: 36px;
  height: 36px;
}

.header-profile-dropdown-menu {
  right: 0;
  min-width: 160px;
}

/* Header authentication buttons */
.header-cta-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-auth-btn {
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 6px;
  flex-shrink: 0;
}

.btn-secondary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notifications badge in dropdown */
.dropdown-notifications-badge {
  margin-left: auto;
  background: #dc2626;
  color: white;
  border-radius: 10px;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Notifications panel */
.header-notifications-panel {
  position: absolute;
  /* Align top with header separator, not covering the profile button */
  top: calc(100% + 0.6rem);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 380px;
  max-width: calc(100vw - 2rem);
  max-height: 500px;
  z-index: 1001;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dropdownFadeIn 0.2s ease;
  border: 1px solid #e5e7eb;
}

.notifications-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fafb;
}

.notifications-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.notifications-mark-all-read {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.notifications-mark-all-read:hover {
  background-color: #eff6ff;
}

.notifications-list {
  overflow-y: auto;
  max-height: 400px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}

.notification-item:hover {
  background-color: #f9fafb;
}

.notification-item.unread {
  background-color: #eff6ff;
}

.notification-item.unread:hover {
  background-color: #dbeafe;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.notification-message {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.notification-date {
  color: #9ca3af;
  font-size: 0.75rem;
}

.notification-unread-indicator {
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
  margin-left: 0.5rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.notifications-empty,
.notifications-error {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.notifications-error {
  color: #dc2626;
}

/* Enrollments panel */
.header-enrollments-panel {
  position: absolute;
  /* Align top with header separator, not covering the profile button */
  top: calc(100% + 0.6rem);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 380px;
  max-width: calc(100vw - 2rem);
  max-height: 500px;
  z-index: 1001;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dropdownFadeIn 0.2s ease;
  border: 1px solid #e5e7eb;
}

.enrollments-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fafb;
}

.enrollments-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.enrollments-view-all {
  color: #2563eb;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.enrollments-view-all:hover {
  color: #1d4ed8;
}

.enrollments-list {
  overflow-y: auto;
  max-height: 400px;
}

.enrollment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
  position: relative;
}

.enrollment-item:hover {
  background-color: #f9fafb;
}

.enrollment-content {
  flex: 1;
  min-width: 0;
}

.enrollment-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.enrollment-status {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.enrollment-date {
  color: #9ca3af;
  font-size: 0.75rem;
}

.enrollment-item.certificate-item {
  background-color: #f0fdf4;
}

.enrollment-item.certificate-item:hover {
  background-color: #dcfce7;
}

.enrollment-content {
  flex: 1;
  min-width: 0;
}

.enrollment-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.enrollment-status {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.enrollment-date {
  color: #9ca3af;
  font-size: 0.75rem;
}

.enrollment-download-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.enrollment-download-btn:hover {
  background-color: #e5e7eb;
}

.enrollments-empty,
.enrollments-error {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.enrollments-error {
  color: #dc2626;
}

/* Profile picture dropdown */
.header-profile-dropdown {
  position: relative;
  flex-shrink: 0;
}

.header-profile-picture-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.header-profile-picture-btn:hover {
  border-color: #2563eb;
  transform: scale(1.05);
}

.header-profile-picture-btn:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.header-profile-picture-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.header-profile-picture-default {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50%;
}

.header-profile-dropdown-menu {
  position: absolute;
  /* Align top with header separator (below header-inner padding), not covering the profile button */
  top: calc(100% + 0.6rem);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  max-width: min(320px, calc(100vw - 2rem));
  z-index: 1000;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  position: relative;
}

.header-profile-dropdown-item .dropdown-item-text {
  flex: 1;
}

.header-profile-dropdown-item:hover {
  background-color: #f3f4f6;
}

.header-profile-dropdown-item:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.header-profile-dropdown-item span {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.header-profile-dropdown-item:last-child {
  color: #dc2626;
}

.header-profile-dropdown-item:last-child:hover {
  background-color: #fef2f2;
  color: #b91c1c;
}

.btn-secondary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 115%;
  left: 0;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 2rem));
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.4);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity var(--transition-med),
    transform var(--transition-med);
  z-index: 40;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown li a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.dropdown li a:hover {
  background: rgba(239, 246, 255, 0.9);
  color: #111827;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  order: 2;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.9);
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  height: 2px;
  width: 18px;
  border-radius: 999px;
  background: #374151;
  transition:
    transform 0.18s ease-out,
    opacity 0.18s ease-out;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(3.5px) rotate(40deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-3.5px) rotate(-40deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition-med),
    color var(--transition-med),
    box-shadow var(--transition-med),
    transform 0.14s ease-out,
    border-color var(--transition-med);
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #f9fafb;
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.45);
}

/* Header auth buttons - consistent sizing */
.header-auth-btn.btn-primary {
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
}

.btn-outline:hover {
  border-color: rgba(37, 99, 235, 0.9);
  background: radial-gradient(circle at top, rgba(191, 219, 254, 0.8), transparent 60%);
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.45);
}

.btn-lg {
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

/* Hero */
.hero {
  padding-block: 4.6rem 3.6rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 3rem;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero-content p {
  margin: 0 0 1.3rem;
  color: var(--text-soft);
  font-size: 0.97rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.meta-item {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(107, 114, 128, 0.95);
}

.meta-value {
  font-size: 0.85rem;
}

.hero-panel {
  background: radial-gradient(circle at 10% 0, rgba(219, 234, 254, 0.9), #eff6ff);
  border-radius: 24px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  padding: 1.4rem 1.3rem 1.6rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(16, 185, 129, 0.22), transparent 45%);
  opacity: 0.9;
  pointer-events: none;
  animation: aurora-2030 26s ease-in-out infinite alternate;
}

.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  padding: 0.75rem 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 26px rgba(148, 163, 184, 0.35);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(148, 163, 184, 0.35);
  border-color: rgba(37, 99, 235, 0.85);
}

.stat-number {
  font-weight: 650;
  font-size: 1.2rem;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.hero-badge {
  position: relative;
  margin-top: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px dashed rgba(129, 140, 248, 0.8);
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* Sections */
.section {
  padding-block: 3.4rem;
  overflow-x: hidden;
  max-width: 100%;
}

.section-alt {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(248, 250, 252, 0.96));
  border-block: 1px solid rgba(226, 232, 240, 0.9);
}

.section-header {
  text-align: left;
  max-width: 640px;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.section-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.section-header-inline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}
.section-header-inline > div {
  min-width: 0;
}
.section-header-inline > .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  padding: 1.3rem 1.2rem;
  box-shadow: 0 14px 40px rgba(148, 163, 184, 0.25);
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  gap: 0.7rem;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(148, 163, 184, 0.35);
  border-color: rgba(37, 99, 235, 0.85);
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.card-list {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.card-list li::before {
  content: '•';
  margin-right: 0.35rem;
  color: var(--primary);
}

.card-link {
  font-size: 0.85rem;
  color: #1d4ed8;
}

.card-link:hover {
  text-decoration: underline;
}

/* Partners */
.partners-section-full .container {
  width: 100%;
  max-width: none;
  padding-inline: 2rem;
}

.partners-section-full .section-header {
  text-align: center;
  max-width: none;
  margin-inline: auto;
}

.partners-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5cm;
  margin-top: 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    overflow: visible;
    justify-content: stretch;
  }
  .partner-logo {
    flex: none;
    min-height: 120px;
    padding: 1.25rem;
  }
  .partner-logo img {
    max-height: 90px;
  }
}
@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .partner-logo {
    min-height: 130px;
    padding: 1.25rem;
  }
  .partner-logo img {
    max-height: 100px;
  }
}

.partner-logo {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.15);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  min-width: 0;
  min-height: 120px;
}

.partner-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.25);
}

.partner-logo img {
  max-width: 100%;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Certificate Interest Buttons */
.add-to-interest-btn {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #2563eb;
  color: #2563eb;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.add-to-interest-btn:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.add-to-interest-btn:active {
  transform: translateY(0);
}

.add-to-interest-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-interested {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.btn-interested:hover {
  background: #a7f3d0;
  color: #064e3b;
}

/* Certificate message animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Standards */
.standards {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.standards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.standard-tag {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.98);
}

a.standard-tag {
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

a.standard-tag:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

/* Timeline */
.timeline {
  display: grid;
  gap: 1.1rem;
  border-left: 1px dashed rgba(148, 163, 184, 0.7);
  padding-left: 1.35rem;
}

.timeline-item {
  position: relative;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 32px rgba(148, 163, 184, 0.25);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.timeline-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.35);
  border-color: rgba(59, 130, 246, 0.85);
}

a.timeline-item-link {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.4rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #e0f2fe, #38bdf8 60%, #0ea5e9);
  box-shadow: 0 0 0 4px rgba(191, 219, 254, 0.9);
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(191, 219, 254, 0.9);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.8);
  margin-bottom: 0.35rem;
}

.timeline h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.timeline p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.timeline-meta {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: rgba(107, 114, 128, 0.98);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.testimonial {
  margin: 0;
  padding: 1.1rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(148, 163, 184, 0.25);
  font-size: 0.9rem;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(148, 163, 184, 0.35);
  border-color: rgba(37, 99, 235, 0.75);
}

.testimonial blockquote {
  margin: 0 0 0.6rem;
  color: var(--text-soft);
}

.testimonial figcaption {
  font-size: 0.8rem;
  color: rgba(107, 114, 128, 0.98);
}

/* CTA */
.section-cta {
  padding-block: 3rem 3.4rem;
}

.cta-inner {
  border-radius: 24px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background:
    radial-gradient(circle at 10% 0, rgba(219, 234, 254, 0.95), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(209, 250, 229, 0.9), transparent 50%),
    linear-gradient(135deg, #eff6ff, #ffffff);
  box-shadow: 0 24px 60px rgba(148, 163, 184, 0.35);
  padding: 1.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-inner h2 {
  margin: 0 0 0.4rem;
}

.cta-inner p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* Page hero */
.page-hero {
  padding-block: 3.5rem 2.2rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.96);
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: 1.9rem;
}

.page-hero p {
  margin: 0;
  max-width: 640px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* Two-column layout */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.highlight-box {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  padding: 1.1rem 1rem;
  box-shadow: 0 14px 36px rgba(148, 163, 184, 0.25);
}

.highlight-box h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.chip-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.chip-list li {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: rgba(255, 255, 255, 0.98);
}

.chip-list li a {
  color: inherit;
  text-decoration: none;
}

.chip-list li a:hover {
  color: var(--accent);
}

/* Checklists */
.checklist {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.checklist li::before {
  content: '✓';
  margin-right: 0.4rem;
  color: var(--accent);
}

/* Services page */
.service-block {
  max-width: 800px;
}

.service-standards {
  font-size: 0.9rem;
  color: var(--text-soft);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.service-content h2 {
  margin-top: 0;
}

/* Trainings page */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.filters-search {
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}

.certificate-search-input {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.certificate-search-input::placeholder {
  color: var(--text-soft);
}

.certificate-search-input:focus {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.certificate-search-clear {
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-btn {
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-soft);
  font-size: 0.8rem;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform 0.12s ease-out;
}

.filter-btn:hover {
  transform: translateY(-1px);
}

.filter-btn.active {
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.9);
  background: radial-gradient(circle at top, rgba(191, 219, 254, 0.85), transparent 65%);
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.training-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  padding: 1rem 0.95rem;
  box-shadow: 0 14px 38px rgba(148, 163, 184, 0.25);
  font-size: 0.9rem;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.training-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 52px rgba(148, 163, 184, 0.4);
  border-color: rgba(37, 99, 235, 0.9);
}

.training-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.2rem;
}

.training-header h2 {
  margin: 0;
  font-size: 1rem;
}

.training-header-with-price {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.training-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

/* Prevent title from going under the price ribbon */
.training-card.has-price-ribbon .training-header-text {
  padding-right: 8rem;
  max-width: 100%;
}

.certificate-prices {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.certificate-price-usd {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0d9488;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.certificate-price-tnd {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b21a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Price ribbon (trainings + elearning) */
.price-ribbon-wrap {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 0 18px 0 14px;
}

.price-ribbon {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  padding: 0.45rem 1rem 0.5rem 1.25rem;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  box-shadow:
    -3px 3px 12px rgba(13, 148, 136, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(13, 148, 136, 0.35);
  border-top: none;
  border-right: none;
  position: relative;
}

.price-ribbon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 20px 20px;
  border-color: transparent transparent rgba(13, 148, 136, 0.2) transparent;
  border-radius: 0 0 0 4px;
}

.elearning-cert-box {
  position: relative;
  background: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.elearning-cert-box-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.elearning-cert-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1d4ed8;
  background: rgba(29, 78, 216, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.elearning-cert-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.elearning-cert-box-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.elearning-cert-box-actions .card-link {
  font-size: 0.9rem;
}

.elearning-subscribe-btn {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  white-space: normal;
  text-align: center;
}

.elearning-cert-box .price-ribbon-wrap {
  border-radius: 0 12px 0 10px;
}

.price-ribbon .certificate-price-usd,
.price-ribbon .certificate-price-tnd {
  font-size: 0.88rem;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Detail page: price block above subscribe button */
.certificate-price-detail-block {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
  border-radius: 8px;
  border: 1px solid #e9d5ff;
}

.certificate-price-detail-label {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.certificate-price-detail-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.certificate-price-detail-usd {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0d9488;
}

.certificate-price-detail-tnd {
  font-size: 1.2rem;
  font-weight: 700;
  color: #6b21a8;
}

.badge {
  align-self: flex-start;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(191, 219, 254, 0.9);
  border: 1px solid rgba(37, 99, 235, 0.8);
  font-size: 0.78rem;
  color: #1d4ed8;
}

.training-card p {
  margin: 0.4rem 0 0.5rem;
  color: var(--text-soft);
}

.training-meta {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: rgba(107, 114, 128, 0.98);
}

/* Calendrier & téléchargements */
.calendar-section {
  align-items: flex-start;
}

.calendar-board {
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(148, 163, 184, 0.25);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  font-size: 0.86rem;
}

.calendar-row {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 2fr 1.4fr;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  min-width: 480px;
}

.calendar-row:last-child {
  border-bottom: none;
}

.calendar-head {
  background: rgba(239, 246, 255, 0.96);
  font-weight: 600;
  color: #1f2937;
}

.calendar-note {
  margin-top: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.download-item {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  font-size: 0.86rem;
  color: var(--text-soft);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.download-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(148, 163, 184, 0.25);
  border-color: rgba(37, 99, 235, 0.85);
  background: rgba(239, 246, 255, 0.95);
}

.download-title {
  font-weight: 500;
  color: #111827;
}

.download-meta {
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.contact-form {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  padding: 1.3rem 1.2rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.form-field label {
  font-size: 0.82rem;
  color: rgba(55, 65, 81, 0.95);
}

input,
select,
textarea {
  border-radius: 11px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  background: #f9fafb;
  color: var(--text);
  outline: none;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.6);
  background: #ffffff;
}

.form-note {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.contact-info {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: 0 14px 40px rgba(148, 163, 184, 0.25);
  font-size: 0.9rem;
}

.contact-info h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: rgba(107, 114, 128, 0.98);
  margin-bottom: 0.1rem;
}

.contact-value {
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.4rem 1.9rem;
}

.footer-brand {
  max-width: 420px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.footer-brand p {
  margin-top: 0.7rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.footer-columns h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.footer-columns ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.footer-columns a:hover {
  color: #1d4ed8;
}

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding-block: 0.8rem 1rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.9);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Header hide-on-scroll */
.site-header.header-hidden {
  transform: translateY(-110%);
  box-shadow: none;
}

/* Utilities */
.contact-block h2,
.service-content h2,
.two-column h2 {
  margin-top: 0;
}

/* Animations 2030 */
@keyframes aurora-2030 {
  0% {
    transform: translate3d(-6%, -4%, 0) scale(1.05);
    opacity: 0.85;
  }
  50% {
    transform: translate3d(4%, 3%, 0) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate3d(-3%, 5%, 0) scale(1.04);
    opacity: 0.92;
  }
}

@keyframes orbit-glow {
  0% {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 18px 36px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
  }
  100% {
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
    transform: translateY(0.5px);
  }
}

/* Responsive */
@media (max-width: 960px) {
  main {
    padding-top: var(--header-height, 74px);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .cards-grid,
  .training-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 768px) {
  /* Buttons: allow wrap and contain on small screens */
  .btn {
    white-space: normal;
    text-align: center;
    word-break: break-word;
  }

  .header-auth-btn {
    white-space: nowrap;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  /* Mobile: profile top-left (with corner space), logo center, nav toggle top-right (with corner space) */
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .header-profile-dropdown,
  .header-inner .header-auth-buttons {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
  }

  .header-inner .logo {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
  }

  .header-inner .logo-img {
    height: 32px;
    max-width: 120px;
    width: auto;
  }

  .header-inner .logo-tagline {
    font-size: 0.55rem;
    max-width: 100px;
  }

  /* Training card: less padding for ribbon on mobile so title has room */
  .training-card.has-price-ribbon .training-header-text {
    padding-right: 5.5rem;
  }

  /* Form: single column on tablet/mobile */
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Notifications / Enrollments panels: stay on screen on mobile */
  .header-notifications-panel,
  .header-enrollments-panel {
    right: 0.5rem;
    left: auto;
    width: min(380px, calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
  }

  .header-inner .nav-toggle {
    grid-column: 3;
    justify-self: end;
  }

  .header-inner .main-nav {
    grid-column: 1 / -1;
  }

  .header-inner .header-cta {
    display: none;
  }

  .header-profile-picture-btn {
    width: 36px;
    height: 36px;
  }

  /* Dropdown position on mobile is set by JS (fixed top-left offset when moved to body) */

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    /* Start at header separator (below header), not covering nav toggle */
    top: var(--header-height, 58px);
    z-index: 49;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    padding: 1rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
      transform 0.25s ease,
      opacity 0.25s ease,
      visibility 0.25s ease;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    border-radius: var(--radius-md);
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--primary-soft);
    color: var(--primary);
  }

  .has-dropdown {
    width: 100%;
  }

  .dropdown {
    position: static;
    margin-top: 0.3rem;
    border-radius: 12px;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .dropdown li a {
    padding: 0.35rem 0.5rem;
  }

  .header-cta {
    display: none;
  }

  .hero,
  .page-hero {
    padding-inline: 1rem;
  }

  /* Card links and buttons: contain within card */
  .training-card a,
  .training-card button,
  .elearning-cert-box a,
  .elearning-cert-box button {
    min-width: 0;
    max-width: 100%;
  }

  .add-to-interest-btn {
    white-space: normal;
    text-align: center;
  }

  /* Enrollment items: wrap on small screens so button doesn't push content off */
  .enrollment-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .enrollment-download-btn {
    margin-left: auto;
  }

  /* Enrollments page tabs: wrap on mobile */
  .enrollments-tabs {
    flex-wrap: wrap;
  }

  .cards-grid,
  .training-grid,
  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
    padding-block: 1.75rem 1.5rem;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-brand p {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .footer-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .footer-columns h3 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }

  .footer-columns ul {
    gap: 0.4rem;
    font-size: 0.84rem;
  }

  .footer-bottom {
    padding-block: 1rem 1.2rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    font-size: 0.78rem;
  }

  .footer-bottom-inner span:first-child {
    line-height: 1.4;
  }
}

/* Profile dropdown on mobile: position set by JS (fixed top-left when in body) */

@media (max-width: 520px) {
  .container {
    width: min(100% - 1.5rem, 100vw - 1.5rem);
    padding-inline: 0.75rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .meta-item {
    width: 100%;
    min-width: 0;
  }

  .section {
    padding-block: 2.8rem;
  }

  .page-hero {
    padding-block: 3.1rem 1.8rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Training card: smaller ribbon clearance on very small screens */
  .training-card.has-price-ribbon .training-header-text {
    padding-right: 4.5rem;
  }

  /* Header auth: smaller so they fit */
  .header-inner .logo-img {
    max-width: 100px;
  }

  .header-inner .logo-tagline {
    display: none;
  }

  .header-auth-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
  }

  /* Filters: ensure buttons wrap and don't overflow */
  .filters {
    gap: 0.35rem;
  }

  .filter-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }

  /* Price ribbon: slightly smaller on very small screens */
  .price-ribbon {
    padding: 0.35rem 0.75rem 0.4rem 1rem;
  }

  .price-ribbon .certificate-price-usd,
  .price-ribbon .certificate-price-tnd {
    font-size: 0.8rem;
  }

  /* Profile dropdown: full-width safe */
  .header-profile-dropdown-menu {
    max-width: calc(100vw - 1.5rem);
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .header-inner {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    gap: 0.35rem;
  }

  .header-inner .logo-img {
    max-width: 85px;
  }

  .training-card.has-price-ribbon .training-header-text {
    padding-right: 3.5rem;
  }

  .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* ============================================================
   Media band — image + text used on marketing pages.
   Human-centred photography builds trust and relatability, while
   pairing it with short benefit copy aids comprehension and recall.
   ============================================================ */
.media-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem;
  align-items: center;
}

.media-band__media {
  margin: 0;
}

.media-band__media img,
.media-figure img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  box-shadow: var(--shadow-soft);
}

.media-band--reverse .media-band__media {
  order: 2;
}

.media-band__body h2 {
  margin-top: 0;
}

.media-band__points {
  list-style: none;
  margin: 1.1rem 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.media-band__points li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.media-band__points li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
  font-weight: 700;
}

/* Standalone lead image (e.g. top of a content section). */
.media-figure {
  margin: 0 0 2rem;
}

.media-figure img {
  max-height: 360px;
}

@media (max-width: 820px) {
  .media-band {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .media-band--reverse .media-band__media {
    order: 0;
  }

  .media-band__media img,
  .media-figure img {
    max-height: 300px;
  }
}

/* =====================================================================
   REFONTE MODERNE 2026 — couche prioritaire (chargée en dernier)
   ===================================================================== */

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
.hero-content h1,
.section-header h2,
.page-hero h1,
.card h3,
.cta-inner h2,
.media-band__body h2,
.stat-number,
.logo-main {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p {
  line-height: 1.65;
}

::selection {
  background: rgba(79, 70, 229, 0.18);
  color: var(--primary-strong);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Header : verre dépoli + état au scroll ---- */
.site-header {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px -14px rgba(30, 27, 75, 0.28);
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
}

.nav-link.active {
  color: var(--primary-strong);
}

/* ---- Boutons ---- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.72rem 1.45rem;
}

.btn-primary {
  background: var(--grad-brand);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 16px 32px -10px rgba(79, 70, 229, 0.55);
  transition:
    background-position 0.5s ease,
    transform 0.16s ease,
    box-shadow var(--transition-med);
}

.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 24px 46px -12px rgba(79, 70, 229, 0.62);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(79, 70, 229, 0.28);
  color: var(--primary-strong);
  backdrop-filter: blur(6px);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.9rem 1.9rem;
  font-size: 1rem;
}

/* ---- Hero : dégradé sombre + halo animé ---- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3.2rem, 6vw, 5.5rem) clamp(3rem, 5vw, 4.5rem);
  background: var(--grad-hero);
  color: #e5e7eb;
  overflow: hidden;
  border-radius: 0 0 40px 40px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -25%;
  z-index: -1;
  background:
    radial-gradient(38% 48% at 12% 18%, rgba(99, 102, 241, 0.55), transparent 60%),
    radial-gradient(36% 46% at 88% 12%, rgba(34, 211, 238, 0.45), transparent 58%),
    radial-gradient(46% 56% at 72% 92%, rgba(37, 99, 235, 0.5), transparent 58%);
  filter: blur(18px);
  animation: heroMesh 24s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 38%, #000, transparent 78%);
}

.hero-inner,
.hero-content,
.hero-panel {
  position: relative;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2.4rem, 4.8vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-content h1 .grad-text {
  background: linear-gradient(120deg, #a5b4fc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-content p {
  color: rgba(226, 232, 240, 0.82);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  max-width: 56ch;
}

.hero .btn-primary {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, 0.45);
}

.hero .btn-primary:hover {
  background: #fff;
  color: #312e81;
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -12px rgba(0, 0, 0, 0.5);
}

.hero .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}

.meta-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.meta-label {
  color: rgba(226, 232, 240, 0.7);
}

.meta-value {
  color: #f1f5f9;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-panel::before {
  opacity: 0.5;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.4);
}

.stat-number {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  background: linear-gradient(120deg, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat-label {
  color: rgba(226, 232, 240, 0.82);
}

.hero-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  color: rgba(226, 232, 240, 0.92);
}

/* ---- Sections ---- */
.section {
  padding-block: clamp(3.2rem, 5vw, 5rem);
}

.section-header h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-soft);
}

.section-alt {
  background: linear-gradient(180deg, #eef2ff 0%, #f5f6fb 100%);
  border-block: 1px solid var(--border-subtle);
}

/* ---- Cartes ---- */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-med);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 70, 229, 0.25);
}

.card:hover::before {
  transform: scaleX(1);
}

.card h3 {
  font-size: 1.2rem;
}

.card-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

.card-link {
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.card-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.card-link:hover {
  text-decoration: none;
}

.card-link:hover::after {
  transform: translateX(4px);
}

/* ---- Média band ---- */
.media-band__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.media-band__points li::before {
  color: var(--accent);
}

/* ---- Timeline / standards / partenaires ---- */
.timeline-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.partner-logo {
  filter: grayscale(1);
  opacity: 0.7;
  transition:
    filter var(--transition-med),
    opacity var(--transition-med),
    transform var(--transition-fast);
}

.partner-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-3px);
}

/* ---- Bandeau CTA ---- */
.cta-inner {
  background: var(--grad-hero);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(40% 60% at 82% 8%, rgba(34, 211, 238, 0.35), transparent 60%),
    radial-gradient(40% 60% at 8% 92%, rgba(99, 102, 241, 0.42), transparent 60%);
  pointer-events: none;
}

.cta-inner > * {
  position: relative;
}

.cta-inner h2 {
  color: #fff;
}

.cta-inner p {
  color: rgba(226, 232, 240, 0.85);
}

.cta-inner .btn-primary {
  background: #fff;
  color: var(--primary-strong);
}

.cta-inner .btn-primary:hover {
  color: #312e81;
}

/* ---- Hero des sous-pages ---- */
.page-hero {
  background: linear-gradient(165deg, #eef2ff 0%, #f5f6fb 65%);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0 0 32px 32px;
  padding-block: clamp(2.6rem, 4vw, 3.6rem);
}

.page-hero h1 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}

.page-hero p {
  font-size: 1.02rem;
}

/* ---- Apparition au scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.reveal-in {
  opacity: 1;
  transform: none;
}

@keyframes heroMesh {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, -3%, 0) scale(1.12);
  }
}

/* =====================================================================
   COUCHE "JEUNE" — sous-pages vibrantes + énergie visuelle
   ===================================================================== */

/* Hero des sous-pages : bannière dégradée vibrante (s'applique à toutes les pages) */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(55% 120% at 90% -10%, rgba(34, 211, 238, 0.5), transparent 55%),
    radial-gradient(52% 120% at 0% 115%, rgba(124, 58, 237, 0.55), transparent 55%),
    var(--grad-page);
  border-bottom: none;
}

.page-hero > .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: #fff;
  font-weight: 800;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
}

/* Titres plus affirmés */
.hero-content h1 {
  font-weight: 800;
}

/* Accent dégradé sous les titres de section */
.section-header h2 {
  position: relative;
  padding-bottom: 0.75rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: var(--grad-brand);
}

.partners-section-full .section-header h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Cartes plus rondes et plus vivantes */
.card {
  border-radius: var(--radius-xl);
}

.card:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero::before {
    animation: none !important;
  }
}
