/**
 * ============================================================================
 * STYLES PRINCIPAUX - FRANCE TRAVAIL PARTENAIRES
 * ============================================================================
 * Layout et styles spécifiques au portail
 */

/* ============================================================================
   1. STRUCTURE GÉNÉRALE
   ============================================================================ */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

/* ============================================================================
   2. HEADER & NAVIGATION PRINCIPALE
   ============================================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* Bandeau République Française */
.header-top {
    background-color: var(--white);
    border-bottom: var(--border-width) solid var(--grey-100);
}

.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-decoration: none;
    color: var(--grey-900);
}

.header-logo-rf {
    height: 56px;
    width: auto;
}

.header-logo-ft {
    height: 40px;
    width: auto;
}

.header-logo-separator {
    width: 1px;
    height: 40px;
    background-color: var(--grey-200);
}

.header-logo-text {
    display: flex;
    flex-direction: column;
}

.header-logo-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--ft-bleu-france);
    line-height: var(--leading-tight);
}

.header-logo-subtitle {
    font-size: var(--text-sm);
    color: var(--grey-600);
}

/* Quick links dans le header top */
.header-quick-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-quick-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--grey-700);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.header-quick-link:hover {
    background-color: var(--grey-50);
    color: var(--ft-bleu-france);
}

/* Navigation principale */
.header-nav {
    background-color: var(--ft-bleu-france);
}

.header-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-main {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-main-item {
    position: relative;
}

.nav-main-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    font-weight: var(--font-medium);
    color: var(--white);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.nav-main-link:hover,
.nav-main-link.is-active {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-main-link[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Dropdown navigation */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
}

.nav-main-item:hover .nav-dropdown,
.nav-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-list {
    list-style: none;
    margin: 0;
    padding: var(--space-2);
}

.nav-dropdown-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--grey-800);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.nav-dropdown-link:hover {
    background-color: var(--grey-50);
    color: var(--ft-bleu-france);
}

/* Bouton Connexion */
.nav-connect {
    margin-left: auto;
}

.btn-connect {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background-color: var(--white);
    color: var(--ft-bleu-france);
    font-weight: var(--font-medium);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-connect:hover {
    background-color: var(--ft-bleu-bg);
}

/* Menu mobile toggle */
.nav-toggle {
    display: none;
    padding: var(--space-2);
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

.nav-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
}

.nav-toggle-icon::before {
    top: -7px;
}

.nav-toggle-icon::after {
    bottom: -7px;
}

/* ============================================================================
   3. HERO SECTIONS
   ============================================================================ */

.hero {
    padding: var(--space-16) 0;
    background-color: var(--ft-bleu-bg);
}

.hero-home {
    position: relative;
    background: linear-gradient(135deg, var(--ft-bleu-france) 0%, #1212FF 100%);
    color: var(--white);
    overflow: hidden;
}

.hero-home::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-6);
    color: inherit;
}

.hero-subtitle {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-8);
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.hero-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40%;
    max-width: 500px;
    opacity: 0.2;
}

/* Hero pour les pages profils */
.hero-profile {
    padding: var(--space-12) 0;
}

.hero-profile-operateur {
    background: linear-gradient(135deg, var(--profil-operateur) 0%, #4a7a1f 100%);
    color: var(--white);
}

.hero-profile-decideur {
    background: linear-gradient(135deg, var(--profil-decideur) 0%, #7a3d76 100%);
    color: var(--white);
}

.hero-profile-technique {
    background: linear-gradient(135deg, var(--profil-technique) 0%, #2d5a9e 100%);
    color: var(--white);
}

/* ============================================================================
   4. SECTION ORIENTATION (Page d'accueil)
   ============================================================================ */

.orientation-section {
    padding: var(--space-16) 0;
    background-color: var(--white);
}

.orientation-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.orientation-question {
    font-size: var(--text-3xl);
    color: var(--ft-bleu-france);
    margin-bottom: var(--space-2);
}

.orientation-hint {
    font-size: var(--text-lg);
    color: var(--grey-600);
}

.orientation-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

.orientation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-8);
    background-color: var(--white);
    border: var(--border-width-2) solid var(--grey-200);
    border-radius: var(--radius-xl);
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-base);
}

.orientation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.orientation-card-operateur:hover {
    border-color: var(--profil-operateur);
}

.orientation-card-decideur:hover {
    border-color: var(--profil-decideur);
}

.orientation-card-technique:hover {
    border-color: var(--profil-technique);
}

.orientation-card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-full);
}

.orientation-card-operateur .orientation-card-icon {
    background-color: var(--profil-operateur-bg);
    color: var(--profil-operateur);
}

.orientation-card-decideur .orientation-card-icon {
    background-color: var(--profil-decideur-bg);
    color: var(--profil-decideur);
}

.orientation-card-technique .orientation-card-icon {
    background-color: var(--profil-technique-bg);
    color: var(--profil-technique);
}

.orientation-card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--grey-900);
    margin-bottom: var(--space-2);
}

.orientation-card-desc {
    font-size: var(--text-sm);
    color: var(--grey-600);
    margin-bottom: var(--space-4);
}

.orientation-card-examples {
    font-size: var(--text-xs);
    color: var(--grey-500);
}

/* ============================================================================
   5. GRILLE DES BESOINS (Pages profils)
   ============================================================================ */

.needs-section {
    padding: var(--space-12) 0;
}

.needs-title {
    font-size: var(--text-2xl);
    text-align: center;
    margin-bottom: var(--space-8);
}

.needs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.need-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background-color: var(--white);
    border: var(--border-width) solid var(--grey-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
}

.need-card:hover {
    border-color: var(--ft-bleu-france);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.need-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.need-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: var(--space-3);
    background-color: var(--ft-bleu-bg);
    border-radius: var(--radius-md);
    color: var(--ft-bleu-france);
}

.need-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--grey-900);
    line-height: var(--leading-tight);
}

.need-card-desc {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--grey-600);
    margin-bottom: var(--space-4);
}

.need-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--ft-bleu-france);
}

.need-card-link::after {
    content: "→";
    transition: transform var(--transition-fast);
}

.need-card:hover .need-card-link::after {
    transform: translateX(4px);
}

/* ============================================================================
   6. STORE DES SOLUTIONS
   ============================================================================ */

.solutions-section {
    padding: var(--space-12) 0;
    background-color: var(--grey-50);
}

.solutions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.solutions-title {
    font-size: var(--text-2xl);
    margin-bottom: 0;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
}

.solution-card {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--transition-base);
}

.solution-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.solution-card-image {
    height: 160px;
    background-color: var(--grey-100);
    overflow: hidden;
}

.solution-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.solution-card-body {
    flex: 1;
    padding: var(--space-5);
}

.solution-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.solution-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--grey-900);
    margin-bottom: var(--space-2);
}

.solution-card-desc {
    font-size: var(--text-sm);
    color: var(--grey-600);
    margin-bottom: var(--space-4);
}

.solution-card-footer {
    padding: var(--space-4) var(--space-5);
    border-top: var(--border-width) solid var(--grey-100);
    background-color: var(--grey-50);
}

.solution-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--ft-bleu-france);
}

/* ============================================================================
   7. PAGE DE BESOIN (Détail)
   ============================================================================ */

.need-page-header {
    padding: var(--space-10) 0;
    background-color: var(--grey-50);
    border-bottom: var(--border-width) solid var(--grey-200);
}

.need-page-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.need-page-intro {
    font-size: var(--text-lg);
    color: var(--grey-700);
    max-width: 800px;
}

.need-page-content {
    padding: var(--space-12) 0;
}

/* Section "Outils recommandés" */
.recommended-tools {
    margin-bottom: var(--space-12);
}

.recommended-tools-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.recommended-tools-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 24px;
    background-color: var(--ft-bleu-france);
    border-radius: var(--radius-sm);
}

/* Étapes / Guide */
.steps-guide {
    background-color: var(--white);
    border: var(--border-width) solid var(--grey-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.step-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: var(--border-width) solid var(--grey-100);
}

.step-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--ft-bleu-france);
    color: var(--white);
    font-weight: var(--font-bold);
    border-radius: var(--radius-full);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.step-desc {
    font-size: var(--text-sm);
    color: var(--grey-600);
}

/* ============================================================================
   8. CATALOGUE API
   ============================================================================ */

.api-catalog {
    padding: var(--space-12) 0;
}

.api-domain {
    margin-bottom: var(--space-8);
}

.api-domain-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background-color: var(--ft-bleu-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.api-domain-icon {
    width: 40px;
    height: 40px;
    padding: var(--space-2);
    background-color: var(--ft-bleu-france);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.api-domain-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin: 0;
}

.api-list {
    display: grid;
    gap: var(--space-4);
}

.api-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background-color: var(--white);
    border: var(--border-width) solid var(--grey-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.api-item:hover {
    border-color: var(--ft-bleu-france);
    box-shadow: var(--shadow-sm);
}

.api-item-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.api-item-method {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    font-family: var(--font-family-mono);
    border-radius: var(--radius-sm);
}

.api-item-method.get {
    background-color: #E3F4FE;
    color: #0063CB;
}

.api-item-method.post {
    background-color: #DFFEE6;
    color: #18753C;
}

.api-item-name {
    font-weight: var(--font-medium);
    color: var(--grey-900);
}

.api-item-version {
    font-size: var(--text-xs);
    color: var(--grey-500);
}

/* ============================================================================
   9. SIDEBAR (Pour pages documentation)
   ============================================================================ */

.page-with-sidebar {
    display: flex;
    gap: var(--space-8);
}

.sidebar {
    flex-shrink: 0;
    width: 280px;
    padding: var(--space-6) 0;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav-section {
    margin-bottom: var(--space-6);
}

.sidebar-nav-title {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grey-500);
    margin-bottom: var(--space-3);
}

.sidebar-nav-link {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--grey-700);
    text-decoration: none;
    border-left: var(--border-width-2) solid transparent;
    transition: all var(--transition-fast);
}

.sidebar-nav-link:hover {
    color: var(--ft-bleu-france);
    background-color: var(--ft-bleu-bg);
}

.sidebar-nav-link.is-active {
    color: var(--ft-bleu-france);
    border-left-color: var(--ft-bleu-france);
    background-color: var(--ft-bleu-bg);
    font-weight: var(--font-medium);
}

.page-content-main {
    flex: 1;
    min-width: 0;
    padding: var(--space-6) 0;
}

/* ============================================================================
   10. FOOTER
   ============================================================================ */

.site-footer {
    background-color: var(--grey-900);
    color: var(--white);
    padding-top: var(--space-12);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    padding-bottom: var(--space-10);
}

.footer-brand {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer-logo img {
    height: 48px;
}

.footer-desc {
    font-size: var(--text-sm);
    color: var(--grey-400);
    line-height: var(--leading-relaxed);
}

.footer-section {
    grid-column: span 1;
}

.footer-title {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-link {
    margin-bottom: var(--space-2);
}

.footer-link a {
    color: var(--grey-400);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-link a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6) 0;
    border-top: var(--border-width) solid var(--grey-800);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.footer-legal-link {
    color: var(--grey-500);
    text-decoration: none;
    font-size: var(--text-sm);
}

.footer-legal-link:hover {
    color: var(--white);
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--grey-500);
}

/* ============================================================================
   11. COMPOSANTS SPÉCIFIQUES
   ============================================================================ */

/* Encart d'aide contextuelle */
.help-box {
    padding: var(--space-5);
    background-color: var(--ft-info-bg);
    border: var(--border-width) solid var(--ft-info);
    border-radius: var(--radius-md);
}

.help-box-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--font-semibold);
    color: var(--ft-info);
    margin-bottom: var(--space-2);
}

.help-box-content {
    font-size: var(--text-sm);
    color: var(--grey-700);
}

/* Encart profil */
.profile-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.profile-indicator-operateur {
    background-color: var(--profil-operateur-bg);
    color: var(--profil-operateur);
}

.profile-indicator-decideur {
    background-color: var(--profil-decideur-bg);
    color: var(--profil-decideur);
}

.profile-indicator-technique {
    background-color: var(--profil-technique-bg);
    color: var(--profil-technique);
}

/* Quick stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    padding: var(--space-5);
    background-color: var(--white);
    border: var(--border-width) solid var(--grey-200);
    border-radius: var(--radius-lg);
    text-align: center;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--ft-bleu-france);
    line-height: var(--leading-none);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--grey-600);
}

/* CTA Banner */
.cta-banner {
    padding: var(--space-10);
    background: linear-gradient(135deg, var(--ft-bleu-france) 0%, #1212FF 100%);
    border-radius: var(--radius-xl);
    color: var(--white);
    text-align: center;
}

.cta-banner-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
    color: var(--white);
}

.cta-banner-text {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   12. ÉTATS & ANIMATIONS
   ============================================================================ */

/* Fade in au scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Highlight pour recherche */
.search-highlight {
    background-color: #FFF3B0;
    padding: 0 2px;
    border-radius: 2px;
}
