/* ============================================================
   FINAMO - Feuille de style globale
   Utilisée par toutes les pages du portail (sauf index.html)
   ============================================================ */

/* RESET */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f9fafb;
    min-height: 100vh;
    color: #111827;
    line-height: 1.6;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ============================================================
   HEADER
   Fluide (clamp) pour rester sur UNE seule ligne
   du desktop jusqu'aux très petits écrans — identique à index.html
   ============================================================ */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: clamp(0.625rem, 3vw, 1rem) clamp(0.75rem, 4vw, 1.5rem);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: clamp(0.5rem, 2vw, 1rem);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: clamp(0.375rem, 2vw, 0.75rem);
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    min-width: 0;
}

.site-brand:hover {
    text-decoration: none;
}

.site-brand-logo {
    width: clamp(1.75rem, 7vw, 2.5rem);
    height: clamp(1.75rem, 7vw, 2.5rem);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-brand-logo svg {
    width: 60%;
    height: 60%;
}

.site-brand-name {
    font-size: clamp(0.9375rem, 4.5vw, 1.5rem);
    font-weight: 900;
    color: #2563eb;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

/* La nav peut défiler horizontalement si l'espace manque,
   mais reste TOUJOURS sur la même ligne que le logo. */
.site-header-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.125rem, 1vw, 0.5rem);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.site-header-nav::-webkit-scrollbar {
    display: none;
}

.site-header-nav a {
    font-size: clamp(0.6875rem, 2.6vw, 0.875rem);
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    padding: clamp(0.3rem, 1.2vw, 0.5rem) clamp(0.4rem, 2vw, 0.875rem);
    border-radius: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.site-header-nav a:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

/* ============================================================
   PAGE MAIN
   ============================================================ */
.page-main {
    padding: 3rem 1.5rem 4rem;
}

.page-container {
    max-width: 1100px;
    margin: 0 auto;
}

.page-container-narrow {
    max-width: 800px;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: #eff6ff;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.page-title {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.page-lead {
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
    color: #4b5563;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

.page-meta {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-style: italic;
}

/* ============================================================
   CONTENU GÉNÉRIQUE
   ============================================================ */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.content-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.08);
}

.content-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.015em;
}

.content-card p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.7;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: clamp(1.25rem, 3vw, 1.625rem);
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.content-intro {
    font-size: 0.9375rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.content-cta {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border: 1px solid #dbeafe;
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    text-align: center;
}

.content-cta h2 {
    margin-bottom: 0.75rem;
}

.content-cta p {
    font-size: 0.9375rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.content-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #ffffff;
    box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    color: #ffffff;
    box-shadow: 0 8px 20px -6px rgba(22, 163, 74, 0.5);
}

/* ============================================================
   PLATFORMS SUMMARY (page À propos)
   ============================================================ */
.platform-summary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    padding: 1.75rem;
}

.platform-summary-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.platform-summary-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.platform-summary-bourse .platform-summary-icon {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.platform-summary-budget .platform-summary-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.platform-summary h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.platform-summary p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.65;
}

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
}

.info-box p {
    font-size: 0.9375rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-list li {
    font-size: 0.9375rem;
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.info-list strong {
    color: #111827;
    font-weight: 600;
}

/* ============================================================
   FEATURE LIST
   ============================================================ */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.feature-list li {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #2563eb;
}

.feature-list strong {
    color: #111827;
    font-weight: 700;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
}

.contact-card-primary {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: #bfdbfe;
}

.contact-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.contact-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.contact-card h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.contact-link {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: #2563eb;
    word-break: break-all;
}

/* FORMULAIRE */
.contact-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form .btn {
    align-self: flex-start;
}

/* ============================================================
   FAQ (details/summary)
   ============================================================ */
.faq-category {
    margin-bottom: 3rem;
}

.faq-category-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: #bfdbfe;
}

.faq-item[open] {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.12);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    list-style: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #6b7280;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-item[open] summary svg {
    transform: rotate(180deg);
    color: #2563eb;
}

.faq-content {
    padding: 0 1.5rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 1.25rem;
}

.faq-content p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.faq-content p:last-child {
    margin-bottom: 0;
}

.faq-content ul,
.faq-content ol {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.7;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.faq-content li {
    margin-bottom: 0.375rem;
}

/* ============================================================
   CONTENU LÉGAL (CGU, Privacy, Mentions, Avertissement)
   ============================================================ */
.legal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    padding: 2.5rem;
}

.legal-section {
    margin-bottom: 2.25rem;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 1.1875rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.015em;
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.legal-section p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.legal-section ul,
.legal-section ol {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.75;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section li {
    margin-bottom: 0.375rem;
}

.legal-section strong {
    color: #111827;
    font-weight: 700;
}

/* ============================================================
   WARNING BOX LARGE (Avertissement)
   ============================================================ */
.warning-box-large {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #fde68a;
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.warning-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: #ffffff;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.warning-icon svg {
    width: 2rem;
    height: 2rem;
}

.warning-box-large h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.warning-box-large p {
    font-size: 1rem;
    color: #92400e;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

.warning-box-large strong {
    font-weight: 800;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #111827;
    color: #9ca3af;
    padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.footer-brand:hover {
    text-decoration: none;
}

.footer-brand-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-brand-logo svg {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-brand-name {
    font-size: 1.375rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.footer-brand-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #9ca3af;
    max-width: 320px;
    word-break: break-word;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: #1f2937;
    color: #9ca3af;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.footer-social-link:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
}

.footer-social-link svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.footer-column h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-column a {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
}

.footer-column a:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-divider {
    height: 1px;
    background: #1f2937;
    margin: 1.5rem 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
}

.footer-copyright {
    color: #6b7280;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-legal a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: #ffffff;
}

.footer-legal span {
    color: #374151;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }

    .footer-brand-section {
        grid-column: 1 / -1;
    }

    /* Colonne "Légal" seule (3e colonne) : on l'étire
       sur toute la largeur pour éviter une case vide. */
    .footer-column:last-of-type {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .page-main {
        padding: 2rem 1rem 3rem;
    }

    .page-header {
        margin-bottom: 2rem;
    }

    .legal-content {
        padding: 1.75rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .faq-item summary {
        padding: 1rem 1.25rem;
        font-size: 0.9375rem;
    }

    .faq-content {
        padding: 1rem 1.25rem;
    }

    .warning-box-large {
        padding: 2rem 1.5rem;
    }

    .site-footer {
        padding: 2.5rem 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-main {
        gap: 1.75rem 1rem;
    }

    .page-main {
        padding: 1.5rem 0.75rem 2.5rem;
    }

    .content-card {
        padding: 1.5rem 1.25rem;
    }

    .content-cta {
        padding: 2rem 1.25rem;
    }

    .legal-content {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .contact-card {
        padding: 1.5rem 1.25rem;
    }

    .contact-form {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .faq-category-title {
        font-size: 1.1875rem;
    }

    .warning-box-large {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }

    .warning-icon {
        width: 3rem;
        height: 3rem;
    }

    .warning-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .warning-box-large h2 {
        font-size: 1.25rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 320px) {
    .page-main {
        padding: 1rem 0.5rem 2rem;
    }

    .page-title {
        font-size: 1.375rem;
    }

    .page-lead {
        font-size: 0.875rem;
    }

    .content-card {
        padding: 1.25rem 1rem;
    }

    .content-card h2 {
        font-size: 1.0625rem;
    }

    .content-section h2 {
        font-size: 1.125rem;
    }

    .legal-content {
        padding: 1rem;
    }

    .legal-section h2 {
        font-size: 1.0625rem;
    }

    .legal-section h3 {
        font-size: 0.9375rem;
    }

    .legal-section p,
    .legal-section ul,
    .legal-section li {
        font-size: 0.875rem;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-row input,
    .form-row select,
    .form-row textarea {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .faq-item summary {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .faq-content {
        padding: 0.875rem 1rem;
    }

    .warning-box-large h2 {
        font-size: 1.125rem;
    }

    .warning-box-large p {
        font-size: 0.875rem;
    }

    .site-footer {
        padding: 1.75rem 0.5rem 1rem;
    }

    .footer-main {
        gap: 1.5rem 0.75rem;
        margin-bottom: 1.5rem;
    }

    .footer-brand-name {
        font-size: 1.125rem;
    }

    .footer-brand-description {
        font-size: 0.75rem;
    }

    .footer-social-link {
        width: 2rem;
        height: 2rem;
    }

    .footer-social-link svg {
        width: 0.875rem;
        height: 0.875rem;
    }

    .footer-column h4 {
        font-size: 0.75rem;
    }

    .footer-column a {
        font-size: 0.75rem;
    }

    .footer-bottom {
        font-size: 0.6875rem;
    }
}
