/**
 * Styles IMABE Core
 * Base sur le site IMABE avec les variables: --or-desature: #b89646, --gris-fond: #f1f1f1, --gris-cadre: #e9e9e9
 */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --or-desature: #b89646;
    --or-fonce: #a0843e;
    --gris-fond: #f1f1f1;
    --gris-cadre: #e9e9e9;
    --texte-sombre: #333333;
    --texte-clair: #555555;
    --blanc: #ffffff;
    --noir: #000000;
}

/* ============================================
   BASE ET TYPOGRAPHIE
   ============================================ */
body {
    background-color: var(--gris-fond);
    color: var(--texte-sombre);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--or-desature);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    color: var(--texte-clair);
}

a {
    color: var(--or-desature);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--or-fonce);
    text-decoration: none;
}

/* ============================================
   EN-TETE ET NAVIGATION
   ============================================ */
.navbar {
    background-color: var(--gris-cadre) !important;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
}

.navbar-brand img {
    height: 55px;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--or-desature) !important;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    transition: filter 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    filter: brightness(1.2);
}

.navbar-toggler {
    border-color: var(--or-desature);
}

.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(184, 150, 70, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Switch de langue */
.lang-switch {
    cursor: pointer;
    font-weight: bold;
    background-color: var(--or-desature);
    color: #ffffff !important;
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.lang-switch:hover {
    background-color: var(--or-fonce);
}

.lang-switch.active {
    background-color: var(--or-fonce);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* ============================================
   CAROUSEL
   ============================================ */
#heroCarousel {
    position: relative;
}

.carousel-item img {
    height: 500px;
    object-fit: cover;
}

.carousel-caption {
    color: #fff !important;
    background-color: rgba(0,0,0,0.7);
    border-radius: 8px;
    padding: 20px;
    bottom: 20%;
}

.carousel-caption h5 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.carousel-caption p {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

/* ============================================
   CARTES ET PROJETS
   ============================================ */
.card {
    border: 1px solid var(--or-desature);
    border-radius: 8px;
    transition: all 0.4s ease;
    background-color: var(--blanc);
    height: 100%;
}

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

.card .icon {
    font-size: 3rem;
    color: var(--or-desature);
    margin-bottom: 1rem;
}

.card-title {
    color: var(--or-desature);
    font-weight: 700;
}

/* Cartes projets */
.project-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: transparent;
    border: 1px solid var(--or-desature);
    border-radius: 8px;
    transition: all 0.3s ease;
    color: inherit;
}

.project-card:hover {
    background-color: var(--blanc);
    transform: translateY(-5px);
    color: inherit;
}

.project-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-right: 20px;
    background-color: var(--blanc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.project-logo img {
    max-width: 50px;
    max-height: 50px;
}

.project-details h5 {
    margin-bottom: 5px;
    color: var(--or-desature);
}

.project-details p {
    margin-bottom: 0;
    color: var(--texte-clair);
}

/* ============================================
   EQUIPE
   ============================================ */
.team-member {
    transition: transform 0.3s ease;
    padding: 20px;
}

.team-member:hover {
    transform: scale(1.05);
}

.team-member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--or-desature);
    margin-bottom: 15px;
}

.team-member h5 {
    margin-bottom: 5px;
}

.team-member p {
    color: var(--texte-clair);
    font-size: 0.9rem;
}

/* ============================================
   PARTENAIRES
   ============================================ */
.partner-item {
    background-color: var(--blanc);
    border: 1px solid var(--or-desature);
    border-radius: 10px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.partner-logo {
    max-height: 70px;
    width: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partner-item:hover .partner-logo {
    filter: grayscale(0%);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 80px 0;
}

section.bg-white {
    background-color: var(--blanc);
}

/* ============================================
   BOUTONS
   ============================================ */
.btn-primary {
    background-color: var(--or-desature);
    border-color: var(--or-desature);
    color: #fff;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--or-fonce);
    border-color: var(--or-fonce);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    color: var(--or-desature);
    border-color: var(--or-desature);
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 5px;
}

.btn-outline-primary:hover {
    background-color: var(--or-desature);
    border-color: var(--or-desature);
    color: #fff;
}

/* ============================================
   FORMULAIRES
   ============================================ */
.form-control {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--or-desature);
    box-shadow: 0 0 0 0.2rem rgba(184, 150, 70, 0.25);
    outline: none;
}

.form-label {
    color: var(--texte-sombre);
    font-weight: 500;
}

/* ============================================
   PIED DE PAGE
   ============================================ */
footer {
    background-color: var(--gris-cadre);
    border-top: 1px solid #ddd;
    padding: 40px 0;
}

footer p {
    margin-bottom: 0;
    color: var(--texte-clair);
}

footer a {
    color: var(--or-desature);
}

footer a:hover {
    color: var(--or-fonce);
}

/* ============================================
   UTILITAIRES
   ============================================ */
.text-primary {
    color: var(--or-desature) !important;
}

.bg-primary {
    background-color: var(--or-desature) !important;
}

.border-primary {
    border-color: var(--or-desature) !important;
}

/* Badge */
.badge.bg-warning {
    background-color: var(--or-desature) !important;
    color: #fff !important;
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .carousel-item img {
        height: 300px;
    }
    
    .carousel-caption {
        display: none !important;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .project-card {
        flex-direction: column;
        text-align: center;
    }
    
    .project-logo {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 40px;
    }
    
    .lang-switch {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}

/* ============================================
   ACCESSIBILITE
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--or-desature);
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible pour navigation clavier */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--or-desature);
    outline-offset: 2px;
}

/* ============================================
   WIDGETS
   ============================================ */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    color: var(--or-desature);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--or-desature);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gris-cadre);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--texte-clair);
}

.widget ul li a:hover {
    color: var(--or-desature);
}

/* ============================================
   PAGINATION ET NAVIGATION
   ============================================ */
.pagination .page-link {
    color: var(--or-desature);
    border-color: var(--or-desature);
}

.pagination .page-link:hover {
    background-color: var(--or-desature);
    border-color: var(--or-desature);
    color: #fff;
}

.pagination .page-item.active .page-link {
    background-color: var(--or-desature);
    border-color: var(--or-desature);
}

/* ============================================
   ALERTES ET MESSAGES
   ============================================ */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
