/******************
    Thème FAS - Fédération des acteurs de la solidarité
    ---------------------------------------------------
    Personnalisation basée sur la charte graphique 2025
    
    Couleurs principales:
    - Vert FAS: #00a97a (obligatoire)
    - Turquoise: #00d6b2
    - Bleu clair: #2fa7ff
    - Bleu foncé: #0047ff
    
    Typographies:
    - Inter (police principale)
    - Big Shoulders Display (titres/accents)
******************/

/* ========================================
   IMPORT DES POLICES GOOGLE FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   VARIABLES CSS - PALETTE FAS
   ======================================== */
:root {
    /* Couleurs principales FAS */
    --fas-vert: #00a97a;
    --fas-vert-clair: #71f7a6;
    --fas-vert-fonce: #008460;
    --fas-turquoise: #00d6b2;
    --fas-bleu-clair: #2fa7ff;
    --fas-bleu-fonce: #0047ff;
    --fas-jaune: #ffea4b;
    --fas-orange: #ffa071;
    --fas-corail: #ff6b61;
    --fas-rose: #ff9ad0;
    
    /* Couleurs secondaires claires (fonds) */
    --fas-vert-bg: #d9f2eb;
    --fas-turquoise-bg: #d9f9f4;
    --fas-bleu-bg: #e0f2ff;
    
    /* Typographies */
    --fas-font-principale: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fas-font-titres: 'Big Shoulders Display', 'Inter', sans-serif;
    
    /* Override Bootstrap */
    --bs-font-sans-serif: var(--fas-font-principale);
    --bs-body-font-family: var(--fas-font-principale);
    --bs-primary: var(--fas-vert);
    --bs-primary-rgb: 0, 169, 122;
}

/* ========================================
   TYPOGRAPHIE GÉNÉRALE
   ======================================== */
body {
    font-family: var(--fas-font-principale) !important;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Titres avec Big Shoulders */
h1, .h1,
h2, .h2,
h3, .h3 {
    font-family: var(--fas-font-titres) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--fas-vert-fonce);
}

h4, .h4,
h5, .h5,
h6, .h6 {
    font-family: var(--fas-font-principale) !important;
    font-weight: 600;
    color: #1E1E1E;
}

/* Titre du questionnaire */
.survey-name h1,
.survey-title,
#survey-title {
    font-family: var(--fas-font-titres) !important;
    font-weight: 800;
    color: var(--fas-vert);
    text-transform: uppercase;
}

/* Noms des groupes de questions */
.group-title,
.group-name,
h2.group-title {
    font-family: var(--fas-font-titres) !important;
    font-weight: 700;
    color: var(--fas-vert);
    text-transform: uppercase;
    border-left: 4px solid var(--fas-vert);
    padding-left: 15px;
    margin-bottom: 1.5rem;
}

/* ========================================
   EN-TÊTE (BANDEAU VERT AVEC BORDURE)
   ======================================== */

/* Bandeau d'en-tête - fond vert avec bordure foncée */
.top-container,
header.navbar,
.navbar {
    background-color: var(--fas-vert) !important;
    background-image: none !important;
    border-bottom: 4px solid var(--fas-vert-fonce, #008460) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #ffffff !important;
}

/* ========================================
   BARRE DE PROGRESSION (MASQUÉE)
   ======================================== */

/* Masquer complètement la barre de progression */
.progress,
.progress-bar,
.progress-container,
.progress-wrapper,
#progress-wrapper,
.survey-progress,
[class*="progress-bar"],
.fruity_twentythree .progress,
.survey-progress-container {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Texte de progression également masqué */
.progress-text,
.progress-percent {
    display: none !important;
}

/* ========================================
   QUESTIONS
   ======================================== */

/* Texte des questions */
.question-title,
.question-text,
.ls-label-question {
    font-family: var(--fas-font-principale) !important;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #1E1E1E;
}

/* Numéro de question */
.question-number {
    font-family: var(--fas-font-titres) !important;
    font-weight: 700;
    color: var(--fas-vert);
}

/* Aide/description des questions */
.question-help,
.ls-questionhelp,
.asterisk {
    font-family: var(--fas-font-principale);
    font-weight: 400;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Questions obligatoires */
.asterisk,
.mandatory {
    color: var(--fas-corail) !important;
}

/* ========================================
   BOUTONS
   ======================================== */

/* Boutons principaux (Suivant, Envoyer) */
.btn-primary,
.btn.btn-primary,
button[type="submit"].btn-primary,
#ls-button-submit,
.action--ls-button-submit {
    background-color: var(--fas-vert) !important;
    border-color: var(--fas-vert) !important;
    font-family: var(--fas-font-principale) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 12px 30px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn.btn-primary:hover,
#ls-button-submit:hover {
    background-color: var(--fas-vert-fonce) !important;
    border-color: var(--fas-vert-fonce) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 169, 122, 0.3);
}

.btn-primary:focus,
.btn.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(0, 169, 122, 0.25) !important;
}

/* Boutons secondaires (Précédent) */
.btn-secondary,
.btn.btn-secondary,
.btn-outline-secondary {
    background-color: transparent !important;
    border: 2px solid var(--fas-vert) !important;
    color: var(--fas-vert) !important;
    font-family: var(--fas-font-principale) !important;
    font-weight: 600;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
    background-color: var(--fas-vert-bg) !important;
    color: var(--fas-vert-fonce) !important;
}

/* ========================================
   FORMULAIRES ET INPUTS
   ======================================== */

/* Champs de texte */
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    font-family: var(--fas-font-principale) !important;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--fas-vert) !important;
    box-shadow: 0 0 0 3px rgba(0, 169, 122, 0.15) !important;
    outline: none;
}

/* ========================================
   CASES À COCHER ET BOUTONS RADIO
   ======================================== */

/* Style des cases à cocher */
input[type="checkbox"]:checked + label::before,
input[type="checkbox"]:checked ~ label::before,
.checkbox-item input:checked + label::before {
    background-color: var(--fas-vert) !important;
    border-color: var(--fas-vert) !important;
}

/* Style des boutons radio */
input[type="radio"]:checked + label::before,
input[type="radio"]:checked ~ label::before,
.radio-item input:checked + label::before {
    border-color: var(--fas-vert) !important;
}

input[type="radio"]:checked + label::after,
input[type="radio"]:checked ~ label::after,
.radio-item input:checked + label::after {
    background-color: var(--fas-vert) !important;
}

/* Labels des options */
.radio-label,
.checkbox-label,
.answer-item label,
.ls-answers label {
    font-family: var(--fas-font-principale) !important;
    font-weight: 400;
}

/* ========================================
   MESSAGES ET ALERTES
   ======================================== */

/* Messages de succès */
.alert-success {
    background-color: var(--fas-vert-bg);
    border-color: var(--fas-vert);
    color: var(--fas-vert-fonce);
}

/* Messages d'erreur */
.alert-danger,
.has-error .form-control,
.error-message {
    border-color: var(--fas-corail) !important;
}

.alert-danger {
    background-color: #fff1ea;
    color: #682f28;
}

/* Messages d'information */
.alert-info {
    background-color: var(--fas-turquoise-bg);
    border-color: var(--fas-turquoise);
    color: #1e5249;
}

/* ========================================
   PAGE D'ACCUEIL ET DE FIN
   ======================================== */

/* Page d'accueil */
.welcome-container,
.survey-welcome {
    background-color: var(--fas-vert-bg);
    border-left: 4px solid var(--fas-vert);
    padding: 25px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
}

/* Message de bienvenue */
.survey-description,
.welcome-text {
    font-family: var(--fas-font-principale);
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

/* Page de fin / Remerciements */
.completed-text,
.submit-message {
    font-family: var(--fas-font-principale);
    text-align: center;
    padding: 40px;
}

.completed-text h2,
.submit-message h2 {
    font-family: var(--fas-font-titres) !important;
    color: var(--fas-vert);
}

/* ========================================
   TABLEAUX (QUESTIONS MATRICIELLES)
   ======================================== */

table.ls-answers {
    font-family: var(--fas-font-principale);
}

table.ls-answers thead th {
    background-color: var(--fas-vert-bg);
    color: var(--fas-vert-fonce);
    font-weight: 600;
    border-bottom: 2px solid var(--fas-vert);
}

table.ls-answers tbody tr:hover {
    background-color: rgba(0, 169, 122, 0.05);
}

/* ========================================
   LIENS
   ======================================== */

a {
    color: var(--fas-vert);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--fas-vert-fonce);
    text-decoration: underline;
}

/* ========================================
   BOUTONS SAUVEGARDE / REPRISE (NAVBAR)
   ======================================== */

/* Liens de navigation dans la barre d'en-tête */
.navbar .nav-link,
.navbar .navbar-nav .nav-link,
.navbar-nav .nav-link,
.top-container .nav-link,
.ls-link-loadall,
.ls-link-action {
    color: #ffffff !important;
    font-family: var(--fas-font-principale) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 15px !important;
    text-overflow: unset !important;
    overflow: visible !important;
    white-space: nowrap !important;
    max-width: none !important;
    width: auto !important;
}

.navbar .nav-link:hover,
.navbar-nav .nav-link:hover,
.ls-link-loadall:hover,
.ls-link-action:hover {
    color: #ffffff !important;
    opacity: 0.9;
    text-decoration: underline;
}

/* Forcer l'affichage complet du texte des boutons */
.navbar .nav-item,
.navbar-nav .nav-item {
    max-width: none !important;
    overflow: visible !important;
}

/* Texte blanc UNIQUEMENT dans la navbar principale (pas les dropdowns) */
.navbar > .container *,
.navbar > .container-fluid *,
.navbar-nav > .nav-item > .nav-link,
#survey-nav > * {
    color: #ffffff !important;
}

/* Style spécifique pour les icônes dans la navbar (si présentes) */
.navbar .nav-link i,
.navbar .nav-link .ri,
.navbar .nav-link [class^="ri-"] {
    margin-right: 5px;
    color: #ffffff !important;
}

/* ========================================
   MENU DÉROULANT (POPUP) - TEXTE LISIBLE
   ======================================== */

/* Menu déroulant - fond blanc avec texte foncé */
.navbar .dropdown-menu,
.dropdown-menu,
.navbar-nav .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Éléments du menu déroulant - texte FONCÉ */
.navbar .dropdown-menu *,
.dropdown-menu *,
.dropdown-menu .dropdown-item,
.dropdown-menu a,
.dropdown-menu span,
.dropdown-menu li,
.navbar .dropdown-menu .dropdown-item,
.navbar-nav .dropdown-menu .dropdown-item {
    color: var(--fas-vert-fonce, #008460) !important;
    background-color: transparent;
    font-family: var(--fas-font-principale) !important;
}

/* Hover sur les éléments du menu */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu a:hover,
.navbar .dropdown-menu .dropdown-item:hover {
    background-color: var(--fas-vert-bg, #d9f2eb) !important;
    color: var(--fas-vert, #00a97a) !important;
}

/* ========================================
   FOOTER
   ======================================== */

footer,
.footer {
    font-family: var(--fas-font-principale);
    font-size: 0.85rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
    margin-top: 40px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    h1, .h1 {
        font-size: 1.8rem;
    }
    
    h2, .h2,
    .group-title {
        font-size: 1.4rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .progress,
    .navbar,
    .btn {
        display: none !important;
    }
    
    body {
        font-family: 'Inter', Arial, sans-serif !important;
    }
    
    h1, h2, h3 {
        color: #00a97a !important;
    }
}
