/* --- CONFIGURATION GLOBALE DU PORTFOLIO --- */

.page-intro {
    padding-left: 0;
    margin-bottom: 40px;
}

.intro-text {
    line-height: 1.8;
    font-size: 1.6rem;
    color: #e0e0e0; /* Blanc cassé plus doux */
    text-align: justify;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
    margin: 20px 0 20px 10px;
}

/* --- ACCORDÉONS (Missions) --- */

.activity-accordion, 
.activity-accordion[open] {
    background: #0b0205;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 0 4px #0b0205, 0 0 0 8px var(--accent-color);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

/* État survolé quand fermé : devient blanc */
.activity-accordion:not([open]):hover {
    box-shadow: 0 0 0 4px #0b0205, 0 0 0 8px #ffffff;
    border-color: #ffffff;
    transform: scale(1.01);
}

/* En-tête cliquable avec alignement corrigé et responsive */
.accordion-header {
    padding: 15px 20px;
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permet le passage à la ligne sur mobile */
    font-size: 1.6rem;
    color: var(--accent-hover);
    font-weight: bold;
    gap: 15px;
}

.accordion-header::-webkit-details-marker {
    display: none;
}

/* Force le titre à prendre la place restante */
.mission-title {
    flex: 1;
    min-width: 250px; /* Empêche le titre d'être trop écrasé */
    text-align: left;
}

/* Conteneur groupe Date + Flèche */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.mission-date {
    color: white;
    background: var(--accent-color);
    padding: 4px 12px;
    font-size: 1.3rem;
    white-space: nowrap;
}

.arrow {
    transition: transform 0.3s ease;
    color: var(--accent-hover);
}

.activity-accordion[open] .arrow {
    transform: rotate(180deg);
}

/* --- CONTENU DES MISSIONS --- */

.accordion-content {
    padding: 25px;
    border-top: 2px solid var(--accent-color);
    text-align: justify;
    color: #e0e0e0;
    font-size: 1.6rem;
    line-height: 1.8;
}

.activity-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Titres de sections (CONTEXTE, DÉMARCHE...) */
.detail-section h3 {
    color: var(--accent-hover);
    font-size: 1.7rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Texte avec ligne verticale à gauche */
.detail-section p {
    margin-left: 10px;
    border-left: 2px solid #811e1e;
    padding-left: 15px;
    margin-bottom: 20px;
}

/* Mots techniques adoucis */
.detail-section strong{
    color: var(--accent-hover);
    font-weight: normal; 
    background: rgba(129, 30, 30, 0.15);
    padding: 0 4px;
    border-radius: 2px;
}
.detail-section code {
    color: var(--accent-hover);
    font-weight: normal; 
    background: rgba(129, 30, 30, 0.15);
    padding: 0 4px;
    font-size: 0.7em;
    border-radius: 2px;
}

/* --- LISTES ET CHEVRONS --- */

.detail-section ul {
    list-style: none;
    padding: 0;
    margin-left: 35px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.detail-section li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #e0e0e0;
}

.detail-section li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--accent-hover);
    font-weight: bold;
}

/* --- IMAGES --- */

.detail-section img {
    display: block;
    margin-left: 27px; 
    width: calc(100% - 27px); 
    height: auto;
    border: 1px solid var(--accent-color);
    margin-top: 25px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* --- FOOTER DE MISSION (Traces/Preuves) --- */

.proof-box {
    margin-top: 25px;
    padding: 20px;
    border: 1px dashed var(--accent-color);
    background: rgba(129, 30, 30, 0.05);
}

.proof-link {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: bold;
}

.proof-link:hover {
    text-decoration: underline;
    color: #ffffff;
}

.explicite-note {
    font-size: 1.3rem;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* --- LIENS DE NAVIGATION --- */

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--accent-hover);
    text-decoration: none;
    font-size: 1.4rem;
}

.back-link:hover {
    color: white;
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 768px) {
    .mission-title {
        font-size: 1.4rem;
        min-width: 100%; /* Le titre prend toute la ligne sur tablette/mobile */
    }

    .header-right {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .detail-section ul, 
    .detail-section img {
        margin-left: 15px;
        width: calc(100% - 15px);
    }
    
    .intro-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .accordion-header {
        padding: 15px;
    }

    .mission-title {
        font-size: 1.2rem;
    }

    .accordion-content {
        font-size: 1.4rem;
    }

    .detail-section h3 {
        font-size: 1.5rem;
    }
}

