/*1. RÈGLES GÉNÉRALES  */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4; 
    color: #333; 
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

/* 2. EN-TÊTE ET TITRE */
header {
    background-color: #2c3e50; 
    color: white;
    padding: 20px 0;
    border-bottom: 5px solid #3498db; 
}

h1 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0 16px;
}

/*   3. MENU DE NAVIGATION */
nav ul {
    list-style-type: none; 
    padding: 0;
    margin: 20px 16px 0;
    display: flex; 
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    padding: 5px 15px;
    transition: all 0.3s ease-in-out;
}

a {
    transition: all 0.3s ease-in-out;
}

/* Effet au survol */
nav a:hover, .onglet-actif {
    background-color: #3498db;
    border-radius: 5px;
}

/* 4. STRUCTURE PRINCIPALE */
article {
    background-color: white;
    width: calc(100% - 32px);
    max-width: 800px;
    margin: 40px auto; 
    padding: 40px;
    border-radius: 10px; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1); 
}


.bloc-contenu h3, .bloc-competence h3 {
    color: #2c3e50;
    border-left: 4px solid #3498db; /* Petite barre bleue décorative */
    padding-left: 10px;
    text-align: left;
}

/*5. PAGE ACCUEIL & QUI SUIS-JE*/
.photodemoi {
    display: block;
    margin: 0 auto 20px auto; 
    width: 200px;
    height: 200px;
    object-fit: cover; 
    object-position: top center; 
    border-radius: 50%; 
    border: 5px solid #2c3e50;
}

/* Citation  */
.citation {
    font-style: italic;
    color: #555;
    font-size: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
    display: inline-block;
    padding-left: 10px;
    max-width: 100%;
}

.presentation-bloc span {
    display: block;
    margin: 0;
}

.ligne-bonjour {
    font-weight: bold;
    font-size: 24px;
    color: #2c3e50;
    text-transform: uppercase;
    margin: 20px 0;
}

.ligne-nom {
    font-size: 28px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 15px;
}

.ligne-statut {
    font-style: italic;
    font-size: 18px;
    color: #333;
    margin-top: 5px;
}

.description-site {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee; 
}

.conteneur-badges {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.badge-qualite {
    background-color: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 20px; 
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 6. PAGE PROJETS & COMPÉTENCES
*/
.carte-projet {
    background-color: #f9f9f9;
    border-left: 5px solid #3498db;
    padding: 20px;
    text-align: left;
    margin-bottom: 30px;
    overflow-wrap: anywhere;
}

.carte-projet h3 {
    margin-top: 0;
    color: #3498db;
}

.bloc-competence {
    text-align: left;
    margin-bottom: 30px;
}

.lien-detail {
    color: #3498db;
    font-size: 0.9em;
    text-decoration: none;
    margin-left: 5px;
}
.lien-detail:hover { text-decoration: underline; }

/*  7. PAGE TRACKER SOLAIRE (Technique) */

.lien-retour {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
}
.lien-retour:hover { color: #3498db; }
.media-video {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    border: 2px solid #2c3e50;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.image-large {
    width: 100%;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #ddd;
}

/* Code Arduino */
.conteneur-code {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-top: 15px;
}

.colonne-code {
    flex: 1;
    min-width: 0;
}

.image-code {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.bloc-code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    text-align: left;
    font-family: monospace;
    font-size: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.liste-materiel, .liste-sysml {
    text-align: left;
    margin-top: 15px;
}

/* 8. CONTACT */
.contact-centre {
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}


.titre-contact {
    border: none !important;
    text-align: center !important; 
    padding-left: 0 !important; 
    color: #2c3e50;
    margin: 0;
}

.lien-mail-gros {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.lien-mail-gros:hover,
.lien-reseau:hover,
footer a:hover {
    color: #2c3e50;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lien-reseau {
    font-size: 18px;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.icone-reseau {
    width: 40px;
    vertical-align: middle;
    transition: all 0.3s ease-in-out;
}

.lien-reseau:hover .icone-reseau,
footer a:hover .icone-footer {
    transform: scale(1.05);
}

.separateur {
    border: 0;
    border-top: 1px solid #eee;
    margin: 30px 0;
}

/* 9. BOUTONS (Téléchargement & Projets)*/
.bouton-telechargement, .bouton-projet {
    display: inline-block;
    background-color: #3498db;
    color: white !important;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    margin-top: 10px;
}

.bouton-telechargement:hover, .bouton-projet:hover {
    background-color: #2c3e50;
    transform: scale(1.05); /*   zoom */
}

.zone-cv, .zone-bouton-projet {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 10. PIED DE PAGE (FOOTER) */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

footer a {
    color: #3498db;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.icone-footer {
    width: 30px;
    vertical-align: middle;
    transition: all 0.3s ease-in-out;
}

/* Règles pour les téléphones (écrans de moins de 768px de large) */
@media (max-width: 768px) {
    header {
        padding: 16px 0;
    }

    h1 {
        font-size: 24px;
        line-height: 1.25;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-top: 16px;
    }

    nav a {
        display: block;
        font-size: 16px;
        padding: 8px 10px;
    }

    article {
        width: calc(100% - 24px);
        margin: 24px auto;
        padding: 24px 16px;
        border-radius: 8px;
        text-align: left;
    }

    article > .photodemoi,
    article > .citation,
    .presentation-bloc,
    .titre-section,
    .contact-centre,
    .bloc-centre {
        text-align: center;
    }

    h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .bloc-contenu h3,
    .bloc-competence h3,
    .carte-projet h3 {
        font-size: 19px;
        line-height: 1.35;
    }

    .photodemoi {
        width: min(200px, 70vw);
        height: auto;
        aspect-ratio: 1;
    }

    .citation {
        font-size: 17px;
        text-align: left;
    }

    .ligne-bonjour {
        font-size: 21px;
    }

    .ligne-nom {
        font-size: 25px;
    }

    .ligne-statut {
        font-size: 16px;
    }

    .conteneur-badges {
        gap: 10px;
    }

    .badge-qualite {
        max-width: 100%;
    }

    .carte-projet {
        padding: 16px;
    }

    .media-video,
    .image-large,
    .image-code {
        max-width: 100%;
        height: auto;
    }

    .conteneur-code {
        display: block;
    }

    .colonne-code + .colonne-code {
        margin-top: 16px;
    }

    .bloc-code {
        font-size: 12px;
        padding: 12px;
    }

    .liste-materiel,
    .liste-sysml,
    .bloc-competence ul {
        padding-left: 22px;
    }

    .lien-mail-gros {
        display: inline-block;
        font-size: 17px;
    }

    .contact-item {
        width: 100%;
        gap: 12px;
    }

    .lien-reseau {
        font-size: 16px;
    }

    .bouton-telechargement,
    .bouton-projet {
        max-width: 100%;
        padding: 11px 16px;
    }

    footer {
        padding: 24px 16px;
    }

    footer a {
        display: block;
        margin: 8px 0;
    }
}


.bloc-centre { text-align: center; }
.texte-gras { font-weight: bold; }

@media print {
    
    nav, footer, header { display: none; }
    body, article { 
        background-color: white !important; 
        box-shadow: none !important; 
        width: 100% !important; 
        color: black !important; 
    }
}