:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #414848;
    --text-color: #ffffff;
    --accent-color: #e74c3c;
    --card-background: #2d2d2d;
    --highlight-color: #ecf0f1;
}

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

/* Ajouter au début de votre fichier competences.css ou dans un fichier global */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* viewport height */
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

main {
    flex: 1 0 auto; /* Cette propriété est cruciale - elle permet au contenu de s'étendre */
}

footer {
    flex-shrink: 0; /* Empêche le footer de rétrécir */
}

.btn-pdf {
    background-color: #27ae60;
    color: #fff !important;
    text-decoration: none !important;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    display: inline-block;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.3s, opacity 0.3s;
    box-shadow: 0 2px 8px rgba(39,174,96,0.10);
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn-pdf:hover {
    background-color: #219150;
    opacity: 0.85;
    text-decoration: none !important;
}

/* Competences grid */
.competences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: row;
    grid-auto-rows: min-content; 
}

.competence-item {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Hauteur fixe avant dépliage */
    height: 145px;
    display: flex;
    flex-direction: column;
    align-self: start;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.competence-item.active {
    height: auto;
    min-height: 100px;
}

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

.competence-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    position: relative;
    height: 100%;
}

.competence-header i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.competence-header h4 {
    font-size: 1.1rem;
    color: var(--highlight-color);
    flex-grow: 1;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* Competence content - initially hidden */
/* Adjust the content expansion */
.competence-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
}

.competence-item.active .competence-content {
    max-height: 1500px;
    opacity: 1;
}

.competence-details {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--secondary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.competence-details h5 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.project-link span {
    color: var(--secondary-color);
    margin-top: 1rem;
    padding-top: 0.5rem;
    font-size: 0.9rem;
}

.project-link a {
    color: var(--secondary-color);
    text-decoration: none;  
}

.project-link a:hover {
    color: #1676b6;
}

/* Compétences Page Styles */
.competences-container {
    padding: 120px 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--background-color);
}

.competences-container h1 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.competences-section {
    margin-bottom: 4rem;
}

.competences-section h2 {
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    color: var(--text-color);
}

/* Animation for chevron icon */
.competence-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .competences-container {
        padding: 100px 1rem 1rem;
    }
    
    .competences-grid {
        grid-template-columns: 1fr;
    }
    
    .competences-container h1 {
        font-size: 2rem;
    }
    
    .competences-section h2 {
        font-size: 1.5rem;
    }

    .competence-header {
        flex-wrap: wrap;
    }
}
/* Style révisé pour les compétences avec espacement et alignement optimisés */
.competence-content > ul > li {
    position: relative;
    padding: 0.5rem 1rem 0.5rem 2.5rem; 
    margin-bottom: 0.5rem;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    list-style-type: none;
}
  
.competence-content > ul > li:hover {
    transform: translateX(5px);
    background: rgba(52, 152, 219, 0.15);
}
  
/* Style pour le texte en gras - compactage vertical */
.competence-content > ul > li strong {
    color: var(--highlight-color);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3; 
}
  
/* Ajout explicite des icônes avec classe supplémentaire */
.competence-content > ul > li::before {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    position: absolute;
    left: 0.75rem;
    color: var(--secondary-color);
    font-size: 1rem;
}
  
/* Assignation standard d'icônes pour les compétences qui n'ont pas de spécifications */
.competence-content > ul > li:nth-child(1)::before {
    content: "\f00c"; 
}
  
.competence-content > ul > li:nth-child(2)::before {
    content: "\f00c"; 
}
  
.competence-content > ul > li:nth-child(3)::before {
    content: "\f00c";
}
  
.competence-content > ul > li:nth-child(4)::before {
    content: "\f00c"; 
}
  
.competence-content > ul > li:nth-child(5)::before {
    content: "\f00c"; 
}
  
.competence-content > ul > li:nth-child(6)::before {
    content: "\f00c"; 
}
  
/* Classe spécifique pour les compétences service informatique */
.service-informatique > ul > li:nth-child(1)::before {
    content: "\f468" !important; 
}
  
.service-informatique > ul > li:nth-child(2)::before {
    content: "\f382" !important; 
}
  
.service-informatique > ul > li:nth-child(3)::before {
    content: "\f4fc" !important; 
}
  
/* Classe spécifique pour les compétences patrimoine informatique */
.patrimoine > ul > li:nth-child(1)::before {
    content: "\f0ae" !important; 
}
  
.patrimoine > ul > li:nth-child(2)::before {
    content: "\f02d" !important; 
}
  
.patrimoine > ul > li:nth-child(3)::before {
    content: "\f084" !important; 
}
  
.patrimoine > ul > li:nth-child(4)::before {
    content: "\f021" !important; 
}
  
.patrimoine > ul > li:nth-child(5)::before {
    content: "\f0c7" !important; 
}
  
.patrimoine > ul > li:nth-child(6)::before {
    content: "\f5ae" !important; 
}
  
/* Animation subtile au survol - plus légère */
.competence-content > ul > li:hover::before {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}
  
/* Correction des problèmes d'animation qui prendraient trop de place */
@keyframes pulse-light {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.2); }
    70% { box-shadow: 0 0 0 4px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
  
.competence-content > ul > li:hover {
    animation: pulse-light 1.5s infinite;
}