@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #f8f9fa;
    --accent-color: #0056b3;
}

/* General Styles */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    font-size: 1rem; /* Use relative font size */
}

/* Navigation */
.navbar {
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: white !important;
    padding: 1.5rem 1rem;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar .nav-link {
    color: #333 !important;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border-color: #333;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(51, 51, 51, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Cards */
.card {
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid var(--primary-color);
    background-color: transparent;
}

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

.card-title {
    color: var(--primary-color);
}

.card-img-top {
    height: auto; /* Allow images to scale dynamically */
    max-height: 200px; /* Set a maximum height for consistency */
    object-fit: cover;
}

/* Equipment Grid */
.equipment-item {
    margin-bottom: 2rem;
}

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

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

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.25);
}

/* Footer */
footer {
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-img-top {
        max-height: 150px; /* Reduce image height for smaller screens */
    }
    body {
        font-size: 0.85rem;
    }
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.2rem;
    }
    p, a, li {
        font-size: 0.9rem;
    }
    .hero-section {
        padding: 5vw 0; /* Reduce padding for smaller screens */
    }
    .homepage-container {
        padding: 0 2rem; /* Adjust padding for smaller screens */
    }
    .link-title {
        font-size: 1.2rem;
        padding: 10px 5px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Réduire le padding horizontal pour les éléments principaux */
    .container, 
    section, 
    header, 
    footer,
    .content-box,
    .card-body {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .card {
        padding: 15px;
    }
    
    /* Supprime le padding excessif des éléments avec des classes Bootstrap */
    .p-4, .px-4, .ps-4, .pe-4 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    h1, h2 {
        font-size: 1.5rem;
    }
    
    h3, h4, h5 {
        font-size: 1.2rem;
    }
    
    .py-4, .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .mb-4, .mb-5 {
        margin-bottom: 1rem !important;
    }
    
    .me-2 {
        margin-right: 0.5rem !important;
    }
    
    /* Réduire davantage la taille des textes sur mobile */
    p, a, li, .card-text, .lead {
        font-size: 0.85rem;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    h4, h5, h6 {
        font-size: 1.1rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .btn {
        font-size: 0.85rem;
    }

    .content-box {
        background-color: rgba(255, 255, 255, 0.4); /* Plus transparent que la version précédente */
        margin: 1rem;
        padding: 1rem !important;
    }
}

/* Improve form elements on mobile */
@media (max-width: 576px) {
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    body {
        font-size: 0.8rem;
    }
    
    /* Réduire davantage le padding horizontal pour les très petits écrans */
    .container, 
    section, 
    header, 
    footer,
    .content-box,
    .card-body {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .card {
        padding: 10px;
    }
    
    /* Supprime le padding excessif des éléments avec des classes Bootstrap */
    .p-4, .px-4, .ps-4, .pe-4 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    p, a, li, .card-text, .lead {
        font-size: 0.8rem;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    h3, h4, h5, h6 {
        font-size: 1.1rem;
    }
    
    .btn {
        font-size: 0.8rem;
    }
    
    .price-tag {
        font-size: 1rem;
    }
    
    footer h3 {
        font-size: 1.1rem;
    }
    
    .link-title {
        font-size: 1.1rem;
    }
}

/* Fix for navigation on small screens */
@media (max-width: 992px) {
    .navbar-brand img {
        width: 80px;
        height: 80px;
    }
    
    .navbar {
        padding: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Filter Section */
.filter-section {
    background-color: var(--secondary-color);
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* Price Display */
.price-tag {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Availability Badge */
.badge-available {
    background-color: #28a745;
    color: white;
}

.badge-unavailable {
    background-color: #dc3545;
    color: white;
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                    url("../img/base/intro.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
    padding: 10vw 0; /* Use relative units for padding */
    margin-bottom: 2rem;
}

.hero-content {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 2rem;
}

.hero-content .lead {
    font-style: italic;
}

.hero-content .icons-row {
    background-color: rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.resource-card {
    transition: transform 0.2s;
    background-color: #f8f9fa;
    height: 100%; /* Make cards equal height */
}
.resource-card:hover {
    transform: translateY(-5px);
}

.value-item {
    margin-bottom: 1rem;
}

.value-item i {
    color: #ffc107;
    margin-right: 0.5rem;
}

/* Centering Content */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Specific Pages */
.auth-container {
    max-width: 600px;
    margin: 0 auto;
}

.navbar-nav.ms-auto {
    margin-left: auto;
}

.homepage-background {
    background-image: url('../img/base/intro.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    width: 100%;
}

.content-text {
    color: #000000;
}

.link-title {
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 1rem;
    font-weight: bold;
    display: block;
    padding: 15px 10px;
}

.link-title:hover {
    color: var(--accent-color);
    text-decoration: underline;
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.btn-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.homepage-container {
    padding: 0 5%; /* Use percentage for better scaling */
}

strong {
    font-weight: bold;
}

/* Solution pour améliorer la lisibilité du texte sur fond sombre */
.content-box {
    background-color: rgba(255, 255, 255, 0.25); /* Encore plus transparent */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(2px); /* Effet de flou plus léger */
    -webkit-backdrop-filter: blur(2px);
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
}

/* Styles pour les liens de taille égale sur la page d'accueil */
.equal-height-links .content-link {
    min-height: 80px;  /* Hauteur minimale fixe */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-link {
    background-color: rgba(255, 255, 255, 0.35); /* Plus transparent */
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.content-link:hover {
    background-color: rgba(0, 102, 204, 0.5); /* Version semi-transparente de la couleur primaire */
    color: white !important;
    transform: scale(1.03);
}

