:root {
    --primary-color: #000000;
    --secondary-color: #fef2f2;
    --accent-color: #ff3b30;
    --success-color: #34c759;
    --text-color: #333333;
    --light-text: #8e8e93;
    --border-color: #e5e5ea;
    --bg-color: #ffffff;
    --card-bg: #f9f9f9;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    background-color: #212529 !important;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* Navbar styling */
.navbar {
    padding: 1rem 0;
    box-shadow: none;
    background-color: #000000 !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.navbar-dark {
    background-color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
}

/* Card styling - BeReal inspired */
.card {
    border: none;
    border-radius: 12px;
    background-color: #343a40;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: #2c3136;
    border-bottom: 1px solid #495057;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    justify-content: space-between;
        align-items: center;
        display: flex;
}

small {
    padding: 0.8rem;
}

/* BeReal-style post cards */
.post-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
}

.post-user {
    font-weight: 600;
    margin-left: 0.5rem;
}

.post-time {
    color: var(--light-text);
    font-size: 0.8rem;
}

.post-content {
    padding: 0;
}

.post-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 280px; /* Hauteur fixe pour toutes les images */
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 8px;
    position: relative;
    cursor: zoom-in;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-caption {
    padding: 1rem;
    font-size: 0.95rem;
}

.post-actions {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

/* Button styling */
.btn {
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: white
}

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

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

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #2eb350;
    border-color: #2eb350;
}

.btn-danger {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-danger:hover {
    background-color: #e12d22;
    border-color: #e12d22;
}

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

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

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #2c3136;
    margin: 1rem 0;
}

.progress-bar {
    background-color: var(--success-color);
    border-radius: 4px;
}

.timeline-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #343a40;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.timeline-date {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #adb5bd;
}

.timeline-content {
    padding: 0;
}

.timeline-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.timeline-caption {
    padding: 1rem;
}

.timeline-actions {
    padding: 0.75rem 1rem;
}

/* BeReal badge */
.realtime-badge {
    display: inline-block;
    background-color: var(--success-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.late-badge {
    background-color: var(--accent-color);
}

/* Forms styling */
.form-control {
    border-radius: 8px;
    border: 1px solid #495057;
    padding: 0.75rem 1rem;
    background-color: #2c3136;
    color: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    background-color: #2c3136;
    color: #fff;
}

/* Circle progress indicator for goals */
.goal-progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.goal-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1.5rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
  
    .navbar {
        padding-top: calc(0.5rem + env(safe-area-inset-top));
    }
  
    .card-body {
        padding: 1.25rem;
    }
  
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
  
    .btn {
        padding: 0.4rem 1.2rem;
    }
  
    .camera-btn {
        bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .titre-details-buttons {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .titre-details-buttons h2 {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
}

/* Camera button - BeReal style */
.camera-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.2s ease;
}

.camera-btn:hover {
    transform: scale(1.1);
}

.camera-btn i {
    font-size: 1.5rem;
}

/* Profile styles */
.profile-header {
    text-align: center;
    padding: 2rem 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.profile-name {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.profile-bio {
    color: var(--light-text);
    max-width: 300px;
    margin: 0 auto;
}

/* Alert style fixes */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: rgba(52, 199, 89, 0.2);
    color: #136d34;
}

.alert-danger {
    background-color: rgba(255, 59, 48, 0.2);
    color: #9e241c;
}

/* Custom container padding for mobile */
@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Styles pour l'application mobile */
.capacitor-environment .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.capacitor-environment .camera-btn {
    bottom: 1.5rem;
}

/* Ajustements spécifiques pour timeline */
.timeline-item .post-image {
    border-radius: 0;
    margin: 0;
}

.text-muted {
    min-height: 3.5rem;
    display: inline-flex;
    color: #adb5bd !important;
}

/* Styles pour la modale d'image simple */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #212529;
    cursor: pointer;
}

.modal-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-image-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

/* Style pour indiquer que les images sont cliquables */
.post-image {
    cursor: pointer;
    position: relative;
}

.titre-details-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 1.5rem;
}

/* Adaptation des textes */
h1, h2, h3, h4, h5, h6 {
    color: #fff;
}

p, span, div {
    color: #f8f9fa; /* Blanc légèrement atténué pour le texte normal */
}

/* Adaptation des éléments spécifiques */
.card {
    background-color: #343a40;
    border-color: #495057;
}

.card-header {
    background-color: #2c3136;
    border-color: #495057;
}

.list-group-item {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

.table {
    color: #f8f9fa;
}

.table thead th {
    border-bottom-color: #495057;
}

.table td, .table th {
    border-top-color: #495057;
}

.modal-content {
    background-color: #343a40;
    border-color: #495057;
}

.modal-header, .modal-footer {
    border-color: #495057;
}

/* Adaptation des textes gris */
.text-secondary {
    color: #adb5bd !important;
}

/* Bordures et séparateurs */
.border, .border-top, .border-bottom, .border-left, .border-right {
    border-color: #495057 !important;
}

/* Placeholders des formulaires */
.form-control::placeholder {
    color: #6c757d;
}

/* Adaptation des alertes et autres éléments Bootstrap */
.alert-info {
    background-color: #17a2b8;
    color: #fff;
    border-color: #148a9c;
}

.alert-success {
    background-color: #28a745;
    color: #fff;
    border-color: #1e7e34;
}

.alert-warning {
    background-color: #ffc107;
    color: #212529;
    border-color: #d39e00;
}

.alert-danger {
    background-color: #dc3545;
    color: #fff;
    border-color: #bd2130;
}

/* Ajustement des liens */
a {
    color: #6dbbff;
}

a:hover {
    color: #a8d5ff;
}

/* Boutons avec couleur de fond transparent */
.btn-outline-dark {
    color: #f8f9fa !important;
    border-color: #6c757d !important;
}

.btn-outline-dark:hover {
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Timeline spécifique à votre application */
.timeline-item {
    background-color: #343a40;
    border-color: #495057;
}

.timeline-date {
    color: #adb5bd;
}

/* Adaptation de la modale d'image */
.image-modal {
    background-color: #212529; /* Même couleur que le fond principal */
}

/* Uniformisation des couleurs de fond avec la navbar */
body {
  background-color: #000000 !important; /* Couleur standard de la navbar Bootstrap */
}

/* Ajustement spécifique pour le fond principal */
.container, .container-fluid, main, .content-wrapper {
  background-color: #000000 !important;
}

/* Couleur des cartes et éléments pour correspondre au fond */
.card, .list-group-item, .modal-content, .dropdown-menu {
  background-color: #2c3034 !important; /* Légèrement plus clair pour la distinction */
  border-color: #373b3e !important;
}

/* Couleur pour le card-header même ton que navbar */
.card-header {
  background-color: #212529 !important;
  border-color: #373b3e !important;
}

/* Pour les timeline cards et autres éléments personnalisés */
.timeline-item {
  background-color: #2c3034 !important;
}

/* Pour les couleurs de texte */
body, p, div, span, h1, h2, h3, h4, h5, h6 {
  color: #f8f9fa !important;
}

.text-muted {
  color: #adb5bd !important;
}

/* Grille d'affichage des objectifs */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.objective-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.progress-circle-container {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 10px;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #2b2f33;
    border: 3px solid #ffffff; /* Cercle blanc épais */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.progress-bar-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: #4CAF50; /* Couleur de la progression */
    box-sizing: border-box;
    transform: rotate(0deg);
}

.progress-value {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    z-index: 2;
}

.objective-title {
    font-size: 12px;
    color: #adb5bd;
    margin: 5px 0 0;
    text-align: center;
}

.add-objective-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2b2f33;
    border: 2px dashed #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.add-objective-circle:hover {
    background: #3a3f45;
    text-decoration: none;
}

.add-icon {
    font-size: 32px;
    color: #6c757d;
}

/* Styles pour l'assiduité (streak) */
.streak-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #ff7700;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    margin-left: 8px;
    font-size: 0.9rem;
}

.streak-badge i {
    margin-right: 4px;
    color: #ffcc00;
}

.streak-flame {
    color: #ff7700;
    margin-right: 5px;
}

.streak-flame-container {
    display: inline-flex;
    align-items: center;
    margin: 5px 0 0 10px;
}

.streak-count {
    font-size: 0.8rem;
    font-weight: bold;
    color: #ff7700;
}

.objective-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styles pour la barre de progression temporelle */
.time-progress-container {
    margin-top: 0.5rem;
}

.progress {
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    transition: width 0.6s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background-color: rgba(255,255,255,0.3);
    border-radius: 0 4px 4px 0;
}

.search-form {
    position: relative;
    margin-left: 15px;
}

.search-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    padding-right: 40px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 180px;
}

.search-input:focus {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    color: white;
    width: 220px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    font-size: 0.9rem;
}

.search-button:hover {
    color: white;
}

.leitmotiv-content {
    background-color: #000000;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #34c759;
    margin-bottom: 10px;
}

.leitmotiv-content blockquote {
    margin-bottom: 0;
    font-style: italic;
}

.video-preview {
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    background-color: #000;
}

.profile-photo-search {
    width: -webkit-fill-available;
    border-radius: 3rem;
    height: -webkit-fill-available;
    object-fit: cover;
}

.social-counts {
    margin-top: 0.5rem;
}

.social-counts a {
    transition: color 0.2s ease;
}

.social-counts a:hover {
    color: #4CAF50 !important;
}

.btn-follow {
    background-color: #4CAF50;
    color: white;
    border: none;
    transition: background-color 0.3s ease;
}

.btn-follow:hover {
    background-color: #5dac60;
    color: white;
}

.btn-unfollow {
    background-color: #6c757d;
    color: white;
    border: none;
    transition: background-color 0.3s ease;
}

.btn-unfollow:hover {
    background-color: #5a6268;
    color: white;
}

/* Feed d'activité - Styles améliorés */
.timeline {
    margin-bottom: 20px;
}

.timeline-item {
    background-color: #343a40;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.timeline-user-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    margin-bottom: 10px;
}

.timeline-user-avatar {
    display: inline-block;
}

.profile-avatar-initials {
    width: 100%;
    height: 100%;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
}

.timeline-date {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #adb5bd;
}

.timeline-caption {
    margin-bottom: 15px;
    color: #fff;
}

.post-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.video-preview {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}

.realtime-badge {
    display: inline-block;
    background-color: #34c759;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.leitmotiv-content blockquote {
    font-style: italic;
    color: #ddd;
    border-left: 3px solid #34c759;
    padding-left: 15px;
    margin-left: 0;
}

.timeline-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
}

/* Feed d'activité - Styles supplémentaires */
.timeline-user-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    margin-bottom: 10px;
}

.timeline-user-avatar {
    display: inline-block;
}

/* Styles spécifiques pour les utilisateurs suggérés dans le feed */
.suggested-user-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.suggested-user-item:hover {
    background-color: #3a3f44;
}

.suggested-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0.75rem;
}

.suggested-user-info {
    flex-grow: 1;
}

.suggested-user-name {
    font-weight: 600;
    margin-bottom: 0.1rem;
    font-size: 0.9rem;
}

.suggested-user-meta {
    font-size: 0.8rem;
    color: #adb5bd;
}

/* Animation coeur de like */
.liked-animation {
    animation: heartBeat 0.3s;
}

.notification-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin-bottom: 8px;
    border-radius: 8px;
    background-color: #1a1a1a;
}
    
.notification-item:hover {
    border-left-color: #00a8e8;
    background-color: #212121;
}
    
.notification-content {
    line-height: 1.4;
}
    
.notification-post-preview {
    padding: 8px 0 0 0;
    font-style: italic;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background-color: #ff3b30;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Styles pour les notifications */
.notifications-container {
    display: flex;
    flex-direction: column;
}

.notification-card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-avatar {
    margin-right: 15px;
    flex-shrink: 0;
}

.notification-avatar img, 
.notification-avatar .profile-avatar-initials {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #343a40;
    color: #fff;
    font-size: 18px;
}

.notification-content {
    flex-grow: 1;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.notification-user {
    font-weight: 600;
    color: #f8f9fa;
    text-decoration: none;
}

.notification-user:hover {
    text-decoration: underline;
    color: #f8f9fa;
}

.notification-goal {
    color: #00a8e8;
    font-weight: 500;
    text-decoration: none;
}

.notification-goal:hover {
    text-decoration: underline;
}

.notification-message {
    color: #adb5bd;
    font-size: 0.9rem;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
}

.notification-time {
    font-size: 0.8rem;
    white-space: nowrap;
    color: #6c757d;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background-color: #ff3b30;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

@media (max-width: 576px) {
    .notification-avatar img, 
    .notification-avatar .profile-avatar-initials {
        width: 40px;
        height: 40px;
    }
    
    .notification-content {
        font-size: 0.9rem;
    }
    
    .notification-time {
        font-size: 0.75rem;
    }
}

/* Conteneur d'authentification noir */
.auth-container {
    background-color: #000000;
    color: white;
    padding: 2rem;
    border-radius: 8px;
}

/* Entrée de formulaire sans bordure sur fond sombre */
.auth-input {
    background-color: #212529;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
}

.auth-input:focus {
    background-color: #343a40;
    color: white;
    box-shadow: none;
}

/* Page d'authentification complète */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}