/*
 * Tegula – Styles pour Inca3D (c) 2025
 * Tous droits réservés – Reproduction interdite sans autorisation.
 *
 * Refactorisé 2026-05 :
 *   - Fusion des deux blocs .inca-popup (définition + animation) en un seul
 *   - Suppression de border-bottom/border-top déclarés deux fois dans header/footer
 *   - Suppression de font-size invalide dans @font-face
 *   - Uniformisation font-family vers "Futura Book", sans-serif
 *   - Suppression du bloc @media tablettes .col-lg-5th (déjà dans v3d.core.css)
 *   - Correction chemin image resize (relatif depuis css/)
 */

/* ═══════════════════════════════════════════════
   POLICE
   ═══════════════════════════════════════════════ */
@font-face {
    font-family: "Futura Book";
    src: url("../fonts/Futura Book font.ttf") format("truetype");
}


/* ═══════════════════════════════════════════════
   POPUP — CONTENEUR PRINCIPAL
   ═══════════════════════════════════════════════ */
.inca-popup {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0);
    border: 1px solid var(--border);
    box-shadow: 0px 5px 7px rgba(0, 0, 0, 0.5);
    width: 70%;
    height: 80%;
    /* Animation d'apparition/disparition */
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.inca-popup.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.inca-popup.no-shadow {
    box-shadow: none !important;
}

.inca-popup,
.inca-popup-content,
.inca-popup-footer {
    box-sizing: border-box;
}


/* ═══════════════════════════════════════════════
   POPUP — EN-TÊTE
   ═══════════════════════════════════════════════ */
.inca-popup-header {
    font-family: var(--font-brand);
    font-size: 1.3em;
    letter-spacing: 0.1em;
    height: 40px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--surface-2);
    /* Une seule déclaration border-bottom (suppression du doublon ligne 42) */
    border-bottom: 1px solid var(--border);
    color: var(--text);
    cursor: move;
    position: relative;
    flex-shrink: 0;
}

.inca-popup-header .inca-title {
    font-size: 0.85em;
    letter-spacing: 0.3pt;
}


/* ═══════════════════════════════════════════════
   POPUP — CONTENU
   ═══════════════════════════════════════════════ */
.inca-popup-content {
    flex: 1;
    padding: 0;
    overflow: auto;
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-family: var(--font-brand);
    color: var(--panel-text);
    position: relative;
    height: 100%;
    width: 100%;
}


/* ═══════════════════════════════════════════════
   POPUP — PIED DE PAGE
   ═══════════════════════════════════════════════ */
.inca-popup-footer {
    height: 40px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: var(--surface-2);
    /* Une seule déclaration border-top (suppression du doublon ligne 79) */
    border-top: 1px solid var(--border);
    color: var(--text);
    cursor: default;
    position: relative;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════
   POPUP — BOUTONS D'EN-TÊTE (fermer / plein écran)
   ═══════════════════════════════════════════════ */
.inca-popup-close-button,
.fullscreen {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    position: absolute;
    top: 4px;
}

.inca-popup-close-button:hover,
.fullscreen:hover {
    opacity: 1;
}

.inca-popup-close-button {
    right: 4px;
}

.inca-popup-close-button::before,
.fullscreen::before {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
}

.inca-popup-close-button::before {
    content: "✕";
    font-size: 16px;
}

.fullscreen {
    right: 40px;
}

.fullscreen::before {
    content: "⛶";
    font-size: 16px;
}


/* ═══════════════════════════════════════════════
   POPUP — POIGNÉE DE REDIMENSIONNEMENT
   ═══════════════════════════════════════════════ */
.inca-popup-resize {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: se-resize;
    position: absolute;
    right: 5px;
    bottom: 5px;
    /* Chemin relatif depuis le dossier css/ */
    background-image: url('images/resize.png');
    background-position: center;
    opacity: 0.7;
}


/* ═══════════════════════════════════════════════
   OVERLAY MODAL
   ═══════════════════════════════════════════════ */
#linca-modal {
    transition: opacity 0.3s ease;
    opacity: 0;
}

#linca-modal.visible {
    opacity: 0.6;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILES (< 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .inca-popup-header .inca-title {
        font-size: 0.7em;
        letter-spacing: 0.2pt;
    }
}
