/* ==========================================================================
   NINETY'S STORY COMPANY (NSC) - FEUILLE DE STYLE OFFICIELLE
   Plateforme institutionnelle Loi 1901 - Nice, Alpes-Maritimes
   Palette : Bleu Royal (#002366), Or Profond (#FFD700), Gris Clair (#F4F6F9)
   ========================================================================== */

/* --- Normalisation & Typographie --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  background-color: #ffffff;
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #002366;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #d97706;
}

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

h1, h2, h3, h4, h5, h6 {
  color: #002366;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 1.5rem; }
h3 { font-size: 1.35rem; margin-top: 1.25rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1.15rem;
  color: #334155;
  font-size: 1rem;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #334155;
}

li {
  margin-bottom: 0.5rem;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   DOUBLE-DECKER HEADER SYSTEM
   ========================================================================== */

/* Row 1: Bandeau d'Utilité Supérieur Pinned */
.top-utility-strip {
  background-color: #F4F6F9;
  color: #333333;
  height: 42px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  z-index: 1001;
}

.top-utility-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rna-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #002366;
}

.rna-badge span {
  background: #002366;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.prefecture-mention {
  color: #64748b;
  font-size: 12px;
}

.top-utility-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.simulated-search {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 8px;
}

.simulated-search input {
  border: none;
  background: transparent;
  font-size: 12px;
  outline: none;
  width: 130px;
  color: #334155;
}

.simulated-search button {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 12px;
  color: #002366;
}

.lang-selector .active {
  color: #002366;
  text-decoration: underline;
}

/* Row 2: Barre de Navigation Principale */
.main-header {
  background-color: #ffffff;
  border-bottom: 2px solid #002366;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 35, 102, 0.05);
}

.main-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand-logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  background: #002366;
  color: #FFD700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  border-radius: 6px;
  border: 2px solid #FFD700;
  box-shadow: 0 2px 6px rgba(0, 35, 102, 0.2);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #002366;
  line-height: 1.1;
  letter-spacing: -0.2px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Navigation Menu & Dropdowns */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: #002366;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.nav-link:hover, .nav-link:focus {
  background-color: #F4F6F9;
  color: #002366;
}

.nav-link.active {
  color: #002366;
  background-color: #F4F6F9;
  border-bottom: 2px solid #FFD700;
}

.dropdown-indicator {
  font-size: 0.65rem;
  color: #64748b;
  transition: transform 0.2s ease;
}

.nav-item:hover .dropdown-indicator {
  transform: rotate(180deg);
  color: #002366;
}

/* Dropdown Content */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #002366;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  list-style: none;
  display: none;
  padding: 6px 0;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  display: block;
}

.dropdown-item a {
  display: block;
  padding: 11px 18px;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid #f8fafc;
  transition: all 0.15s ease;
  min-height: 44px;
  line-height: 22px;
}

.dropdown-item a:hover {
  background-color: #F4F6F9;
  color: #002366;
  padding-left: 22px;
  font-weight: 600;
}

/* Header Action Button */
.header-action {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.btn-header-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #002366;
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid #002366;
  transition: all 0.2s ease;
  min-height: 44px;
  white-space: nowrap;
}

.btn-header-contact:hover {
  background-color: #FFD700;
  color: #002366;
  border-color: #FFD700;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 1.25rem;
  color: #002366;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

/* ==========================================================================
   BOUTONS & ELEMENTS D'APPEL A L'ACTION (NON-COMMERCIAUX)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  min-height: 44px;
  text-decoration: none;
}

.btn-primary {
  background-color: #002366;
  color: #ffffff;
  border-color: #002366;
}

.btn-primary:hover {
  background-color: #001744;
  color: #FFD700;
  border-color: #001744;
}

.btn-gold {
  background-color: #FFD700;
  color: #002366;
  border-color: #FFD700;
}

.btn-gold:hover {
  background-color: #e6c200;
  color: #001744;
}

.btn-outline {
  background-color: transparent;
  color: #002366;
  border-color: #002366;
}

.btn-outline:hover {
  background-color: #002366;
  color: #ffffff;
}

/* ==========================================================================
   HERO FRAMEWORK INSTITUTIONNEL
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #001744 0%, #002366 100%);
  color: #ffffff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid #FFD700;
  color: #FFD700;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.hero-title {
  color: #ffffff;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-summary-2sentences {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #f1f5f9;
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-notice {
  font-size: 0.85rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ==========================================================================
   PAGE BANNER STANDARD (Sous-pages)
   ========================================================================== */
.page-banner {
  background: linear-gradient(135deg, #001744 0%, #002366 100%);
  color: #ffffff;
  padding: 44px 0;
  border-bottom: 4px solid #FFD700;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #FFD700;
}

.page-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-lead {
  font-size: 1.1rem;
  color: #e2e8f0;
  max-width: 850px;
  margin-bottom: 0;
}

/* ==========================================================================
   STRUCTURE EN GRILLE A DEUX COLONNES (3fr Contenu / 1fr Side-Rail)
   ========================================================================== */
.main-content-section {
  padding: 50px 0;
}

.two-column-layout {
  display: grid;
  grid-template-columns: 3fr 1.1fr;
  gap: 36px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background-color: #F4F6F9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 24px;
}

.sidebar-widget-title {
  color: #002366;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FFD700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Chiffres Cles & Metrics */
.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metric-item {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 4px;
  border-left: 4px solid #002366;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: #002366;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

/* Reinvestment Statement Card */
.reinvestment-banner {
  background: #002366;
  color: #ffffff;
  padding: 22px;
  border-radius: 6px;
  border-left: 5px solid #FFD700;
  margin: 30px 0;
}

.reinvestment-banner h4 {
  color: #FFD700;
  margin-bottom: 8px;
}

.reinvestment-banner p {
  color: #f1f5f9;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ==========================================================================
   MODULES DE CONTENU INSTITUTIONNEL
   ========================================================================== */
.section-block {
  margin-bottom: 40px;
}

.content-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.content-card.highlight {
  border-top: 4px solid #002366;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Image Embeds with Strict Timestamped Cache-Busting */
.feature-image-block {
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.feature-image-block img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Operational Roadmap (3 Etapes) */
.roadmap-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 28px 0;
}

.roadmap-step {
  background: #F4F6F9;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #002366;
  border-radius: 6px;
  padding: 22px;
}

.step-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #002366;
  margin-bottom: 8px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #002366;
  margin-bottom: 8px;
}

/* Program Logs */
.program-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 24px;
  overflow: hidden;
  background: #ffffff;
}

.program-header {
  background: #F4F6F9;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.program-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.program-status-tag {
  background: #002366;
  color: #FFD700;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.program-body {
  padding: 24px;
}

/* Tables de Transparence Financière & Comptabilité */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.institutional-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.institutional-table th {
  background-color: #002366;
  color: #ffffff;
  padding: 14px 18px;
  font-weight: 700;
  border-bottom: 2px solid #FFD700;
}

.institutional-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.institutional-table tr:nth-child(even) td {
  background-color: #F4F6F9;
}

.institutional-table tr:hover td {
  background-color: #f8fafc;
}

.institutional-table tfoot td {
  font-weight: 800;
  background-color: #edf2f7;
  color: #002366;
  border-top: 2px solid #002366;
}

/* Formulaires Institutionnels (Contact & Bénévolat) */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #002366;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #002366;
  box-shadow: 0 0 0 3px rgba(0, 35, 102, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-disclaimer {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 8px;
}

/* Timeline Historique */
.timeline-list {
  position: relative;
  padding-left: 30px;
  margin: 24px 0;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 3px;
  background: #002366;
}

.timeline-entry {
  position: relative;
  margin-bottom: 28px;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 4px;
  width: 13px;
  height: 13px;
  background: #FFD700;
  border: 3px solid #002366;
  border-radius: 50%;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: #002366;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Accordéon FAQ & Ressources */
.faq-block {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-title {
  background: #F4F6F9;
  padding: 16px 20px;
  font-weight: 700;
  color: #002366;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-content {
  padding: 18px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   PIED DE PAGE OFFICIEL (FOOTER)
   ========================================================================== */
.main-footer {
  background-color: #001744;
  color: #cbd5e1;
  padding: 50px 0 20px 0;
  margin-top: auto;
  border-top: 4px solid #FFD700;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #FFD700;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand-title {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.footer-links a:hover {
  color: #FFD700;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.footer-contact-item strong {
  color: #ffffff;
  min-width: 70px;
}

.footer-legal-notice-box {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #FFD700;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 30px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-bottom-links {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-bottom-links a {
  color: #94a3b8;
  text-decoration: underline;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-bottom-links a:hover {
  color: #FFD700;
}

/* ==========================================================================
   MEDIA QUERIES RESPONSIVES
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .two-column-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .roadmap-steps {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-utility-strip {
    flex-direction: column;
    height: auto;
    padding: 8px 16px;
    gap: 8px;
    align-items: flex-start;
  }
  
  .top-utility-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 2px solid #002366;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .nav-menu.is-open {
    display: flex;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid #002366;
    border-radius: 0;
    margin-left: 12px;
    padding: 4px 0 4px 8px;
    display: block;
  }
  
  .header-action {
    display: none;
  }
  
  .hero-title {
    font-size: 1.85rem;
  }
  
  .grid-2, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
