/*
 Theme Name:   Formations Poitiers Thème
 Theme URI:    https://formations-poitiers.fr
 Description:  Thème enfant pour le site formations-poitiers.fr
 Author:       Votre Nom
 Author URI:   https://today-works.fr
 Template:     blocksy
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, responsive-layout, accessibility-ready
 Text Domain:  formationspoitiers
*/

/* -------------------------------------------------------------------------
   Variables CSS - NOUVELLE PALETTE MODERNE
------------------------------------------------------------------------- */
:root {
    --primary-color: #8B5CF6; /* Violet moderne pour les liens et icônes */
    --primary-color-dark: #7C3AED;
    --accent-color: #F97316; /* Orange vibrant pour les boutons d'action (CTA) */
    --accent-color-dark: #EA580C;
    --secondary-color: #1F2937; /* Gris foncé pour le texte principal */
    --text-color-light: #6B7280; /* Gris clair pour les textes secondaires */
    --background-light: #F5F3FF; /* Arrière-plan violet très clair pour les sections */
    --background-accent: #FFF7ED; /* Arrière-plan orange très clair */
    --border-color: #E5E7EB; /* Couleur de bordure subtile */
    --shadow-light: 0 4px 10px rgba(0, 0, 0, 0.05); /* Ombre plus douce */
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.08); /* Ombre moyenne */
    --radius-default: 16px; /* Coins beaucoup plus arrondis */
    --font-family-sans: 'Inter', sans-serif;
}

/* -------------------------------------------------------------------------
   Styles Généraux
------------------------------------------------------------------------- */
body {
    font-family: var(--font-family-sans);
    color: var(--secondary-color);
    background-color: white;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-color-dark);
    text-decoration: none;
}

/* -------------------------------------------------------------------------
   Classes de couleurs Gutenberg
------------------------------------------------------------------------- */
.has-primary-color { color: var(--primary-color) !important; }
.has-secondary-color { color: var(--secondary-color) !important; }
.has-white-color { color: white !important; }

.has-background-light-background-color { background-color: var(--background-light) !important; }
.has-secondary-background-color { background-color: var(--secondary-color) !important; }
.has-background-accent-background-color { background-color: var(--background-accent) !important; }

/* -------------------------------------------------------------------------
   Homepage - Sections Spécifiques - V2
------------------------------------------------------------------------- */

/* Section Héros V2 */
.home-hero-section-v2 {
    position: relative;
    overflow: hidden;
}
.home-hero-section-v2 .wp-block-cover__inner-container {
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.home-hero-section-v2 h1 {
    font-size: clamp(2.8rem, 2.8rem + ((1vw - 0.2rem) * 3.571), 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.home-hero-section-v2 p.has-large-font-size {
    max-width: 700px;
    margin-bottom: 40px;
    font-size: 1.25rem;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Barre de recherche V2 */
.hero-search-bar-v2 {
    width: 100%;
    max-width: 800px;
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    background-color: white;
    border-radius: 9999px;
    padding: 8px;
    box-shadow: var(--shadow-medium);
    flex-wrap: wrap;
}
.hero-search-bar-v2 input[type="text"] {
    flex-grow: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    background: transparent;
    outline: none;
    color: var(--secondary-color);
}
.hero-search-bar-v2 input[type="text"]::placeholder {
    color: var(--text-color-light);
}
.hero-search-bar-v2 input[type="text"]:focus {
    box-shadow: none;
}
.hero-search-bar-v2 button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-search-bar-v2 button:hover {
    background-color: var(--accent-color-dark);
    transform: translateY(-2px);
}
.hero-search-bar-v2 button svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.hero-cta-buttons-v2 .wp-block-button__link {
    border-radius: 9999px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.hero-cta-buttons-v2 .wp-block-button.is-style-fill .wp-block-button__link {
    background-color: var(--primary-color);
    color: white !important;
    border: 2px solid var(--primary-color);
}
.hero-cta-buttons-v2 .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    box-shadow: var(--shadow-light);
}
.hero-cta-buttons-v2 .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: white !important;
    border: 2px solid white;
}
.hero-cta-buttons-v2 .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    box-shadow: var(--shadow-light);
}

/* Section Valeur Proposition */
.value-proposition-section h2 {
    margin-bottom: 20px;
}
.value-prop-card {
    background-color: white;
    border-radius: var(--radius-default);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.value-prop-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}
.value-prop-icon {
    color: var(--primary-color);
    margin-bottom: 20px;
}
.value-prop-icon svg {
    width: 60px;
    height: 60px;
}
.value-prop-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.value-prop-card p {
    color: var(--text-color-light);
    line-height: 1.6;
}

/* Barre des chiffres clés V2 */
.key-figures-section-v2 {
    background-color: white;
}
.key-figures-bar-v2 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}
.has-icon-figure-v2 {
    text-align: center;
    flex: 1;
    min-width: 200px;
}
.figure-icon-v2 {
    color: var(--accent-color);
    margin-bottom: 15px;
}
.figure-icon-v2 svg {
    width: 64px;
    height: 64px;
}
.key-figures-bar-v2 h3 {
    font-size: clamp(2.5rem, 2.5rem + ((1vw - 0.2rem) * 1.905), 3.5rem);
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--primary-color);
}
.key-figures-bar-v2 p {
    font-size: 1.1rem;
    color: var(--text-color-light);
}

/* Cartes Persona "Vous êtes..." V2 */
.persona-card-v2 {
    background-color: white;
    border-radius: var(--radius-default);
    border: 1px solid var(--border-color);
    padding: 30px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.persona-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}
.persona-icon-v2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}
.persona-icon-v2 svg {
    width: 48px;
    height: 48px;
}
.persona-card-v2 h3 a {
    font-size: clamp(1.1rem, 1.1rem + ((1vw - 0.2rem) * 0.406), 1.5rem);
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}
.persona-card-v2:hover h3 a {
    color: var(--primary-color-dark);
}
.persona-card-v2 p {
    color: var(--text-color-light);
    font-size: 0.95rem;
}

/* Section Comment ça marche ? */
.how-it-works-section {
    background-color: white;
}
.how-it-works-step {
    background-color: var(--background-light);
    border-radius: var(--radius-default);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.how-it-works-step:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}
.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1;
}
.step-icon {
    color: var(--primary-color);
    margin-bottom: 20px;
}
.step-icon svg {
    width: 56px;
    height: 56px;
}
.how-it-works-step h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.how-it-works-step p {
    color: var(--text-color-light);
    line-height: 1.6;
}

/* Cartes des domaines V2 */
.featured-domains-v2 .wp-block-column {
    padding: 10px;
}
.domain-card-v2 {
    position: relative;
    border-radius: var(--radius-default);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px;
    display: block;
}
.domain-card-v2:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-medium);
}
.domain-card-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.domain-card-v2:hover img {
    transform: scale(1.05);
}
.domain-card-v2 .domain-card-overlay-v2 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 40px 20px 20px;
    text-align: center;
    transition: background 0.3s ease;
}
.domain-card-v2:hover .domain-card-overlay-v2 {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
}
.domain-card-v2 .domain-card-overlay-v2 h3 a {
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}
.domain-card-v2:hover .domain-card-overlay-v2 h3 a {
    color: var(--accent-color);
}

/* Boutons "Voir tous les domaines" */
.view-all-domains-cta-v2 {
    margin-top: 60px;
}
.view-all-domains-cta-v2 .wp-block-button__link {
    border-radius: 9999px;
    padding: 12px 30px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    background-color: transparent;
    transition: all 0.3s ease;
}
.view-all-domains-cta-v2 .wp-block-button__link:hover {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: var(--shadow-light);
}

/* Section Dernières Formations V2 - RÈGLES NETTOYÉES */
.latest-formations-query-v2 .formation-grid-v2 {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.latest-formations-query-v2 .formation-grid-v2 > li {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex; /* Assure que la carte remplit l'espace de la grille */
}
.formation-card-item-v2 {
    background-color: white;
    border-radius: var(--radius-default);
    border: 1px solid var(--border-color);
    padding: 30px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.formation-card-item-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.formation-card-item-v2 .formation-title-v2 a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
}
.formation-card-item-v2 .formation-title-v2 a:hover {
    color: var(--primary-color);
}
.formation-card-item-v2 .formation-excerpt-v2 p {
    color: var(--text-color-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Pousse le contenu suivant vers le bas */
}
.formation-meta-v2 {
    margin-top: auto; /* Aligne les métadonnées en bas */
    padding-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
}
.meta-item-v2 {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-color-light);
}
.meta-item-v2 svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}
.formation-card-item-v2 .wp-block-buttons {
    margin-top: 20px;
}
.formation-card-item-v2 .wp-block-button__link {
    border-radius: 9999px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: white !important;
    transition: background-color 0.3s ease;
}
.formation-card-item-v2 .wp-block-button__link:hover {
    background-color: var(--primary-color-dark);
}

/* Pagination */
.wp-block-query-pagination {
    margin-top: 40px;
    margin-bottom: 40px;
}
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers {
    border-radius: var(--radius-default);
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    transition: all 0.2s ease;
}
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers.current,
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next {
    margin: 0 10px;
}
.wp-block-query-pagination .wp-block-query-pagination-previous a,
.wp-block-query-pagination .wp-block-query-pagination-next a {
    border-radius: var(--radius-default);
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    transition: all 0.2s ease;
}
.wp-block-query-pagination .wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination .wp-block-query-pagination-next a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Bouton "Voir toutes les formations" */
.view-all-formations-cta-v2 {
    margin-top: 40px;
}
.view-all-formations-cta-v2 .wp-block-button__link {
    border-radius: 9999px;
    padding: 12px 30px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    background-color: transparent;
    transition: all 0.3s ease;
}
.view-all-formations-cta-v2 .wp-block-button__link:hover {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: var(--shadow-light);
}

/* Section Témoignages */
.testimonials-section h2 {
    margin-bottom: 20px;
}
.testimonial-card {
    background-color: white;
    border-radius: var(--radius-default);
    padding: 30px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}
.testimonial-card p {
    font-style: italic;
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}
.testimonial-author {
    gap: 15px;
    margin-top: 20px;
    align-items: center;
}
.testimonial-author .wp-block-image img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}
.testimonial-author p {
    margin: 0;
    font-style: normal;
}
.testimonial-author p.has-small-font-size {
    font-weight: 600;
    color: var(--secondary-color);
}
.testimonial-author p.has-tiny-font-size {
    color: var(--text-color-light);
}

/* Section Partenaires */
.partners-section h2 {
    margin-bottom: 20px;
}
.partner-logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}
.partner-logo-grid .wp-block-column {
    flex-basis: auto;
    min-width: 120px;
    max-width: 180px;
    text-align: center;
}
.partner-logo-grid img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.partner-logo-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Section FAQ */
.faq-section h2 {
    margin-bottom: 20px;
}
.faq-accordion {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.faq-item {
    background-color: white;
    border-radius: var(--radius-default);
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    cursor: pointer;
    font-weight: 600;
    color: var(--secondary-color);
    transition: background-color 0.3s ease;
}
.faq-question:hover {
    background-color: var(--background-light);
}
.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    flex-grow: 1;
}
.faq-toggle-icon {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 30px;
    color: var(--text-color-light);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}
.faq-item.active .faq-answer {
    max-height: 200px; /* Augmentez si vos réponses sont plus longues */
    padding-bottom: 20px;
    padding-top: 10px;
}

/* Final CTA Section V2 */
.final-cta-section-v2 h2 {
    font-size: clamp(2rem, 2rem + ((1vw - 0.2rem) * 1.905), 3rem);
    margin-bottom: 20px;
}
.final-cta-section-v2 p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}
.final-cta-section-v2 .wp-block-buttons .wp-block-button__link {
    border-radius: 9999px;
    padding: 15px 35px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.final-cta-section-v2 .wp-block-button.is-style-fill .wp-block-button__link {
    background-color: var(--accent-color);
    color: white !important;
    border: 2px solid var(--accent-color);
}
.final-cta-section-v2 .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background-color: var(--accent-color-dark);
    border-color: var(--accent-color-dark);
    box-shadow: var(--shadow-light);
}
.final-cta-section-v2 .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: white !important;
    border: 2px solid white;
}
.final-cta-section-v2 .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    box-shadow: var(--shadow-light);
}

/* -------------------------------------------------------------------------
   Media Queries pour la Responsivité
------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .home-hero-section-v2 h1 {
        font-size: clamp(2rem, 2rem + ((1vw - 0.2rem) * 1.905), 3.5rem);
    }
    .home-hero-section-v2 p.has-large-font-size {
        font-size: 1rem;
    }
    .hero-search-bar-v2 {
        flex-direction: column;
        padding: 15px;
        border-radius: var(--radius-default);
    }
    .hero-search-bar-v2 input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-default);
    }
    .hero-search-bar-v2 button {
        width: 100%;
        border-radius: var(--radius-default);
    }
    .hero-cta-buttons-v2 .wp-block-button {
        width: 100%;
    }
    .hero-cta-buttons-v2 .wp-block-button__link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .key-figures-bar-v2 {
        flex-direction: column;
    }
    .has-icon-figure-v2 {
        margin-bottom: 30px;
    }

    .persona-navigation-v2 .wp-block-column,
    .featured-domains-v2 .wp-block-column,
    .how-it-works-section .wp-block-column {
        margin-bottom: 30px;
    }
    .persona-navigation-v2 .wp-block-column:last-child,
    .featured-domains-v2 .wp-block-column:last-child,
    .how-it-works-section .wp-block-column:last-child {
        margin-bottom: 0;
    }

    .latest-formations-query-v2 .formation-grid-v2 {
        grid-template-columns: 1fr;
    }
    .formation-card-content-v2 {
        flex-direction: column;
    }
    .formation-card-item-v2 .wp-block-buttons {
        justify-content: flex-start;
    }

    .testimonial-card {
        margin-bottom: 30px;
    }
    .testimonial-card:last-child {
        margin-bottom: 0;
    }

    .partner-logo-grid {
        gap: 20px;
    }
    .partner-logo-grid .wp-block-column {
        min-width: 100px;
        max-width: 150px;
    }

    .faq-question {
        padding: 15px 20px;
    }
    .faq-question h3 {
        font-size: 1rem;
    }
    .faq-answer {
        padding: 0 20px 15px;
    }
}

@media (max-width: 480px) {
    .home-hero-section-v2 h1 {
        font-size: 2.2rem;
    }
    .home-hero-section-v2 p.has-large-font-size {
        font-size: 0.9rem;
    }
    .hero-search-bar-v2 {
        padding: 0 20px;
    }
    .hero-cta-buttons-v2 {
        flex-direction: column;
        gap: 15px;
    }

    .value-prop-card, .persona-card-v2, .how-it-works-step, .testimonial-card {
        padding: 25px 20px;
    }
    .value-prop-icon svg, .figure-icon-v2 svg, .step-icon svg {
        width: 48px;
        height: 48px;
    }
    .step-number {
        font-size: 2rem;
    }

    .domain-card-v2 {
        height: 250px;
    }
    .domain-card-v2 .domain-card-overlay-v2 h3 a {
        font-size: 1.2rem;
    }

    .formation-card-item-v2 {
        padding: 20px;
    }
    .formation-card-item-v2 .formation-title-v2 a {
        font-size: 1.2rem;
    }
    .meta-item-v2 {
        font-size: 0.85rem;
    }

    .final-cta-section-v2 h2 {
        font-size: 1.8rem;
    }
    .final-cta-section-v2 p {
        font-size: 1rem;
    }
    .final-cta-section-v2 .wp-block-buttons {
        flex-direction: column;
        gap: 15px;
    }
}
