<<<<<<< HEAD
/*
 * 📁 Fichier: static/css/responsive.css
 * 🎯 STYLES RESPONSIVE AVANCÉS - SYSTÈME PN-RAVEC
 * 📅 Créé: 18 juillet 2025
 * 👨‍💻 Système: PN-RAVEC - Statistiques État Civil
 * 
 * République de Guinée - Programme National de Recensement Administratif à Vocation d'État Civil
 * 
 * Design responsive mobile-first pour tous les appareils :
 * - Mobile : 320px - 768px
 * - Tablette : 768px - 1024px  
 * - Desktop : 1024px+
 * - Large Screen : 1440px+
 * 
 * Optimisations spécifiques pour :
 * - Saisie tactile (boutons, formulaires)
 * - Navigation mobile
 * - Tableaux de données
 * - Actions rapides
 * - Dashboard adaptatif
 */

/* ========================================================================
   VARIABLES RESPONSIVE
   ======================================================================== */

:root {
  /* Breakpoints */
  --breakpoint-xs: 320px;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
  
  /* Espacements responsive */
  --spacing-mobile: 0.75rem;
  --spacing-tablet: 1rem;
  --spacing-desktop: 1.5rem;
  --spacing-large: 2rem;
  
  /* Tailles de police responsive */
  --font-size-base-mobile: 14px;
  --font-size-base-tablet: 15px;
  --font-size-base-desktop: 16px;
  
  /* Hauteurs d'interaction tactile */
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;
  --touch-target-large: 56px;
  
  /* Largeurs de conteneur */
  --container-mobile: 100%;
  --container-tablet: 750px;
  --container-desktop: 970px;
  --container-large: 1170px;
  --container-xlarge: 1320px;
}

/* ========================================================================
   BASE MOBILE FIRST (320px+)
   ======================================================================== */

/* Typography mobile */
html {
  font-size: var(--font-size-base-mobile);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Navigation mobile */
.navbar-toggler {
  min-height: var(--touch-target-comfortable);
  min-width: var(--touch-target-comfortable);
  border: none;
  padding: 0.5rem;
}

.navbar-collapse {
  background: rgba(43, 76, 140, 0.95);
  margin: 0.5rem -1rem -1rem;
  padding: 1rem;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  backdrop-filter: blur(10px);
}

/* Boutons tactiles mobile */
.btn {
  min-height: var(--touch-target-min);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: var(--border-radius-md);
}

.btn-lg {
  min-height: var(--touch-target-large);
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Actions rapides mobile */
.action-rapide-card {
  margin-bottom: var(--spacing-mobile);
  box-shadow: 0 2px 8px rgba(43, 76, 140, 0.15);
}

.btn-action {
  min-height: var(--touch-target-comfortable);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  padding: 0.875rem 1.25rem;
}

/* Formulaires mobile */
.form-control {
  min-height: var(--touch-target-comfortable);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border-radius: var(--border-radius-md);
}

.form-select {
  min-height: var(--touch-target-comfortable);
  padding: 0.875rem 2.5rem 0.875rem 1rem;
}

/* Dashboard mobile */
.stats-card {
  margin-bottom: var(--spacing-mobile);
  padding: 1rem;
}

.stats-number {
  font-size: 2rem;
  line-height: 1.1;
}

.stats-label {
  font-size: 0.85rem;
}

/* Headers mobile */
.user-info-panel {
  padding: var(--spacing-mobile);
}

.user-info-panel .row > div {
  text-align: center;
  margin-bottom: var(--spacing-mobile);
}

.user-info-panel .row > div:last-child {
  margin-bottom: 0;
}

/* ========================================================================
   SMALL MOBILE (320px - 575px)
   ======================================================================== */

@media (max-width: 575.98px) {
  /* Typography extra petite */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .logo-pnravec {
    height: 32px;
  }
  
  /* Layout compact */
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Navigation mobile compacte */
  .nav-tabs-pnravec .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  /* Cartes empilées */
  .row > [class*="col-"] {
    margin-bottom: 1rem;
  }
  
  .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }
  
  /* Boutons pleine largeur */
  .btn-mobile-full {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Status indicator compact */
  .status-indicator {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* Dashboard compact */
  .dashboard-container {
    padding: 0.75rem 0;
  }
  
  /* Footer mobile */
  .footer-officiel {
    text-align: center;
    padding: 1rem 0.75rem;
  }
  
  .footer-officiel .row > div {
    text-align: center !important;
    margin-bottom: 1rem;
  }
  
  .footer-officiel .row > div:last-child {
    margin-bottom: 0;
  }
}

/* ========================================================================
   TABLETTES (576px - 767px)
   ======================================================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
  html {
    font-size: var(--font-size-base-tablet);
  }
  
  /* Navigation tablette */
  .nav-tabs-pnravec .nav-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  /* Layout tablette */
  .container-fluid {
    max-width: var(--container-tablet);
  }
  
  /* Actions rapides en grille */
  .action-rapide-card {
    height: 100%;
  }
  
  /* Stats en 2 colonnes */
  .stats-card .row > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Dashboard tablette */
  .dashboard-container {
    padding: 1.25rem 0;
  }
  
  /* Formulaires tablette */
  .form-row .col-md-6,
  .form-row .col-md-4 {
    margin-bottom: 1rem;
  }
}

/* ========================================================================
   DESKTOP (768px - 991px)
   ======================================================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
  html {
    font-size: var(--font-size-base-desktop);
  }
  
  /* Navigation desktop */
  .navbar-expand-lg .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  /* Layout desktop */
  .container-fluid {
    max-width: var(--container-desktop);
    margin: 0 auto;
  }
  
  /* Dashboard desktop */
  .stats-number {
    font-size: 2.5rem;
  }
  
  .action-rapide-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .action-rapide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(43, 76, 140, 0.2);
  }
  
  /* Sidebar potentielle */
  .sidebar-toggle {
    display: block;
  }
  
  /* User info horizontal */
  .user-info-panel .row > div {
    text-align: left;
    margin-bottom: 0;
  }
  
  .user-info-panel .row > div:last-child {
    text-align: right;
  }
}

/* ========================================================================
   LARGE DESKTOP (992px+)
   ======================================================================== */

@media (min-width: 992px) {
  /* Container large */
  .container-fluid {
    max-width: var(--container-large);
  }
  
  /* Navigation full */
  .navbar-expand-lg .navbar-collapse {
    background: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }
  
  /* Dashboard large */
  .dashboard-container {
    padding: var(--spacing-desktop) 0;
  }
  
  /* Actions rapides optimisées */
  .btn-action:hover {
    transform: translateX(8px);
  }
  
  /* Hover effects desktop */
  .stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 76, 140, 0.15);
  }
  
  /* Multi-colonnes pour listes */
  .multi-column-list {
    columns: 2;
    column-gap: 2rem;
  }
  
  /* Sidebar expanded */
  .sidebar-expanded {
    width: 280px;
  }
  
  .main-content-expanded {
    margin-left: 280px;
  }
}

/* ========================================================================
   EXTRA LARGE DESKTOP (1200px+)
   ======================================================================== */

@media (min-width: 1200px) {
  .container-fluid {
    max-width: var(--container-xlarge);
  }
  
  /* Typography large screen */
  .display-1 { font-size: 6rem; }
  .display-2 { font-size: 5rem; }
  .display-3 { font-size: 4.5rem; }
  .display-4 { font-size: 3.5rem; }
  
  /* Dashboard XXL */
  .stats-number {
    font-size: 3rem;
  }
  
  /* Actions en 4 colonnes */
  .action-grid-xl .col-xl-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  /* Espacement généreux */
  .dashboard-container {
    padding: var(--spacing-large) 0;
  }
}

/* ========================================================================
   ULTRA WIDE (1400px+)
   ======================================================================== */

@media (min-width: 1400px) {
  .container-fluid {
    max-width: 1320px;
  }
  
  /* Layout ultra wide */
  .ultra-wide-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
  }
  
  /* Dashboard ultra wide */
  .stats-ultra-wide {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }
}

/* ========================================================================
   LANDSCAPE ORIENTATION (Mobile/Tablette)
   ======================================================================== */

@media (orientation: landscape) and (max-height: 600px) {
  /* Header compact en landscape */
  .header-officiel {
    position: static;
  }
  
  .user-info-panel {
    display: none;
  }
  
  /* Dashboard compact landscape */
  .dashboard-container {
    padding: 0.5rem 0;
  }
  
  /* Navigation horizontale */
  .nav-tabs-pnravec {
    padding: 0;
  }
  
  .nav-tabs-pnravec .nav-link {
    padding: 0.5rem 1rem;
  }
}

/* ========================================================================
   PRINT RESPONSIVE
   ======================================================================== */

@media print {
  /* Layout print optimisé */
  .container-fluid {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  
  /* Masquer éléments interactifs */
  .btn, 
  .navbar,
  .status-indicator,
  .user-info-panel,
  .footer-officiel {
    display: none !important;
  }
  
  /* Optimiser cartes pour print */
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
  }
  
  /* Typography print */
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
    page-break-after: avoid;
  }
  
  /* Tableaux print */
  table {
    width: 100%;
    border-collapse: collapse;
  }
  
  th, td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
  }
}

/* ========================================================================
   ACCESSIBILITÉ RESPONSIVE
   ======================================================================== */

/* Focus visible amélioré pour mobile */
@media (max-width: 767.98px) {
  *:focus-visible {
    outline: 3px solid var(--bleu-pnravec);
    outline-offset: 3px;
  }
}

/* Préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  .action-rapide-card,
  .stats-card,
  .btn {
    transition: none;
  }
  
  .action-rapide-card:hover,
  .stats-card:hover {
    transform: none;
  }
}

/* Contraste élevé responsive */
@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }
  
  .card {
    border-width: 2px;
  }
  
  .form-control {
    border-width: 2px;
  }
}

/* ========================================================================
   UTILITAIRES RESPONSIVE
   ======================================================================== */

/* Classes d'affichage responsive */
.show-mobile { display: block; }
.show-tablet { display: none; }
.show-desktop { display: none; }

@media (min-width: 576px) {
  .show-mobile { display: none; }
  .show-tablet { display: block; }
}

@media (min-width: 992px) {
  .show-tablet { display: none; }
  .show-desktop { display: block; }
}

/* Espacements responsive */
.p-responsive {
  padding: var(--spacing-mobile);
}

@media (min-width: 768px) {
  .p-responsive {
    padding: var(--spacing-tablet);
  }
}

@media (min-width: 992px) {
  .p-responsive {
    padding: var(--spacing-desktop);
  }
}

/* Typography responsive */
.text-responsive {
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .text-responsive {
    font-size: 1rem;
  }
}

@media (min-width: 992px) {
  .text-responsive {
    font-size: 1.1rem;
  }
}

/* Boutons responsive */
.btn-responsive {
  width: 100%;
  margin-bottom: 0.5rem;
}

@media (min-width: 576px) {
  .btn-responsive {
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
  }
}

/* Grid responsive pour actions */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .actions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================================================
   OPTIMISATIONS PERFORMANCE MOBILE
   ======================================================================== */

/* Optimisations GPU pour mobile */
@media (max-width: 767.98px) {
  .card,
  .btn,
  .navbar {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Scroll optimisé */
.scroll-smooth {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Images responsive */
.img-responsive {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================================================
   TABLEAUX RESPONSIFS AVANCÉS
   ======================================================================== */

/* Table responsive avec scroll horizontal */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  margin-bottom: 0;
}

/* Table mobile avec cartes */
@media (max-width: 575.98px) {
  .table-mobile-cards {
    border: 0;
  }
  
  .table-mobile-cards thead {
    display: none;
  }
  
  .table-mobile-cards tbody,
  .table-mobile-cards tr,
  .table-mobile-cards td {
    display: block;
    border: 0;
  }
  
  .table-mobile-cards tr {
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .table-mobile-cards td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 40%;
  }
  
  .table-mobile-cards td:last-child {
    border-bottom: 0;
  }
  
  .table-mobile-cards td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
  }
}

/* Table scroll sur tablette */
@media (min-width: 576px) and (max-width: 991.98px) {
  .table-responsive {
    font-size: 0.9rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
  
  .table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ========================================================================
   GRAPHIQUES RESPONSIFS (Chart.js)
   ======================================================================== */

/* Container de base pour graphiques */
.chart-container {
  position: relative;
  width: 100%;
  margin: var(--spacing-mobile) 0;
}

.chart-container canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Tailles responsive des graphiques */
@media (max-width: 575.98px) {
  .chart-container {
    height: 200px;
  }
  
  /* Masquer légendes sur mobile si trop chargées */
  .chart-mobile-no-legend .chart-container canvas {
    margin-top: -20px;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .chart-container {
    height: 250px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .chart-container {
    height: 300px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .chart-container {
    height: 350px;
  }
}

@media (min-width: 1200px) {
  .chart-container {
    height: 400px;
  }
}

/* Graphiques côte à côte sur desktop */
@media (min-width: 992px) {
  .charts-side-by-side {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
  }
  
  .charts-side-by-side .chart-container:first-child {
    height: 400px;
  }
  
  .charts-side-by-side .chart-container:last-child {
    height: 300px;
  }
}

/* ========================================================================
   CARTES STATISTIQUES RESPONSIVES AVANCÉES
   ======================================================================== */

/* Base des cartes stats */
.stat-card,
.metric-card,
.metric-card-modern {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-bottom: var(--spacing-mobile);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover,
.metric-card:hover,
.metric-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Contenu des cartes responsive */
.stat-card .text-center,
.metric-card-modern .metric-content {
  padding: var(--spacing-mobile);
}

/* Numéros statistiques responsive */
.stat-number,
.metric-value,
.metric-value-large {
  font-weight: 700;
  color: var(--dark-color);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

/* Icônes responsive */
.stat-icon,
.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: var(--spacing-mobile);
}

/* Breakdowns responsive */
.metric-breakdown {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.breakdown-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
  border-left: 3px solid var(--accent-color, var(--primary-color));
}

.breakdown-label {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breakdown-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-color);
}

/* Responsive des cartes selon l'écran */
@media (max-width: 575.98px) {
  .stat-number,
  .metric-value-large {
    font-size: 1.5rem;
  }
  
  .stat-icon,
  .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .metric-breakdown {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .breakdown-label {
    margin-bottom: 0;
    font-size: 0.7rem;
  }
  
  .breakdown-value {
    font-size: 0.9rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .stat-number,
  .metric-value-large {
    font-size: 1.8rem;
  }
  
  .stat-icon,
  .metric-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .stat-number,
  .metric-value-large {
    font-size: 2.2rem;
  }
  
  .stat-icon,
  .metric-icon {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }
}

@media (min-width: 992px) {
  .stat-card .text-center,
  .metric-card-modern .metric-content {
    padding: var(--spacing-desktop);
  }
  
  .stat-number,
  .metric-value-large {
    font-size: 2.5rem;
  }
  
  .stat-icon,
  .metric-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .stat-number,
  .metric-value-large {
    font-size: 2.8rem;
  }
}

/* ========================================================================
   FORMULAIRES MULTI-ÉTAPES RESPONSIFS
   ======================================================================== */

/* Container de formulaire responsive */
.form-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: var(--spacing-mobile);
  margin-bottom: var(--spacing-mobile);
}

@media (min-width: 768px) {
  .form-container {
    padding: var(--spacing-desktop);
    margin-bottom: var(--spacing-desktop);
  }
}

/* Sections de formulaire */
.section-divider {
  border-top: 2px solid #e9ecef;
  margin: var(--spacing-mobile) 0;
  padding-top: var(--spacing-mobile);
}

@media (min-width: 768px) {
  .section-divider {
    margin: var(--spacing-desktop) 0;
    padding-top: var(--spacing-desktop);
  }
}

/* Titres de section responsive */
.section-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: var(--spacing-mobile);
  border-left: 4px solid var(--primary-color);
  padding-left: var(--spacing-mobile);
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-desktop);
  }
}

/* Inputs de comptage responsive */
.counter-input {
  max-width: 80px;
  text-align: center;
  font-weight: 600;
}

@media (min-width: 768px) {
  .counter-input {
    max-width: 100px;
  }
}

/* Résumé responsive */
.form-summary {
  background: #f8f9fa;
  border-radius: 10px;
  padding: var(--spacing-mobile);
}

@media (min-width: 768px) {
  .form-summary {
    padding: var(--spacing-desktop);
  }
}

/* ========================================================================
   BREADCRUMBS RESPONSIFS
   ======================================================================== */

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: var(--spacing-mobile);
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #6c757d;
  font-weight: bold;
}

@media (max-width: 575.98px) {
  .breadcrumb {
    font-size: 0.8rem;
  }
  
  /* Masquer les éléments intermédiaires sur mobile */
  .breadcrumb-item:not(:first-child):not(:last-child) {
    display: none;
  }
  
  .breadcrumb-item:first-child::after {
    content: " ... ";
    color: #6c757d;
  }
}

/* ========================================================================
   NOTIFICATIONS ET ALERTES RESPONSIVES
   ======================================================================== */

.alert {
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-mobile);
  padding: var(--spacing-mobile);
}

@media (max-width: 575.98px) {
  .alert {
    font-size: 0.9rem;
    padding: 0.75rem;
  }
  
  .alert .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* ========================================================================
   MODALES RESPONSIVES
   ======================================================================== */

@media (max-width: 575.98px) {
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-content {
    border-radius: var(--border-radius-md);
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* ========================================================================
   HEADERS ET NAVIGATION AVANCÉS
   ======================================================================== */

/* Headers responsive pour pages spécifiques */
.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
  color: white;
  padding: var(--spacing-mobile);
  margin-bottom: var(--spacing-mobile);
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 12px rgba(43, 76, 140, 0.15);
}

@media (min-width: 768px) {
  .page-header {
    padding: var(--spacing-desktop);
    margin-bottom: var(--spacing-desktop);
  }
}

/* Titres adaptatifs */
.page-header h1,
.page-header h2,
.page-header h3 {
  margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .page-header h2 {
    font-size: 1.3rem;
  }
  
  .page-header h3 {
    font-size: 1.1rem;
  }
  
  /* Masquer texte secondaire sur mobile */
  .page-header .lead {
    display: none;
  }
}

/*
 * FIN DES STYLES RESPONSIVE PN-RAVEC AVANCÉS
 * © 2025 République de Guinée - Programme National de Recensement Administratif à Vocation d'État Civil
 */
||||||| e54ad7c
=======
/*
 * 📁 Fichier: static/css/responsive.css
 * 🎯 STYLES RESPONSIVE AVANCÉS - SYSTÈME PN-RAVEC
 * 📅 Créé: 18 juillet 2025
 * 👨‍💻 Système: PN-RAVEC - Statistiques État Civil
 * 
 * République de Guinée - Programme National de Recensement Administratif à Vocation d'État Civil
 * 
 * Design responsive mobile-first pour tous les appareils :
 * - Mobile : 320px - 768px
 * - Tablette : 768px - 1024px  
 * - Desktop : 1024px+
 * - Large Screen : 1440px+
 * 
 * Optimisations spécifiques pour :
 * - Saisie tactile (boutons, formulaires)
 * - Navigation mobile
 * - Tableaux de données
 * - Actions rapides
 * - Dashboard adaptatif
 */

/* ========================================================================
   VARIABLES RESPONSIVE
   ======================================================================== */

:root {
  /* Breakpoints */
  --breakpoint-xs: 320px;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
  
  /* Espacements responsive */
  --spacing-mobile: 0.75rem;
  --spacing-tablet: 1rem;
  --spacing-desktop: 1.5rem;
  --spacing-large: 2rem;
  
  /* Tailles de police responsive */
  --font-size-base-mobile: 14px;
  --font-size-base-tablet: 15px;
  --font-size-base-desktop: 16px;
  
  /* Hauteurs d'interaction tactile */
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;
  --touch-target-large: 56px;
  
  /* Largeurs de conteneur */
  --container-mobile: 100%;
  --container-tablet: 750px;
  --container-desktop: 970px;
  --container-large: 1170px;
  --container-xlarge: 1320px;
}

/* ========================================================================
   BASE MOBILE FIRST (320px+)
   ======================================================================== */

/* Typography mobile */
html {
  font-size: var(--font-size-base-mobile);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Navigation mobile */
.navbar-toggler {
  min-height: var(--touch-target-comfortable);
  min-width: var(--touch-target-comfortable);
  border: none;
  padding: 0.5rem;
}

.navbar-collapse {
  background: rgba(43, 76, 140, 0.95);
  margin: 0.5rem -1rem -1rem;
  padding: 1rem;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  backdrop-filter: blur(10px);
}

/* Boutons tactiles mobile */
.btn {
  min-height: var(--touch-target-min);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: var(--border-radius-md);
}

.btn-lg {
  min-height: var(--touch-target-large);
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Actions rapides mobile */
.action-rapide-card {
  margin-bottom: var(--spacing-mobile);
  box-shadow: 0 2px 8px rgba(43, 76, 140, 0.15);
}

.btn-action {
  min-height: var(--touch-target-comfortable);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  padding: 0.875rem 1.25rem;
}

/* Formulaires mobile */
.form-control {
  min-height: var(--touch-target-comfortable);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border-radius: var(--border-radius-md);
}

.form-select {
  min-height: var(--touch-target-comfortable);
  padding: 0.875rem 2.5rem 0.875rem 1rem;
}

/* Dashboard mobile */
.stats-card {
  margin-bottom: var(--spacing-mobile);
  padding: 1rem;
}

.stats-number {
  font-size: 2rem;
  line-height: 1.1;
}

.stats-label {
  font-size: 0.85rem;
}

/* Headers mobile */
.user-info-panel {
  padding: var(--spacing-mobile);
}

.user-info-panel .row > div {
  text-align: center;
  margin-bottom: var(--spacing-mobile);
}

.user-info-panel .row > div:last-child {
  margin-bottom: 0;
}

/* ========================================================================
   SMALL MOBILE (320px - 575px)
   ======================================================================== */

@media (max-width: 575.98px) {
  /* Typography extra petite */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .logo-pnravec {
    height: 32px;
  }
  
  /* Layout compact */
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Navigation mobile compacte */
  .nav-tabs-pnravec .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  /* Cartes empilées */
  .row > [class*="col-"] {
    margin-bottom: 1rem;
  }
  
  .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }
  
  /* Boutons pleine largeur */
  .btn-mobile-full {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Status indicator compact */
  .status-indicator {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  /* Dashboard compact */
  .dashboard-container {
    padding: 0.75rem 0;
  }
  
  /* Footer mobile */
  .footer-officiel {
    text-align: center;
    padding: 1rem 0.75rem;
  }
  
  .footer-officiel .row > div {
    text-align: center !important;
    margin-bottom: 1rem;
  }
  
  .footer-officiel .row > div:last-child {
    margin-bottom: 0;
  }
}

/* ========================================================================
   TABLETTES (576px - 767px)
   ======================================================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
  html {
    font-size: var(--font-size-base-tablet);
  }
  
  /* Navigation tablette */
  .nav-tabs-pnravec .nav-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  /* Layout tablette */
  .container-fluid {
    max-width: var(--container-tablet);
  }
  
  /* Actions rapides en grille */
  .action-rapide-card {
    height: 100%;
  }
  
  /* Stats en 2 colonnes */
  .stats-card .row > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Dashboard tablette */
  .dashboard-container {
    padding: 1.25rem 0;
  }
  
  /* Formulaires tablette */
  .form-row .col-md-6,
  .form-row .col-md-4 {
    margin-bottom: 1rem;
  }
}

/* ========================================================================
   DESKTOP (768px - 991px)
   ======================================================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
  html {
    font-size: var(--font-size-base-desktop);
  }
  
  /* Navigation desktop */
  .navbar-expand-lg .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  /* Layout desktop */
  .container-fluid {
    max-width: var(--container-desktop);
    margin: 0 auto;
  }
  
  /* Dashboard desktop */
  .stats-number {
    font-size: 2.5rem;
  }
  
  .action-rapide-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .action-rapide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(43, 76, 140, 0.2);
  }
  
  /* Sidebar potentielle */
  .sidebar-toggle {
    display: block;
  }
  
  /* User info horizontal */
  .user-info-panel .row > div {
    text-align: left;
    margin-bottom: 0;
  }
  
  .user-info-panel .row > div:last-child {
    text-align: right;
  }
}

/* ========================================================================
   LARGE DESKTOP (992px+)
   ======================================================================== */

@media (min-width: 992px) {
  /* Container large */
  .container-fluid {
    max-width: var(--container-large);
  }
  
  /* Navigation full */
  .navbar-expand-lg .navbar-collapse {
    background: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }
  
  /* Dashboard large */
  .dashboard-container {
    padding: var(--spacing-desktop) 0;
  }
  
  /* Actions rapides optimisées */
  .btn-action:hover {
    transform: translateX(8px);
  }
  
  /* Hover effects desktop */
  .stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 76, 140, 0.15);
  }
  
  /* Multi-colonnes pour listes */
  .multi-column-list {
    columns: 2;
    column-gap: 2rem;
  }
  
  /* Sidebar expanded */
  .sidebar-expanded {
    width: 280px;
  }
  
  .main-content-expanded {
    margin-left: 280px;
  }
}

/* ========================================================================
   EXTRA LARGE DESKTOP (1200px+)
   ======================================================================== */

@media (min-width: 1200px) {
  .container-fluid {
    max-width: var(--container-xlarge);
  }
  
  /* Typography large screen */
  .display-1 { font-size: 6rem; }
  .display-2 { font-size: 5rem; }
  .display-3 { font-size: 4.5rem; }
  .display-4 { font-size: 3.5rem; }
  
  /* Dashboard XXL */
  .stats-number {
    font-size: 3rem;
  }
  
  /* Actions en 4 colonnes */
  .action-grid-xl .col-xl-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  /* Espacement généreux */
  .dashboard-container {
    padding: var(--spacing-large) 0;
  }
}

/* ========================================================================
   ULTRA WIDE (1400px+)
   ======================================================================== */

@media (min-width: 1400px) {
  .container-fluid {
    max-width: 1320px;
  }
  
  /* Layout ultra wide */
  .ultra-wide-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
  }
  
  /* Dashboard ultra wide */
  .stats-ultra-wide {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }
}

/* ========================================================================
   LANDSCAPE ORIENTATION (Mobile/Tablette)
   ======================================================================== */

@media (orientation: landscape) and (max-height: 600px) {
  /* Header compact en landscape */
  .header-officiel {
    position: static;
  }
  
  .user-info-panel {
    display: none;
  }
  
  /* Dashboard compact landscape */
  .dashboard-container {
    padding: 0.5rem 0;
  }
  
  /* Navigation horizontale */
  .nav-tabs-pnravec {
    padding: 0;
  }
  
  .nav-tabs-pnravec .nav-link {
    padding: 0.5rem 1rem;
  }
}

/* ========================================================================
   PRINT RESPONSIVE
   ======================================================================== */

@media print {
  /* Layout print optimisé */
  .container-fluid {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  
  /* Masquer éléments interactifs */
  .btn, 
  .navbar,
  .status-indicator,
  .user-info-panel,
  .footer-officiel {
    display: none !important;
  }
  
  /* Optimiser cartes pour print */
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
  }
  
  /* Typography print */
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
    page-break-after: avoid;
  }
  
  /* Tableaux print */
  table {
    width: 100%;
    border-collapse: collapse;
  }
  
  th, td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
  }
}

/* ========================================================================
   ACCESSIBILITÉ RESPONSIVE
   ======================================================================== */

/* Focus visible amélioré pour mobile */
@media (max-width: 767.98px) {
  *:focus-visible {
    outline: 3px solid var(--bleu-pnravec);
    outline-offset: 3px;
  }
}

/* Préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  .action-rapide-card,
  .stats-card,
  .btn {
    transition: none;
  }
  
  .action-rapide-card:hover,
  .stats-card:hover {
    transform: none;
  }
}

/* Contraste élevé responsive */
@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }
  
  .card {
    border-width: 2px;
  }
  
  .form-control {
    border-width: 2px;
  }
}

/* ========================================================================
   UTILITAIRES RESPONSIVE
   ======================================================================== */

/* Classes d'affichage responsive */
.show-mobile { display: block; }
.show-tablet { display: none; }
.show-desktop { display: none; }

@media (min-width: 576px) {
  .show-mobile { display: none; }
  .show-tablet { display: block; }
}

@media (min-width: 992px) {
  .show-tablet { display: none; }
  .show-desktop { display: block; }
}

/* Espacements responsive */
.p-responsive {
  padding: var(--spacing-mobile);
}

@media (min-width: 768px) {
  .p-responsive {
    padding: var(--spacing-tablet);
  }
}

@media (min-width: 992px) {
  .p-responsive {
    padding: var(--spacing-desktop);
  }
}

/* Typography responsive */
.text-responsive {
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .text-responsive {
    font-size: 1rem;
  }
}

@media (min-width: 992px) {
  .text-responsive {
    font-size: 1.1rem;
  }
}

/* Boutons responsive */
.btn-responsive {
  width: 100%;
  margin-bottom: 0.5rem;
}

@media (min-width: 576px) {
  .btn-responsive {
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
  }
}

/* Grid responsive pour actions */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .actions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================================================
   OPTIMISATIONS PERFORMANCE MOBILE
   ======================================================================== */

/* Optimisations GPU pour mobile */
@media (max-width: 767.98px) {
  .card,
  .btn,
  .navbar {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Scroll optimisé */
.scroll-smooth {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Images responsive */
.img-responsive {
  max-width: 100%;
  height: auto;
  display: block;
}

/*
 * FIN DES STYLES RESPONSIVE PN-RAVEC
 * © 2025 République de Guinée - Programme National de Recensement Administratif à Vocation d'État Civil
 */
>>>>>>> 8a40452a54786d937a51c56b89ecbba90934b4c8
