/**
 * Bundle Base — Fondation CSS chargée sur TOUTES les pages
 * Sources : browser-compatibility.css + main.css + avatar-normalization.css
 * Sprint 4 — Consolidation CSS — 4 mars 2026
 */

/* ============================================================
 * SOURCE: browser-compatibility.css
 * ============================================================ */
/* browser-compatibility.css
 * Fichier dédié à la compatibilité entre navigateurs
 * Inclut des resets CSS et préfixes vendeurs pour assurer un rendu cohérent
 */

/* === Accessibilité : Skip Navigation === */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: #1a56db;
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.15s ease;
}
.skip-nav:focus {
  top: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Reset CSS */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Flexbox avec préfixes vendeurs */
.flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.flex-column {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.flex-row {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.flex-wrap {
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.flex-nowrap {
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
}

.justify-content-center {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.justify-content-start {
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
}

.justify-content-end {
  -webkit-box-pack: end;
  -ms-flex-pack: end;
  justify-content: flex-end;
}

.justify-content-between {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.align-items-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.align-items-start {
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
}

.align-items-end {
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
}

/* Transitions et animations */
.transition {
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

/* Transformations */
.transform-center {
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

/* Ombres */
.box-shadow {
  -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Coins arrondis */
.rounded {
  -webkit-border-radius: 4px;
  border-radius: 4px;
}

/* Corrections spécifiques pour les navigateurs */

/* Correction pour Firefox */
@-moz-document url-prefix() {
  select {
    text-indent: 0.01px;
    text-overflow: '';
    padding-right: 25px;
  }
}

/* Correction pour IE */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .flex {
    display: flex;
  }
  
  img {
    max-width: 100%;
  }
}

/* Correction pour Safari */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    .safari-fix {
      -webkit-appearance: none;
      appearance: none;
      margin: 0;
    }
  }
}

/* Correction pour le carrousel */
.carousel-container {
  -webkit-overflow-scrolling: touch;
}

.carousel-track {
  will-change: transform;
}

/* ============================================================
 * SOURCE: main.css
 * ============================================================ */
:root {
    --primary-color: #2C3E50;
    --secondary-color: #3498DB;
    --accent-color: #E74C3C;
    --text-color: #333;
    --light-bg: #F8F9FA;
    --border-radius: 8px;
    --spacing: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 150px; /* Espace pour la navbar fixe */
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 0;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.hero-section {
    text-align: center;
    padding: 4rem 0;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-login {
    border: 2px solid white;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Styles pour les publicités dans le feed */
.ad-banner {
    border-left: 4px solid #007bff !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.15) !important;
}

.ad-banner .card-body {
    position: relative;
}

.ad-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-top: 20px solid #007bff;
}

.ad-banner .btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    transition: all 0.3s ease;
}

.ad-banner .btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.ad-banner .card-img-top {
    border-radius: 0.375rem 0.375rem 0 0;
    max-height: 250px;
    object-fit: cover;
    width: 100%;
}

.ad-banner .badge {
    font-size: 0.7rem;
}


/* Fix pour éviter le chevauchement avec la navbar fixe */
.main-content {
    padding-top: 150px !important;
}

/* Styles pour le contenu des publications */
.publication-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.publication-content p {
    margin-bottom: 10px;
}

.publication-content p:last-child {
    margin-bottom: 0;
}

.publication-content img, .publication-content video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 10px 0;
}

.publication-content .editor-media-container {
    margin: 15px 0;
    display: block;
}

.publication-content .align-left {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
    max-width: 50%;
}

.publication-content .align-right {
    float: right;
    margin-left: 15px;
    margin-bottom: 10px;
    max-width: 50%;
}

.publication-content .align-center {
    display: block;
    margin: 15px auto;
    text-align: center;
}

.publication-content strong {
    font-weight: 600;
}

.publication-content em {
    font-style: italic;
}

.publication-content u {
    text-decoration: underline;
}

/* Masquer les contrôles d'édition dans l'affichage final */
.publication-content .media-controls {
    display: none !important;
}

/* Styles pour les boutons de l'éditeur */
.btn-group .btn {
    border-radius: 6px !important;
    margin-right: 2px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Animation pour le bouton de sauvegarde */
.btn.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Responsive pour les boutons */
@media (max-width: 768px) {
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-group .btn {
        flex: 1;
        margin-right: 0;
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Service Sections */
.service-section {
    padding: 4rem 0;
}

.service-section:nth-child(even) {
    background-color: var(--light-bg);
}

.service-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-card ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-card ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0;
}

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

.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-col a:hover {
    opacity: 1;
}

/* Footer App — pages connectées (dégradé couleur par rôle) */
.app-footer {
    background: linear-gradient(to right, var(--footer-color, #7c3aed) 0%, #ffffff 100%);
    color: white;
    padding: 2.5rem 0 0;
    margin-top: auto;
}
.app-footer.has-bg-image {
    background: linear-gradient(to right, var(--footer-color, #7c3aed) 0%, rgba(255,255,255,0.85) 100%),
                var(--footer-bg-image) center / cover no-repeat;
}
.app-footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.app-footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}
.app-footer-links li {
    margin-bottom: 0.35rem;
}
.app-footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.app-footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}
.app-footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.app-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.app-footer-social a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}
.app-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 1.5rem;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.app-footer-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}
.app-footer-bottom a:hover {
    color: #fff;
}
@media (max-width: 768px) {
    .app-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.service-section:nth-child(1) .service-card { animation-delay: 0.1s; }
.service-section:nth-child(2) .service-card { animation-delay: 0.2s; }
.service-section:nth-child(3) .service-card { animation-delay: 0.3s; }
.service-section:nth-child(4) .service-card { animation-delay: 0.4s; }

/* ============================================================
 * SOURCE: avatar-normalization.css
 * ============================================================ */
/**
 * Nom du fichier : avatar-normalization.css
 * Description    : Normalisation des photos utilisateurs (cercles parfaits)
 * Auteur         : Renaldo Galofaro
 * Note           : Extrait de bulma-bootstrap-fix.css lors de la migration Bulma → Bootstrap 5
 */

/* ============================================
   NORMALISATION DES PHOTOS UTILISATEURS
   ============================================ */

/* Photos de profil standardisées à 80x80px - CERCLES PARFAITS */
.profile-avatar,
.user-avatar,
.rounded-circle[width="80"],
img[width="80"][height="80"] {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    border: 2px solid #e9ecef !important;
    transition: all 0.3s ease !important;
    display: block !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

.profile-avatar:hover,
.user-avatar:hover,
.rounded-circle[width="80"]:hover,
img[width="80"][height="80"]:hover {
    border-color: #007bff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3) !important;
}

/* Conteneur pour les suggestions de relations - CERCLES PARFAITS */
.card .rounded-circle {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 2px solid #e9ecef !important;
    margin: 0 auto !important;
    display: block !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Photos dans les listes d'utilisateurs - CERCLES PARFAITS */
.user-list-item img,
.connection-item img,
.suggestion-item img {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    border: 2px solid #e9ecef !important;
    display: block !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Photos plus petites (40px) pour les éléments compacts - CERCLES PARFAITS */
.avatar-sm,
.user-avatar-sm {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    border: 1px solid #e9ecef !important;
    display: block !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Photos moyennes (60px) - CERCLES PARFAITS */
.avatar-md,
.user-avatar-md {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    border: 2px solid #e9ecef !important;
    display: block !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Photos grandes (120px) pour les profils détaillés - CERCLES PARFAITS */
.avatar-lg,
.user-avatar-lg {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    border: 3px solid #e9ecef !important;
    display: block !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Correction spécifique pour les cartes de suggestions - CERCLES PARFAITS */
.card.shadow-sm img.rounded-circle {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 auto 15px auto !important;
    display: block !important;
    border: 2px solid #e9ecef !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Placeholder pour les images manquantes - CERCLE PARFAIT */
.avatar-placeholder {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 24px !important;
    font-weight: bold !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* ============================================
   RÈGLE UNIVERSELLE POUR CERCLES PARFAITS
   ============================================ */

/* Règle ultra-spécifique pour FORCER les cercles parfaits */
img.rounded-circle,
.rounded-circle img,
[class*="avatar"] img,
img[class*="avatar"],
.card img.rounded-circle,
.suggestion-item img,
.user-list img,
.profile img {
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Forcer la géométrie carrée pour tous les avatars */
img[width="80"][height="80"],
img.rounded-circle[width="80"],
.card .rounded-circle {
    clip-path: circle(40px at center) !important;
    border-radius: 50% !important;
}
