@import "components/filters.css";
/* ================================================
   DIPLOMA.AFRICA V2 - Mobile-First App-Like Design
   Palette: Bleu #2563EB, Cyan #06B6D4, Vert #22C55E
   ================================================ */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --cyan: #06B6D4;
  --cyan-light: #22D3EE;
  --green: #22C55E;
  --green-light: #4ADE80;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --bottom-nav-height: 4rem;
}


@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap');


* { box-sizing: border-box; }

body {
  font-family: 'Exo 2', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

.app-container {
  padding-bottom: var(--bottom-nav-height);
}

@media (min-width: 768px) {
  .app-container {
    padding-bottom: 0;
  }
}

/* ============ HEADER APP-LIKE ============ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1rem;
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.app-header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.025em;
}

.app-header__logo span { color: var(--cyan); }

.app-header [data-menu-toggle] {
  display: flex;
}

@media (min-width: 768px) {
  .app-header [data-menu-toggle] {
    display: none;
  }
}

/* ============ DESKTOP NAV ============ */
.app-header__nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.app-header__nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.app-header__nav a:hover,
.app-header__nav a.is-active {
  color: var(--primary);
}

@media (min-width: 768px) {
  .app-header__nav {
    display: flex;
  }
}

/* ============ BOTTOM NAVIGATION (Mobile) ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 50;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.bottom-nav__item svg {
  width: 1.5rem;
  height: 1.5rem;
}

.bottom-nav__item:hover,
.bottom-nav__item.is-active {
  color: var(--primary);
}

.bottom-nav__item.is-active svg {
  stroke-width: 2.5;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

/* ============ DRAWER (Mobile menu) ============ */
.app-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}

.app-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.app-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-drawer.is-open .app-drawer__overlay {
  opacity: 1;
}

.app-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18rem;
  max-width: 80vw;
  background: white;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.app-drawer.is-open .app-drawer__panel {
  transform: translateX(0);
}

.app-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.app-drawer__close {
  padding: 0.5rem;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
}

.app-drawer__menu {
  padding: 1rem;
  list-style: none;
  margin: 0;
}

.app-drawer__menu li {
  margin: 0;
}

.app-drawer__menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: background 0.2s;
}

.app-drawer__menu a:hover {
  background: var(--gray-100);
}

/* ============ SEARCH BAR ============ */
.search-bar {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  margin: 1rem;
}

.search-bar__input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 0.75rem center;
  background-size: 1.25rem;
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============ FILTER CHIPS ============ */
.filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--primary); color: var(--primary); }

.filter-chip--active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ============ CARDS FORMATION ============ */
.formation-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  margin: 0.75rem 1rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.formation-card:active {
  transform: scale(0.98);
}

.formation-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.formation-card__header {
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.formation-card__logo {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  object-fit: contain;
  flex-shrink: 0;
  background: var(--gray-100);
}

.formation-card__info { flex: 1; min-width: 0; }

.formation-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .formation-card__title  {
    font-size: 1.1rem;
  }
}

.formation-card__school {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0;
}

.formation-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0 1rem 1rem;
}

/* ============ TAGS ============ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag--diplome { background: #DBEAFE; color: #1E40AF; }
.tag--duree { background: #D1FAE5; color: #065F46; }
.tag--format { background: #FEF3C7; color: #92400E; }
.tag--filiere { background: #F3E8FF; color: #6B21A8; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  color: white;
}

.btn--primary:hover { opacity: 0.9; }

.btn--outline {
  background: white;
  border: 2px solid var(--gray-200);
  color: var(--gray-700);
}

.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

/* ============ CTA STICKY ============ */
.formation-cta {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  z-index: 40;
}

@media (min-width: 768px) {
  .formation-cta {
    bottom: var(--bottom-nav-height);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  }
}

.formation-cta .btn { flex: 1; }

/* ============ UTILITIES ============ */
.container { max-width: 48rem; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============ RESPONSIVE ============ */
@media (min-width: 768px) {
  .formation-card { margin: 1rem 0; }
  .search-bar { margin: 1.5rem 0; }
}

/* ============ FIX VIEWS DRUPAL ============ */
.view-content,
.views-row {
  list-style: none;
  margin: 0;
  padding: 0;
}


.view .item-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Masquer les filtres exposés par défaut - à styliser plus tard */
.views-exposed-form {
  background: white;
  padding: 1rem;
  margin: 1rem;
  border-radius: var(--radius-xl);
/* box-shadow: var(--shadow); */
}

.views-exposed-form .form-item {
  margin-bottom: 0.75rem;
}

.views-exposed-form select,
.views-exposed-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  background: white;
}

.views-exposed-form select:focus,
.views-exposed-form input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

.views-exposed-form .form-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* ============ FIX VIEWS BOOTSTRAP ============ */
.views-bootstrap-list-group,
.views-view-list-group,
.list-group,
.list-group-item {
  list-style: none !important;
  margin: 0;
  padding: 0;
  border: none !important;
  background: transparent !important;
}

.list-group-item::before {
  display: none !important;
}

/* Supprimer les bullets sur tous les éléments de liste dans les views */
.view ul,
.view li,
.view-content ul,
.view-content li {
  list-style: none !important;
  list-style-type: none !important;
}

/* ============ FIX SVG GLOBAL ============ */
/* Forcer la taille des SVG dans les sections */
.formation-section svg,
.etablissement-detail svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  max-width: 1.25rem !important;
  max-height: 1.25rem !important;
  flex-shrink: 0;
}

/* Exception pour le toggle qui doit être plus grand */
.formation-section__toggle {
  width: 1.5rem !important;
  height: 1.5rem !important;
  max-width: 1.5rem !important;
  max-height: 1.5rem !important;
}

/* SVG dans le hero établissement */
.etablissement-detail__back svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
}

.etablissement-detail__location svg {
  width: 1rem !important;
  height: 1rem !important;
}

/* ============ FIX PAGER / AFFICHER PLUS ============ */
.pager,
.pager__items,
.pager__item,
.view .more-link,
.view .more-link li,
ul.pager__items {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}

.pager__item::before,
.more-link li::before {
  display: none !important;
  content: none !important;
}

.more-link a,
.pager a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.more-link a:hover,
.pager a:hover {
  text-decoration: underline;
}

/* ============ BOUTON AFFICHER PLUS ============ */
.view .button,
.view input[type="submit"].button,
.view a.button,
.pager .button,
.more-link .button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  color: var(--gray-700);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
 
}

.view .button:hover,
.view input[type="submit"].button:hover,
.view a.button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Centrer le bouton */
.view .more-link,
.js-pager__items,
.pager {
  display: flex;
  justify-content: center;
  padding: 1rem;
}


/* ========================================
   GLOBAL STYLES - All pages
   ======================================== */

/* Hide footer 
.site-footer,
footer.site-footer,
#footer,
.footer,
.region-footer {
  display: none !important;
}
*/


/* Footer caché en mobile, visible en desktop */
.site-footer, footer.site-footer, #footer, .footer, .region-footer {
  display: none;
}

@media (min-width: 1024px) {
  .site-footer, footer.site-footer {
    display: block;
  }
}


/* ========================================
   HEADER - Global
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid #f3f4f6;
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 1rem 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
  }
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  width: 180px;
  height: auto;
}

@media (min-width: 640px) {
  .logo-image {
    width: 250px;
  }
}

.logo-fallback {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
}

.logo-diploma {
  color: #2563eb;
}

.logo-dot {
  color: #06b6d4;
}

.logo-africa {
  color: #1f2937;
}

/* ========================================
   COUNTRY SWITCHER - Global
   ======================================== */

.country-switcher {
  position: relative;
}

.country-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.country-trigger:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.country-trigger .chevron {
  transition: transform 0.2s;
}

.country-switcher.open .chevron {
  transform: rotate(180deg);
}

.country-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 14rem;
  max-height: 60vh;
  overflow-y: auto;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0;
  z-index: 100;
}

.country-switcher.open .country-dropdown {
  display: block;
}

.country-dropdown .dropdown-label {
  padding: 0.5rem 1rem;
  font-size: 0.65rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  position: sticky;
  top: 0;
  background: white;
}

.country-dropdown .country-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  text-decoration: none;
  color: #374151;
  transition: background 0.15s;
}

.country-dropdown .country-option:hover {
  background: #f9fafb;
}

.country-dropdown .country-option.active {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.country-dropdown .country-code {
  font-weight: 700;
  font-size: 0.875rem;
  width: 1.75rem;
}

.country-dropdown .country-name {
  font-size: 0.875rem;
}

/* ========================================
   MAIN CONTENT - Global
   ======================================== */

.main-content {
  padding-bottom: 5rem;
  min-height: calc(100vh - 60px);
}

@media (min-width: 640px) {
  .main-content {
    padding: 0 1rem 5rem;
  }
}

@media (min-width: 1024px) {
  .main-content {
    padding: 0 1.5rem 2rem;
    max-width: 80rem;
    margin: 0 auto;
  }
}

/* ========================================
   BOTTOM NAVIGATION - Global
   ======================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #f3f4f6;
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  padding: 0.5rem 0.25rem;
  text-decoration: none;
  color: #9ca3af;
  transition: color 0.2s;
}

.bottom-nav-item:hover {
  color: #6b7280;
}

.bottom-nav-item.active {
  color: #2563eb;
}

.bottom-nav-item .nav-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.bottom-nav-item span {
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 640px) {
  .bottom-nav-item span {
    font-size: 0.7rem;
  }
}

/* Hide bottom nav on large desktop only */
@media (min-width: 1280px) {
  .bottom-nav {
    display: none;
  }
  
  .main-content {
    padding-bottom: 2rem;
  }
}

/* ========================================
   FORMATIONS LIST - Responsive margins
   ======================================== */

.view-formations .view-content,
.views-view-formations .view-content {
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .view-formations .view-content,
  .views-view-formations .view-content {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .view-formations .view-content,
  .views-view-formations .view-content {
    padding: 0;
    max-width: 72rem;
    margin: 0 auto;
  }
}
