/*
Theme Name: Tout Est Accompli Amen
Theme URI: https://toutestaccompli.com
Author: Développeur
Author URI: https://toutestaccompli.com
Description: Thème WordPress personnalisé avec support ACF multilingue, audio, image, quiz et navigation conditionnelle.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toutestaccompliamen
*/

/* ========================================
   RESET ET BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: serif;
    line-height: 1.6;
    color: #333;
    background-color: #FFFFFF;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ========================================
   HEADER - SÉLECTION DE LANGUE
======================================== */
.site-header {
    background-color: #FFFFFF00;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

/* Bouton retour au début */
.btn-home {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    background-color: #FFF;
    border: 1px solid #000;
}

.btn-home:hover {
    background-color: #000;
    color: #FFF;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: #FFF;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.language-toggle:hover {
    background-color: #efefef;
    border-color: #999;
}

.language-toggle[aria-expanded="true"] {
    background-color: #e8e8e8;
    border-color: #0073aa;
}

.language-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.language-toggle[aria-expanded="true"] .language-icon {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 4px;
    padding: 4px 0;
    list-style: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.language-option:hover {
    background-color: #f5f5f5;
}

.language-option.active {
    background-color: #FFF;
    color: #000;
    font-weight: 600;
}

/* ========================================
   CONTENEUR PRINCIPAL
======================================== */
.site-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    min-height: calc(100vh - 60px);
    padding: 0 25px;
}

/* ========================================
   BLOC IMAGE
======================================== */
.block-image, .block-image-secondary {
    margin: 0 auto;
    text-align: center;
    display: flex;
    justify-content: center;
    width: 100%;
}

.block-image .image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.block-image .content-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.block-image .image-link {
    display: inline-block;
    text-decoration: none;
    width: 100%;
}

/* Image overlay pour contenu intégré */
.block-image .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: visible;
    pointer-events: none;
}

.block-image .image-overlay-content {
    padding: 20px;
    text-align: center;
    max-height: none;
    overflow: visible;
    pointer-events: auto;
    white-space: normal;
    word-wrap: break-word;
}

.block-image .image-overlay-content p {
    margin: 0;
    color: white;
}

/* ========================================
   BLOC IMAGE SECONDAIRE
======================================== */
.block-image-secondary .content-image-secondary {
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: contain;
}

/* ========================================
   COLORATION DE MOTS
======================================== */
.text-color {
    font-weight: 600;
    display: inline;
}

.text-color.text-pink {
    color: #FF69B4;
}

.text-color.text-green {
    color: #28A745;
}

.text-color.text-blue {
    color: #007BFF;
}

.text-color.text-red {
    color: #DC3545;
}

.text-color.text-white {
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
}

.text-color.text-black {
    color: #000000;
}

/* ========================================
   TEXTE BARRÉ AVEC CROIX X
======================================== */
.text-strikethrough {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.text-strikethrough::before,
.text-strikethrough::after {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: calc(100% + 4px);
    height: 2px;
    background-color: currentColor;
    transform: translateY(-40%);
}

.text-strikethrough::before {
    transform: translateY(-40%) rotate(30deg);
}

.text-strikethrough::after {
    transform: translateY(-40%) rotate(-30deg);
}

/* ========================================
   BALISE DEL AVEC CROIX X
======================================== */
del, .crossed {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

del::before,
del::after, .crossed::before, .crossed::after {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: calc(100% + 4px);
    height: 2px;
    background-color: currentColor;
}

del::before, .crossed::before {
    transform: rotate(20deg);
}

del.force-full-cross::before, .crossed.force-full-cross::before {
    transform: rotate(50deg) !important;
}

del::after, .crossed::after {
    transform:rotate(-20deg);
}

del.force-full-cross::after, .crossed.force-full-cross::after {
    transform: rotate(-50deg) !important;
}


/* ========================================
   BLOC AUDIO
======================================== */
.block-audio {
    margin: 25px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    min-width: 60%;
}

.block-audio .content-audio {
    width: 100%;
}

/* ========================================
   TAILLES DE POLICE
======================================== */
.block-text-content span[style*="font-size: 12px"] {
    font-size: 12px !important;
}

.block-text-content span[style*="font-size: 14px"] {
    font-size: 14px !important;
}

.block-text-content span[style*="font-size: 16px"] {
    font-size: 16px !important;
}

.block-text-content span[style*="font-size: 18px"] {
    font-size: 18px !important;
}

.block-text-content span[style*="font-size: 24px"] {
    font-size: 24px !important;
}

.block-text-content span[style*="font-size: 32px"] {
    font-size: 32px !important;
}

.block-text-content span[style*="font-size: 48px"] {
    font-size: xxx-large !important;
}

@media (max-width: 768px) {
    .block-text-content span[style*="font-size: 48px"] {
        font-size: large !important;
    }
}

.block-text-content span[style*="font-size: 64px"] {
    font-size: 64px !important;
}

.block-text-content span[style*="font-size: 72px"] {
    font-size: 72px !important;
}

/* Taille par défaut pour les paragraphes dans content_up, content_img, content_down */
.block-text-content p,
.image-overlay-content p {
    font-size: xxx-large;
}

@media (max-width: 768px) {
    .block-text-content p,
    .image-overlay-content p {
        font-size: large;
    }
}

/* ========================================
   BLOC TEXTE (WYSIWYG)
======================================== */
.block-text-content {
    margin: 25px auto;
    text-align: center;
    line-height: 1.8;
    color: #444;
}

.block-text-content p {
    margin-bottom: 15px;
}

.block-text-content p:last-child {
    margin-bottom: 0;
}

.block-text-content a {
    color: #0073aa;
    text-decoration: underline;
}

.block-text-content a:hover {
    color: #005177;
}

.block-text-content ul,
.block-text-content ol {
    margin: 15px auto;
    padding-left: 25px;
    display: inline-block;
    text-align: left;
}

.block-text-content li {
    margin-bottom: 8px;
}

.block-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ========================================
   BLOC QUIZ
======================================== */
.block-quiz {
    margin: 30px auto;
    padding: 25px;
    background-color: #fff;
    text-align: center;
}

.block-quiz .quiz-question {
    margin-bottom: 20px;
}

.block-quiz .quiz-question p {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.block-quiz .quiz-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.block-quiz .quiz-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
}

.block-quiz .quiz-input:focus {
    border-color: #0073aa;
}

.block-quiz .quiz-btn {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.block-quiz .quiz-btn:hover {
    background-color: #005177;
}

/* Résultat du quiz */
.block-quiz .quiz-result {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
}

.block-quiz .quiz-result.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.block-quiz .quiz-result.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.block-quiz .quiz-result.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ========================================
   BOUTON NAVIGATION SUIVANTE
======================================== */
.navigation-next {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    width: 100%;
}

.btn-next {
    display: inline-block;
    padding: 12px 30px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-next:hover {
    background-color: #1e7e34;
}

/* ========================================
   NAVIGATION PAGE CLICKABLE
======================================== */
body.page-clickable {
    cursor: pointer;
}

body.page-clickable::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        gap: 10px;
    }

    .btn-home {
        padding: 10px 12px;
        font-size: 14px;
    }

    .language-dropdown {
        flex-shrink: 0;
    }

    .language-toggle {
        padding: 10px 10px;
        font-size: 13px;
    }

    .language-current {
        display: inline;
    }

    .site-main {
        padding: 0 15px;
    }

    .block-image, .block-image-secondary {
        width: 100%;
        max-width: none;
    }

    .block-quiz {
        margin: 20px auto;
        padding: 15px;
        width: 100%;
    }

    .block-quiz .quiz-form {
        flex-direction: column;
    }

    .block-quiz .quiz-input {
        width: 100%;
    }

    .block-quiz .quiz-btn {
        width: 100%;
    }

    .block-audio {
        width: 100%;
    }
}

/* CUSTOM ADJUSTMENTS */
.max-1000 {
    max-width: 1000px !important;
    width: 100% !important;
}

.large-size {
    font-size: 65px !important;
}

.x-large-size {
    font-size: 100px !important;
}
 
@media (max-width: 768px) {
    .large-size {
        font-size: 40px !important;
    }

    .x-large-size {
        font-size: 60px !important;
    }
}

.block-text-content {
    width: 100%;
    max-width: 1000px !important;
}

/* Accolade */
.brace-wrapper {
    position: relative;
    width: 290px;
    font-size: 48px;
    height: 160px;
    margin: 30px auto;
}

@media (max-width: 768px) {
    .brace-wrapper {
        font-size: 25px;;
        height: 100px;
        width: 200px;
    }
}

.before-word-1 {
    position: absolute;
    top: 0px;
    left: 0;
}

.before-word-2 {
    position: absolute;
    top: 70px;
    left: 0;
}

.after-word {
    position: absolute;
    top: 35px;
    right: 0;
}

.brace-img {
    height: 160px !important;
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .brace-img {
        height: 105px !important;
    }
}

.invert-color {
    filter: invert(1);
}