/* style.css */

/*--------------------------------------------------------------
# CSS Variables
--------------------------------------------------------------*/
:root {
    /* Fonts */
    --font-primary: 'Roboto', sans-serif; /* For headings */
    --font-secondary: 'Lato', sans-serif; /* For body text */

    /* Core Colors - Gradient Scheme */
    --color-primary-start: #6a11cb; /* Deep Purple */
    --color-primary-end: #2575fc;   /* Bright Blue */
    --color-primary-solid: #4a47a3; /* A solid derived color for buttons/accents */
    
    --color-accent-start: #ff6a00;  /* Vibrant Orange */
    --color-accent-end: #ee0979;    /* Hot Pink */
    --color-accent-solid: #f04e46;  /* A solid derived accent */

    /* Text Colors */
    --color-text-light: #ffffff;
    --color-text-medium: #f0f0f0;
    --color-text-dark: #363636; /* Bulma's default text color */
    --color-text-darker: #222222;
    --color-text-grey: #7a7a7a; /* Bulma's grey */

    /* Background Colors */
    --color-bg-light: #ffffff;
    --color-bg-medium-light: #f5f7fa; /* Slightly off-white for sections */
    --color-bg-dark: var(--color-text-darker);
    --color-bg-footer: #2c2c2c; /* Darker than default dark */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
    --gradient-accent: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
    
    /* Shadows & Borders */
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.12);
    --border-radius-small: 4px;
    --border-radius-medium: 8px;
    --border-radius-large: 16px;

    /* Transitions */
    --transition-smooth: all 0.3s ease-in-out;
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* For "hand-drawn" feel */

    /* Header height for content offset */
    --header-height: 52px; /* Bulma's default navbar height, adjust if custom */
    --header-height-offset: 100px; /* For privacy/terms page content (header height + extra space) */
}

/*--------------------------------------------------------------
# Global Styles
--------------------------------------------------------------*/
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-secondary);
    color: var(--color-text-dark);
    line-height: 1.7;
    background-color: var(--color-bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.title { /* Bulma title class */
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-text-darker);
    line-height: 1.3;
    margin-bottom: 0.75em; 
}

.subtitle {
    font-family: var(--font-secondary);
    color: var(--color-text-grey);
    font-weight: 400;
    line-height: 1.6;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-dark); 
}

a {
    color: var(--color-primary-solid);
    transition: var(--transition-smooth);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-end);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block; 
}

.main-wrapper {
    overflow-x: hidden; 
}

.section {
    padding: 4rem 1.5rem; 
}

.section-title {
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-text-darker);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05); 
}
.section .subtitle { 
    margin-bottom: 3rem;
    max-width: 700px; /* Constrain width of section subtitle */
    margin-left: auto;
    margin-right: auto;
}


/*--------------------------------------------------------------
# Buttons (Global)
--------------------------------------------------------------*/
.button, 
button, 
input[type="submit"], 
input[type="button"],
input[type="reset"] {
    font-family: var(--font-primary);
    font-weight: 700;
    padding: 0.8em 1.8em;
    border-radius: var(--border-radius-small);
    transition: var(--transition-bounce); 
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none; /* Remove default border for custom styling */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button.is-primary,
input[type="submit"].is-primary, /* Includes submit buttons in forms */
button.is-primary {
    background: var(--gradient-primary);
    background-size: 200% auto; 
    border-color: transparent;
    color: var(--color-text-light);
}

.button.is-primary:hover,
input[type="submit"].is-primary:hover,
button.is-primary:hover {
    background-position: right center; 
    color: var(--color-text-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.button.is-link.is-outlined {
    background-color: transparent;
    border: 2px solid var(--color-primary-solid);
    color: var(--color-primary-solid);
}
.button.is-link.is-outlined:hover {
    background-color: var(--color-primary-solid);
    color: var(--color-text-light);
    border-color: var(--color-primary-solid);
}

input.input,
textarea.textarea {
    font-family: var(--font-secondary);
    border-radius: var(--border-radius-small);
    border: 1px solid #dbdbdb; 
    box-shadow: inset 0 1px 2px rgba(10,10,10,.1);
    transition: var(--transition-smooth);
    padding: 0.75em 1em; /* Consistent padding */
}
input.input:focus,
textarea.textarea:focus {
    border-color: var(--color-primary-solid);
    box-shadow: 0 0 0 0.125em rgba(var(--color-primary-start, 0.25), 0.25); 
}
.label {
    font-family: var(--font-primary);
    color: var(--color-text-darker);
    font-weight: 700;
    margin-bottom: 0.5em;
}


/*--------------------------------------------------------------
# Header / Navbar
--------------------------------------------------------------*/
.header {
    background-color: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(8px); 
    box-shadow: var(--shadow-soft);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
}
.navbar-item img {
    max-height: 2.5rem; 
}
.navbar-item, .navbar-link {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-text-dark);
    transition: var(--transition-smooth);
}
.navbar-item:hover, .navbar-link:hover {
    background-color: transparent;
    color: var(--color-primary-solid);
}
.navbar-burger span {
    background-color: var(--color-text-darker);
    height: 2px; /* Thinner burger lines */
}
.navbar-menu {
    box-shadow: none; 
}
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--color-bg-light); 
        box-shadow: var(--shadow-soft);
        padding: 0.5rem 0;
    }
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
    /* background-image set in HTML with linear-gradient */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative; 
    color: var(--color-text-light); /* IMPORTANT: Hero text white */
}
#hero .hero-body {
    padding-top: calc(var(--header-height) + 3rem); 
    padding-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height)); /* Ensure it's almost full viewport */
}
#hero .title {
    color: var(--color-text-light) !important; /* Ensure override */
    font-size: 3.2rem; 
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
#hero .subtitle {
    color: var(--color-text-medium) !important; /* Ensure override */
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Form Box */
.form-box {
    background: rgba(255, 255, 255, 0.92); 
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius-medium);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
}
.form-box .title {
    color: var(--color-text-darker) !important; 
    text-shadow: none;
}
.form-box .label {
    color: var(--color-text-dark);
}

/*--------------------------------------------------------------
# Parallax Effect (Example - JS might be needed for true parallax)
--------------------------------------------------------------*/
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/*--------------------------------------------------------------
# Card Styles (General)
--------------------------------------------------------------*/
.card {
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-bounce);
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    text-align: left; 
}
.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-medium);
}
.card .card-image { 
    border-top-left-radius: var(--border-radius-medium);
    border-top-right-radius: var(--border-radius-medium);
    overflow: hidden; 
    height: 220px; /* Fixed height for image containers */
    width: 100%;
    /* display: flex;  */
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0; /* Placeholder bg color for images */
}
.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the area */
    display: block; 
}
.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}
.card .card-content .title,
.card .card-content .subtitle {
    margin-bottom: 0.75rem;
}
.card .card-content p {
    font-size: 0.95rem; /* Slightly smaller text in cards */
    color: var(--color-text-grey);
}
.card .card-content p:last-child {
    margin-bottom: 0;
}

/* STROGO: For cards that need centered content */
.card.is-content-centered, 
.item.is-content-centered, 
.testimonial.is-content-centered, 
.team-member.is-content-centered, 
.product-card.is-content-centered {
    align-items: center; /* Center flex items (card-image, card-content) */
    text-align: center;
}
.card.is-content-centered .card-content {
    align-items: center; /* For content within card-content */
}
.card.is-content-centered .card-image img { /* Ensure image itself is centered if container is */
    margin-left: auto;
    margin-right: auto;
}

/*--------------------------------------------------------------
# Statistics Section
--------------------------------------------------------------*/
#statistics .stat-card {
    text-align: center;
    padding: 1rem; /* Extra padding inside stat card */
}
#statistics .stat-card .title.is-1 {
    color: var(--color-primary-solid);
    margin-bottom: 0.5rem;
    font-size: 3.5rem;
}
#statistics .stat-card .subtitle.is-4 {
    color: var(--color-text-darker);
    margin-bottom: 1rem;
    font-weight: 700;
}
#statistics .stat-card p {
    font-size: 0.9rem;
}
#statistics .stat-card .progress {
    height: 0.75rem;
    border-radius: var(--border-radius-small);
    background-color: #e9ecef; /* Lighter background for progress bar */
}
#statistics .stat-card .progress::-webkit-progress-value {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-small);
}
#statistics .stat-card .progress::-moz-progress-bar {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-small);
}
#statistics .stat-card .progress::-ms-fill {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-small);
}

/*--------------------------------------------------------------
# Projects, Portfolio, Resources (Image Cards)
--------------------------------------------------------------*/
#projects .project-card .card-content .title,
#portfolio .portfolio-card .card-content .title,
#resources .resource-card .card-content .title {
    margin-bottom: 0.5rem;
    font-size: 1.2rem; /* Slightly smaller titles in these cards */
}
#resources .resource-card .button {
    margin-top: 1rem; /* Ensure space above button */
}

/*--------------------------------------------------------------
# Instructors Section
--------------------------------------------------------------*/
#instructors .instructor-card {
    text-align: center;
}
#instructors .instructor-card .card-image {
    height: auto; 
    padding: 1rem; 
    display: flex;
    justify-content: center; 
}
#instructors .instructor-card .card-image figure.image.is-1by1 { 
   width: 160px; 
   height: 160px;
   margin: 0 auto; 
}
#instructors .instructor-card .card-image img.is-rounded {
    border: 5px solid var(--color-bg-light); 
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#instructors .instructor-card .card-content {
    padding-top: 0.5rem; /* Less padding if image is main focus */
}
#instructors .instructor-card .title.is-5 {
    margin-bottom: 0.25rem;
}
#instructors .instructor-card .subtitle.is-6 {
    color: var(--color-primary-solid);
    margin-bottom: 0.5rem;
    font-weight: 700;
}
#instructors .instructor-card p.is-size-7 {
    font-size: 0.85rem !important;
}

/*--------------------------------------------------------------
# External Resources Section
--------------------------------------------------------------*/
#external-resources .resource-link-card {
    border-left: 4px solid var(--color-primary-start);
    background-color: var(--color-bg-medium-light);
}
#external-resources .resource-link-card .title a {
    color: var(--color-primary-solid);
    font-weight: 700;
    font-size: 1.1rem;
}
#external-resources .resource-link-card .title a:hover {
    color: var(--color-primary-end);
}
#external-resources .resource-link-card p {
    font-size: 0.9rem;
}

/*--------------------------------------------------------------
# Research Section
--------------------------------------------------------------*/
#research .research-item {
    background-color: var(--color-bg-medium-light); 
    border-radius: var(--border-radius-medium);
}
#research .research-item .title {
    color: var(--color-text-darker);
    font-size: 1.3rem;
}
#research img[alt="Graphique abstrait de recherche en IA"] {
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-soft);
    margin: 1rem auto; 
    max-width: 500px;
}

/*--------------------------------------------------------------
# Press Section
--------------------------------------------------------------*/
#press .press-mention {
    background-color: var(--color-bg-light);
    border-left: 5px solid var(--color-accent-solid); /* Use accent color for press */
    padding: 1.5rem;
    border-radius: var(--border-radius-small);
}
#press .press-mention .title.is-5 {
    color: var(--color-accent-solid); 
    margin-bottom: 0.5rem;
}
#press .press-mention .is-size-7 {
    color: var(--color-text-grey);
}

/*--------------------------------------------------------------
# FAQ Section
--------------------------------------------------------------*/
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    margin-bottom: 1rem;
    border-radius: var(--border-radius-small);
    overflow: hidden; 
    box-shadow: var(--shadow-soft);
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.2rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    background-color: var(--color-bg-light);
    color: var(--color-text-darker);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border-radius: var(--border-radius-small); 
}
.faq-question:hover {
    background-color: #f9f9f9; 
}
.faq-question .faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    font-weight: 300; 
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    background-color: #fdfdfd; 
}
.faq-answer .box { 
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid #eee;
    padding: 1.5rem;
}
.faq-item.active .faq-question {
    background-color: #f0f2f5; 
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}


/*--------------------------------------------------------------
# Contact Section (Index Page & contacts.html)
--------------------------------------------------------------*/
#contact .contact-info-box {
    text-align: left;
    padding: 2rem;
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-soft);
}
#contact .contact-info-box strong {
    color: var(--color-text-darker);
}
#contact .contact-info-box p {
    margin-bottom: 0.5rem;
}
#contact img[alt="Illustration de contact et support client"] {
    max-width: 400px;
    margin: 1.5rem auto 0 auto;
}

/* Specific to contacts.html page */
.contact-page-section { 
    padding-top: var(--header-height-offset); 
    padding-bottom: 3rem; /* Ensure content doesn't touch footer */
}
.contact-page-section .map-container iframe {
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-soft);
    width: 100%;
    min-height: 350px;
    border: 0; /* Remove default iframe border */
}
.contact-page-section .form-box { 
    margin-top: 2rem;
}


/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
    background-color: var(--color-bg-footer);
    color: var(--color-text-medium);
    padding: 3rem 1.5rem 1.5rem; 
}
.footer .title {
    color: var(--color-text-light) !important;
}
.footer a {
    color: var(--color-text-medium);
    font-weight: 500;
}
.footer a:hover {
    color: var(--color-primary-solid);
    text-decoration: underline;
}
.footer ul {
    list-style: none;
    padding-left: 0;
}
.footer ul li {
    margin-bottom: 0.5rem;
}
.footer hr {
    background-color: #4a4a4a; 
    height: 1px;
    margin: 2rem 0;
}
.footer .has-text-centered.is-size-7 {
    color: #aaa; 
}
.footer .column:last-child ul li a { /* Social links */
    padding: 0.25rem 0;
    display: inline-block; 
}

/*--------------------------------------------------------------
# Success Page
--------------------------------------------------------------*/
body.success-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--gradient-primary); 
}
.success-page .main-wrapper { 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.success-page .header, .success-page .footer {
    flex-shrink: 0; 
}
.success-page .success-content-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.success-page .success-box {
    background-color: var(--color-bg-light);
    padding: 3rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    max-width: 600px;
    width: 100%;
}
.success-page .success-box .title {
    color: var(--color-primary-solid) !important;
    margin-bottom: 1rem;
}
.success-page .success-box p {
    color: var(--color-text-dark);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.success-page .success-box .button {
    min-width: 200px; 
}

/*--------------------------------------------------------------
# Privacy & Terms Pages
--------------------------------------------------------------*/
body.privacy-page .main-content-area, 
body.terms-page .main-content-area {
    padding-top: var(--header-height-offset); 
    padding-bottom: 3rem;
}
/* Ensure the .container within .main-content-area is used for width constraint */
.main-content-area .container .title.is-1 { 
    margin-bottom: 2rem;
    padding-top: 1rem; 
}
.main-content-area .container h2, 
.main-content-area .container .title.is-3 { 
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-darker);
    font-size: 1.75rem;
}
.main-content-area .container ul {
    list-style: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}
.main-content-area .container p {
    margin-bottom: 1rem;
}

/*--------------------------------------------------------------
# Animations & Scroll Effects
--------------------------------------------------------------*/
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animated-text, .animated-form {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}
.animated-text.animate-in, 
.animated-form.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animated-text.animate-in { transition-delay: 0.2s; } 
.animated-form.animate-in { transition-delay: 0.5s; }

.animated-number {
    /* JS will handle number animation */
    transition: all 0.5s ease-out; /* For any CSS changes to the number */
}


/*--------------------------------------------------------------
# Responsive Adjustments (Complementing Bulma)
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }
    #hero .title {
        font-size: 2.5rem;
    }
    #hero .subtitle {
        font-size: 1.1rem;
    }
    .columns.is-centered .column.is-two-thirds { 
        width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .form-box {
        padding: 1.5rem;
    }

    #statistics .stat-card .title.is-1 {
        font-size: 2.8rem;
    }

    .columns.is-multiline .column {
        margin-bottom: 1.5rem;
    }
     .footer .columns {
        text-align: center;
    }
    .footer .column {
        margin-bottom: 1.5rem;
    }
    .main-content-area .container .title.is-1 {
        font-size: 2.2rem;
    }
    .main-content-area .container h2, 
    .main-content-area .container .title.is-3 {
        font-size: 1.5rem;
    }
}


/* Text on background images already handled by linear-gradient in HTML for hero */

/* Darkened titles for sections */
.section-title { /* Already styled, this is a reminder */
    color: var(--color-text-darker) !important; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1); 
}
.has-text-white { /* For elements that need white text, like hero */
    color: var(--color-text-light) !important;
}
.has-text-grey-darker {
    color: var(--color-text-darker) !important;
}
.has-text-grey {
    color: var(--color-text-grey) !important;
}
.has-text-primary {
    color: var(--color-primary-solid) !important;
}

/* Read More Link Styling */
.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-primary-solid);
    text-decoration: none;
    position: relative; 
    padding-bottom: 3px; /* Space for the underline */
}
.read-more-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-solid);
    transition: width 0.3s ease-in-out;
}
.read-more-link:hover::after {
    width: 100%;
}
.read-more-link:hover {
    color: var(--color-primary-end);
    text-decoration: none; 
}