/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Conteneur */
.conteneur {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* En-tête et Navigation */
.en-tete {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.marque-navigation h1 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.menu-navigation {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.menu-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.menu-navigation a:hover {
    color: #3498db;
}

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

.arriere-plan-clair {
    background-color: #f8f9fa;
}

.titre-section {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* Section Hero */
.hero {
    background-color: #ffffff;
    border-bottom: 3px solid #f8f9fa;
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.sous-titre-hero {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.description-hero {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.description-hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.boutons-hero {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons */
.bouton {
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.bouton-principal {
    background-color: #3498db;
    color: white;
}

.bouton-principal:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.bouton-secondaire {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.bouton-secondaire:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* Grilles de compétences */
.grille-competences {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.carte-competence {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

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

.carte-competence h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.carte-competence p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
}

.liste-competences {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.competence {
    background-color: #ecf0f1;
    color: #2c3e50;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Numéros de compétences */
.numero-competence {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

/* Liens vers les compétences PDF */
.lien-competence {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.lien-bouton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.lien-bouton:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Projets - Tableau des compétences */
.tableau-projets {
    overflow-x: auto;
    margin-top: 2rem;
}

.tableau-competences-projets {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tableau-competences-projets th,
.tableau-competences-projets td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
}

.tableau-competences-projets th {
    background-color: #3498db;
    color: white;
    font-weight: 600;
}

.en-tete-projet {
    background-color: #2c3e50 !important;
    text-align: left;
    min-width: 250px;
}

.en-tete-competence {
    min-width: 70px;
}

.en-tete-competence small {
    font-size: 0.8rem;
    font-weight: normal;
    opacity: 0.9;
}

.nom-projet {
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    background-color: #f8f9fa;
}

.cellule-competence {
    font-size: 1.2rem;
    font-weight: bold;
}

.tableau-competences-projets tbody tr:hover {
    background-color: #f8f9fa;
}

.tableau-competences-projets tbody tr:hover .nom-projet {
    background-color: #e9ecef;
}

/* Formation */
.contenu-formation {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.element-formation {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.element-formation h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.lieu-formation {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.periode-formation {
    color: #666;
    margin-bottom: 1rem;
}

.details-formation {
    list-style-position: inside;
    color: #666;
}

.details-formation li {
    margin-bottom: 0.5rem;
}

/* Contact simplifié */
.contact-content-simple {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item-large {
    background: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-item-large:hover {
    transform: translateY(-5px);
}

.contact-item-large h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-item-large p {
    font-size: 1.1rem;
}

.contact-item-large a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.contact-item-large a:hover {
    text-decoration: underline;
}

/* Styles pour les pages de compétences détaillées */
.competence-description {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.sae-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.sae-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sae-header {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.sae-header h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.sae-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sae-content {
    padding: 1.5rem;
}

.sae-content h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.validation-list {
    list-style: none;
    padding: 0;
}

.validation-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    line-height: 1.6;
}

.validation-list li:last-child {
    border-bottom: none;
}

.validation-list li strong {
    color: #3498db;
    font-weight: 600;
}

.no-files {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f8f9fa;
}

/* Styles pour les liens de projets */
.lien-projet {
    display: inline-block;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.lien-projet:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.lien-projet:active {
    transform: translateY(0);
}

/* État désactivé pour les liens de projets */
.lien-projet-desactiver {
    display: inline-block;
    padding: 8px 12px;
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    color: #7f8c8d;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(189, 195, 199, 0.3);
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ajustement du tableau pour la nouvelle colonne */
.tableau-projets th:last-child,
.tableau-projets td:last-child {
    text-align: center;
    width: 80px;
    min-width: 80px;
}

/* Responsive pour les liens de projets */
@media (max-width: 768px) {
    .navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .titre-section {
        font-size: 2rem;
    }
    
    .grille-competences {
        grid-template-columns: 1fr;
    }
    
    .contenu-contact-simple {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .boutons-hero {
        flex-direction: column;
        align-items: center;
    }
    
    .tableau-competences-projets {
        font-size: 0.9rem;
    }
    
    .tableau-competences-projets th,
    .tableau-competences-projets td {
        padding: 0.5rem;
    }
    
    .en-tete-projet {
        min-width: 200px;
    }
    
    .en-tete-competence {
        min-width: 55px;
    }
    
    .boutons-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .fichiers-sae {
        flex-direction: column;
    }
    
    .description-competence {
        padding: 1.5rem;
    }
    
    .en-tete-sae, .contenu-sae {
        padding: 1rem;
    }
    
    .lien-projet {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    .tableau-projets th:last-child,
    .tableau-projets td:last-child {
        width: 60px;
        min-width: 60px;
    }
}

/* Footer */
.pied-de-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.pied-de-page p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Scroll smooth */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    .header,
    .footer {
        display: none;
    }
    
    .section {
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Styles pour les exemples de validation dans les pages de compétences */
.validation-examples {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 1.5rem;
    border-left: 4px solid #667eea;
}

.validation-examples h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-examples h5::before {
    content: "✅";
    font-size: 1.2rem;
}

.example-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.example-project-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.example-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.example-details {
    background: #f1f3f4;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.example-details strong {
    color: #2c3e50;
}

.example-details ul {
    margin: 0.5rem 0 0 1rem;
    color: #555;
}

.example-details li {
    margin-bottom: 0.3rem;
}

/* Galerie d'images pour les exemples */
.example-images {
    margin-top: 1.5rem;
}

.example-images h6 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-images h6::before {
    content: "📸";
}

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

.image-placeholder {
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 15px 15px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
    background-color: #e9ecef;
    border-radius: 8px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    border: 2px dashed #ced4da;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: #667eea;
    background-color: #f0f3ff;
}

.image-placeholder .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.image-placeholder .text {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.image-placeholder .subtext {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Style pour les images réelles quand elles seront ajoutées */
.example-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease;
}

.example-image:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

/* Style pour les galeries d'images de projets */
.code-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.code-gallery img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Style pour photo de profil */
.photo-profil {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin: 0 auto 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.photo-profil:hover {
    transform: scale(1.05);
}

/* Placeholder pour photo de profil */
.profile-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e2e8f0 100%);
    border: 3px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transition: all 0.3s ease;
}

.profile-placeholder:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.profile-placeholder-icon {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 0.5rem;
}

.profile-placeholder-text {
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.2;
}

.profile-placeholder-text small {
    font-size: 0.7rem;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .profile-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .profile-placeholder-icon {
        font-size: 2.5rem;
    }
    
    .profile-placeholder-text {
        font-size: 0.7rem;
    }
}

/* =========================
   SCROLL TO TOP BUTTON
   ========================= */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* =========================
   AMÉLIORATIONS ANIMATIONS
   ========================= */

/* Animation d'entrée pour les cartes */
.carte-competence,
.element-formation,
.element-contact-large {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Effet hover amélioré pour les cartes compétences */
.carte-competence:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Animation pour les liens "Voir le détail" */
.lien-bouton {
    position: relative;
    overflow: hidden;
}

.lien-bouton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.lien-bouton:hover::before {
    left: 100%;
}

/* Animation pour les numéros de compétences */
.numero-competence {
    transition: all 0.3s ease;
}

.carte-competence:hover .numero-competence {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Amélioration du responsive pour le bouton scroll */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}