/* styles/soldat.css */

.sticky-search-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 15px 0 0 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    background-color: transparent;
}
.sticky-search-header.scrolled {
    background-color: rgba(18, 16, 13, 0.98) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    padding-top: 5px;
}
.recherche-header-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    padding: 0 20px;
}
.logo-blason-container img { height: 80px; width: auto; }
.search-form-vintage { flex: 1; display: flex; align-items: center; }
.vintage-input-wrapper {
    display: flex; align-items: center; background: #ffffff;
    border: 1px solid #c8bfa6; border-radius: 30px; padding: 5px 6px 5px 20px; width: 100%;
}
.vintage-input-wrapper input { width: 100%; border: none; background: transparent; outline: none; font-family: 'Georgia', serif; }
.vintage-search-submit { background: transparent; border: none; cursor: pointer; padding: 8px 14px; }

/* IN MEMORIAM */
.commemoration-tag-wrapper { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }
.commemoration-tag { display: flex; align-items: center; justify-content: center; gap: 35px; color: #1c2d42; letter-spacing: 10px; }
.commemoration-tag img { height: 30px; width: auto; display: block; }
.commemoration-tag span { font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; }

.recherche-results-wrapper { width: 100%; max-width: 900px; margin: 0 auto; padding: 10px 20px 60px 20px; }
.soldat-paper-sheet { background: transparent; position: relative; }
.soldat-top-profile-row { display: flex; gap: 40px; }
.soldat-top-profile-row.no-portrait-flow .identity-details-column { flex: 1; }

.portrait-column { flex: 1; max-width: 240px; position: relative; }
.portrait-sticky-container {
    position: sticky;
    top: 130px; 
    z-index: 10;
}
.portrait-box {
    width: 240px;
    height: 300px;
    background: #eae5d8;
    border: 4px double #b8af98; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 5px;
}

.portrait-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: sepia(0.8) contrast(1.1) brightness(0.9); 
    display: block; 
    transition: filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.portrait-box:hover .portrait-img,
.portrait-img.active-memory { 
    filter: sepia(0) grayscale(100%) contrast(1.1); 
}

.identity-details-column { flex: 2; display: flex; flex-direction: column; }
.soldat-title-row { width: 100%; text-align: center; }
.soldat-name { font-family: 'Cinzel', serif; font-size: 2.2rem; color: #8b8065; text-align: center; margin: 0; }

/* BOUTONS EXTENSIBLES JUMELLES (MÊME STYLE & COMPORTEMENT) */
.cere-btn-centered-trigger { 
    display: flex; 
    justify-content: center; 
    align-items: center;
    gap: 20px;
    margin: 20px 0; 
}

.btn-action-extendable {
    border: 1px solid #b8af98;
    border-radius: 20px;
    width: 40px; 
    height: 40px; 
    cursor: pointer; 
    overflow: hidden;
    white-space: nowrap; 
    text-decoration: none;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action-extendable.play-theme,
.btn-action-extendable.edit-theme {
    background: #eae5d8;
    color: #1c2d42;
}

.btn-action-extendable img { 
    width: 18px; 
    height: auto; 
    flex-shrink: 0;
    transition: transform 0.2s ease; 
}

.btn-action-extendable:hover { 
    width: 220px; 
    padding: 0 18px;
    justify-content: flex-start;
}

.btn-action-extendable:hover img { 
    transform: scale(1.05); 
}

.btn-action-extendable:hover::after {
    content: " " attr(data-hover-text);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-left: 10px;
}
.btn-action-extendable.play-theme:hover::after,
.btn-action-extendable.edit-theme:hover::after { color: #2b2720; }

.fine-hr { max-height: 25px; width: auto; max-width: 180px; opacity: 0.5; margin: 15px auto; display: block; }
.meta-civil-dates { margin-bottom: 10px; display: flex; }
.civil-line { font-family: 'Georgia', serif; font-size: 1.05rem; color: #2b2720; margin-bottom: 4px; text-align: left; width: 50%; padding: 12px 18px; }
.civil-line:first-of-type { border-left: 3px solid #a8926c; }
.civil-line:last-of-type { border-left: 3px solid #a92323; }
.civil-line strong { display: block; }

.distinctions-memorial-box { font-family: 'Georgia', serif; font-size: 1.05rem; color: #2b2720; line-height: 1.5; text-align: left; }
.distinctions-memorial-box strong { display: block; }
.last-regiment-badge { text-align: left; margin: 10px 0; }
.last-regiment-badge strong { display: block; }

/* SECTIONS BAS DE PAGE */
.soldat-bottom-chapters { width: 100%; display: flex; flex-direction: column; gap: 1px; }
.fiche-chapter-section { width: 100%; border-top: 1px solid rgba(184, 175, 152, 0.25); padding-top: 25px; }
.chapter-title { text-align: left; font-family: 'Cinzel', serif; font-size: 1.2rem; color: #1c2d42; margin-bottom: 15px; letter-spacing: 1px; }

.main-biography-content { font-family: 'Georgia', serif; font-size: 1.05rem; line-height: 1.75; color: #2b2720; text-align: justify; }
.main-biography-content h2 { text-align: left; font-size: 1.15rem; margin: 20px 0 10px 0; color: #695e4b; font-family: 'Cinzel', serif; }
.main-biography-content p { margin-bottom: 15px; }
.main-biography-content blockquote { border-left: 3px solid rgba(0, 0, 0, 0.3); font-style: italic; padding: 15px 20px; margin: 15px 0; }

/* AUTOGENERATED NOTICE BOX */
.auto-generated-bio { font-family: 'Georgia', serif; font-size: 1.1rem; color: #38342c; line-height: 1.8; }
.memorial-contribution-notice { margin-top: 30px; background: rgba(168, 146, 108, 0.03); border: 1px dashed #b8af98; padding: 24px; position: relative; text-align: center; }
.memorial-contribution-notice p { font-family: 'Georgia', serif; font-style: italic; color: #695e4b; font-size: 1rem; line-height: 1.6; margin: 0 !important; }
.memorial-contribution-notice::before { content: "✦"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #fdfbf7; padding: 0 10px; color: #a8926c; font-size: 0.8rem; }

/* HISTORIQUE ET VIGNETTES */
.vintage-history-list { list-style: none; padding: 0; font-family: 'Georgia', serif; font-size: 1.05rem; }
.vintage-history-list li { margin-bottom: 8px; border-bottom: 1px dashed rgba(184, 175, 152, 0.2); padding-bottom: 6px; }
.date-range, .devise-italic { color: #695e4b; font-size: 0.95rem; margin-left: 8px; }
.devise-italic { font-style: italic; color: #7a705c; }
.placeholder-text-chapter { font-family: 'Georgia', serif; font-style: italic; color: #7a705c; }

.btn-vintage-oval-trigger {
    background: linear-gradient(180deg, #eae5d8 0%, #ded7c5 100%); border: 1px solid #b8af98; border-radius: 25px;
    padding: 10px 24px; color: #4a4335; font-family: 'Cinzel', serif; font-size: 0.8rem; font-weight: 600; cursor: pointer; box-shadow: 0 3px 6px rgba(0,0,0,0.06);
}
.btn-vintage-oval-trigger:hover { background: #eae5d8; color: #a92323; }

.static-cere-info .cere-chapter-desc { font-family: 'Georgia', serif; font-style: italic; color: #5c5446; margin-bottom: 20px; }
.youtube-previews-grid { display: flex; gap: 20px; margin-bottom: 25px; flex-wrap: wrap; }
.youtube-preview-card { flex: 1; min-width: 240px; background: rgba(246, 243, 235, 0.3); border: 1px solid #c8bfa6; padding: 12px; }
.yt-thumb-holder { position: relative; width: 100%; height: 130px; background: #000; overflow: hidden; }
.yt-thumb-holder img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; filter: sepia(0.4); transition: all 0.3s; }
.youtube-preview-card:hover .yt-thumb-holder img { opacity: 0.9; filter: sepia(0); }

.yt-play-overlay-btn { 
    position: absolute; inset: 0; margin: auto; width: 45px; height: 45px; 
    background: rgba(28, 45, 66, 0.9); border: 1px solid #c8bfa6; border-radius: 50%;
    color: #ffffff; text-decoration: none; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; padding-left: 3px; transition: background 0.2s;
}
.youtube-preview-card:hover .yt-play-overlay-btn { background: #a92323; border-color: #fff; }
.youtube-preview-card h5 { text-align: left; font-family: 'Cinzel', serif; font-size: 0.85rem; color: #1c2d42; margin: 10px 0 2px 0; }
.youtube-preview-card p { text-align: left; font-family: 'Georgia', serif; font-size: 0.75rem; color: #6e6554; }

.gallery-container-vintage { display: flex; gap: 15px; flex-wrap: wrap; }
.gallery-item-wrapper { width: 140px; height: 180px; border: 1px solid #c8bfa6; padding: 3px; background: #ffffff; }
.gallery-photo-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); }

.batailles-grid-vintage { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.bataille-card-mini { background: rgba(246, 243, 235, 0.3); border: 1px solid #c8bfa6; padding: 15px; }
.bataille-card-mini h4 { text-align: left; font-family: 'Cinzel', serif; font-size: 0.9rem; color: #1c2d42; margin-bottom: 6px; }
.bataille-card-mini p { font-family: 'Georgia', serif; font-size: 0.85rem; margin-bottom: 2px; color: #443f35; }
.b-summary { font-style: italic; color: #6e6554; margin-top: 6px !important; }
.b-link { display: inline-block; font-family: 'Cinzel', serif; font-size: 0.7rem; font-weight: bold; color: #a92323; text-decoration: none; margin-top: 8px; }

/* POP-UP */
.cere-modal-overlay {
    position: fixed; inset: 0; background: rgba(18, 16, 13, 0.9);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; z-index: 999; transition: opacity 0.4s ease; backdrop-filter: blur(4px);
}
.cere-modal-overlay.active { opacity: 1; pointer-events: auto; }
.cere-modal-box { background: #fdfbf7; border: 2px solid #a8926c; width: 100%; max-width: 500px; padding: 40px; text-align: center; position: relative; box-shadow: 0 15px 45px rgba(0,0,0,0.6); }
.cere-modal-box img { max-width: 100%; height: auto; }
.close-modal-btn { position: absolute; top: 15px; right: 20px; background: transparent; border: none; font-size: 1.8rem; color: #7a705c; cursor: pointer; }
.close-modal-btn:hover { color: #a92323; }
.modal-cere-title { font-family: 'Cinzel', serif; font-size: 0.95rem; color: #a92323; letter-spacing: 2px; margin-top: 15px; }
.modal-soldat-name { font-family: 'Cinzel', serif; font-size: 1.5rem; color: #1c2d42; margin-top: 4px; }
.modal-status-text { font-family: 'Georgia', serif; font-style: italic; color: #443f35; font-size: 1rem; margin-top: 20px; border-top: 1px dashed rgba(184, 175, 152, 0.3); padding-top: 15px; }
.flame-container { width: 40px; height: 40px; margin: 0 auto; position: relative; }
.flame { width: 18px; height: 18px; background: #ff6600; border-radius: 50% 0 50% 50%; transform: rotate(-45deg); margin: 0 auto; animation: pulseFlame 1.2s infinite alternate; }

@media (max-width: 768px) {
    .soldat-top-profile-row { flex-direction: column; align-items: center; }
    .portrait-column { max-width: 100%; }
    .portrait-sticky-container { position: static; }
    .batailles-grid-vintage { grid-template-columns: 1fr; }
    .meta-civil-dates { flex-direction: column; }
    .civil-line { width: 100%; border-left: 3px solid #a8926c !important; }
}

/* Intégration de la vidéo YouTube embarquée dans le modal */
.video-embed-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 15px auto;
    border: 3px double #b8af98; /* Cadre liasse identique au portrait */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: #000000;
    line-height: 0;
}

.yt-play-overlay-btn {
    /* Remplacement du lien par un bouton natif pour éviter le comportement href mobile */
    border: none;
    outline: none;
    cursor: pointer;
}