/* ==========================================================================
   Thème Clair & Lumineux - MOJEGA Entraide (Seniors)
   ========================================================================== */

:root {
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --primary-amber: #c68400;
    --primary-amber-hover: #a16b00;
    --text-dark: #1e293b;
    --text-muted: #475569;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- En-tête (Header) Fixe / Sticky --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Garantit que la barre reste au-dessus du contenu */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Ombre douce pour marquer le décollement lors du scroll */
}

/* Groupe Logo + Navigation collé à gauche */
.nav-group-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.brand-wrapper img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.brand-titles h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-dark);
}

.brand-titles p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--primary-amber);
    font-weight: 600;
}

/* Liens de navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    display: inline-block; /* Requis pour l'effet de zoom fluide */
    transition: color 0.2s ease, transform 0.2s ease;
}

/* État actif (Page ou section courante) */
.nav-item.active {
    color: var(--primary-amber); /* Couleur jaune ambrée pour marquer la position actuelle */
    font-weight: 700;
}

/* Effet au survol : Agrandissement léger + Soulignement */
.nav-item:hover {
    color: var(--primary-amber-hover); /* Jaune foncé au survol */
    background-color: transparent;
    text-decoration: underline; /* Soulignement du texte */
    text-underline-offset: 4px; /* Espacement propre sous le texte */
    transform: scale(1.06); /* Agrandissement léger */
}

.auth-nav {
    display: flex;
    align-items: center;
}

.btn-auth-header {
    background-color: var(--primary-amber);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-auth-header:hover {
    background-color: var(--primary-amber-hover);
}

/* --- Hero Section & Banner --- */
.hero-senior {
    text-align: center;
    max-width: 850px;
    margin: 3rem auto 2rem auto;
    padding: 0 1.5rem;
}

.hero-senior h2 {
    font-size: 2.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.hero-senior p {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.phone-callout {
    background: #fffbeb;
    border: 2px solid var(--primary-amber);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.phone-callout p {
    margin: 0 0 1rem 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #92400e;
}

.btn-phone-main {
    display: inline-block;
    background-color: var(--primary-amber);
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-phone-main:hover {
    background-color: var(--primary-amber-hover);
}

/* --- Formulaire de demande ultra-accessible --- */
.page-title-block {
    text-align: center;
    margin-top: 2rem;
}

.back-link-senior {
    color: var(--primary-amber);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
}

.back-link-senior:hover {
    text-decoration: underline;
}

.form-container {
    max-width: 750px;
    margin: 2rem auto 4rem auto;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.phone-option-banner {
    background-color: #fffbeb;
    border: 2px dashed var(--primary-amber);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.phone-option-banner p {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #92400e;
}

/* Sélection par icônes */
.category-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.category-card {
    position: relative;
}

.category-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.category-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0.5rem;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.category-box .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.category-box span.label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.category-card input[type="radio"]:checked + .category-box {
    background-color: #fff8e6;
    border-color: var(--primary-amber);
    box-shadow: 0 0 0 2px var(--primary-amber);
}

/* Champs et étiquettes */
.form-group-senior {
    margin-bottom: 2rem;
}

.form-group-senior label {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group-senior .help-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control-senior {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.15rem;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    box-sizing: border-box;
    color: #0f172a;
    background-color: #ffffff;
}

.form-control-senior:focus {
    outline: none;
    border-color: var(--primary-amber);
}

/* Zone de texte avec auto-agrandissement */
textarea.form-control-senior {
    resize: none;
    overflow-y: hidden;
    word-break: break-word;
    min-height: 100px;
    line-height: 1.5;
}

.btn-submit-senior {
    width: 100%;
    background-color: var(--primary-amber);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.btn-submit-senior:hover {
    background-color: var(--primary-amber-hover);
}

.success-message {
    display: none;
    background-color: #f0fdf4;
    border: 2px solid #22c55e;
    color: #15803d;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin-top: 1.5rem;
}

/* --- Grille des Services sur l'accueil (3 colonnes) --- */
.services-grid-senior {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1150px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.card-senior {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-senior h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0 0 0.8rem 0;
}

.card-senior p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.btn-senior-action {
    display: inline-block;
    color: var(--primary-amber);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-senior-action:hover {
    text-decoration: underline;
}

/* --- Section Confiance --- */
.trust-section {
    max-width: 1150px;
    margin: 4rem auto;
    padding: 2.5rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.trust-section h2 {
    text-align: center;
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
}

.trust-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.trust-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.trust-item span {
    font-size: 2.2rem;
}

.trust-item h4 {
    margin: 0 0 0.4rem 0;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.trust-item p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-muted);
}

/* --- Pied de page (Footer) --- */
footer {
    border-top: 2px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 0.95rem;
}

footer a {
    color: var(--primary-amber);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Stylisation de la barre de scroll --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-amber);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-amber-hover);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-amber) #f1f5f9;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Décale l'arrêt du défilement pour ne pas cacher les titres sous la barre fixe */
}