/**
 * Styles globaux — fidèle au module Entreprises (bloc bleu recherche, cartes, boutons).
 * À charger après ovh-theme.css et Bootstrap.
 */

/* -------------------------------------------------------------------------- */
/* Layout */
/* -------------------------------------------------------------------------- */

.app-layout {
    --app-radius: var(--ovh-radius, 12px);
    --app-radius-lg: var(--ovh-radius-lg, 20px);
    --app-radius-pill: var(--ovh-radius-pill, 999px);
}

.app-toolbar {
    border-bottom: 1px solid rgba(18, 63, 109, 0.08);
    background: #fff;
    box-shadow: 0 1px 0 rgba(18, 63, 109, 0.06);
    backdrop-filter: blur(8px);
    transition: box-shadow 0.2s ease;
}

.app-footer {
    border-color: rgba(18, 63, 109, 0.08) !important;
}

/* -------------------------------------------------------------------------- */
/* Cartes */
/* -------------------------------------------------------------------------- */

.app-card-elevated {
    border-radius: var(--app-radius);
    border: 1px solid rgba(18, 63, 109, 0.08);
    box-shadow: 0 4px 24px rgba(18, 63, 109, 0.08);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.app-card-elevated:hover {
    box-shadow: var(--ovh-shadow-hover);
}

.app-card-elevated .card-head {
    border-bottom: 1px solid rgba(18, 63, 109, 0.08);
    padding-bottom: 1rem;
    margin-bottom: 0;
}

.app-card-placeholder {
    border-radius: var(--app-radius);
    border: 1px solid rgba(18, 63, 109, 0.08);
    box-shadow: 0 2px 16px rgba(18, 63, 109, 0.06);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.app-card-placeholder:hover {
    box-shadow: var(--ovh-shadow-hover);
}

/* Titres de page */
.app-heading-title {
    color: var(--ovh-blue-dark, #123f6d);
}

/* Hub — cartes modules */
.app-layout .hub-card-ovh {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.app-layout a:hover .hub-card-ovh {
    box-shadow: var(--ovh-shadow-hover);
    transform: translateY(-2px);
}

.app-page-entreprises .entreprises-history-card {
    border-radius: var(--app-radius);
    border: 1px solid rgba(18, 63, 109, 0.08);
}

/* -------------------------------------------------------------------------- */
/* Tableaux */
/* -------------------------------------------------------------------------- */

.app-layout .entreprises-table,
.app-layout .table-app {
    font-size: 0.9375rem;
}

.app-layout .entreprises-table thead th,
.app-layout .table-app thead th {
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ovh-blue-dark, #123f6d) !important;
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
    border-bottom: 2px solid rgba(0, 80, 215, 0.2);
    white-space: nowrap;
}

.app-layout .entreprises-table tbody td,
.app-layout .table-app tbody td {
    vertical-align: middle;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-color: rgba(18, 63, 109, 0.06);
}

.app-layout .entreprises-table tbody tr:hover,
.app-layout .table-app tbody tr:hover {
    background-color: rgba(0, 80, 215, 0.06) !important;
}

.app-layout .table-dashboard thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ovh-blue-dark);
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
    border-bottom: 2px solid rgba(0, 80, 215, 0.15);
}

.app-layout .table-dashboard tbody tr {
    transition: background-color 0.15s ease;
}

.app-layout .table-dashboard tbody tr:hover {
    background-color: rgba(0, 80, 215, 0.06);
}

/* -------------------------------------------------------------------------- */
/* Badges score */
/* -------------------------------------------------------------------------- */

.app-layout .entreprises-score-cell .badge,
.app-layout .app-score-badge-wrap .badge {
    font-size: 0.8rem;
    padding: 0.45em 0.75em;
    font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* Boutons */
/* -------------------------------------------------------------------------- */

.app-layout .btn-rounded,
.app-layout .btn-app-rounded {
    border-radius: var(--app-radius-pill) !important;
}

.app-layout .btn-ovh-outline.btn-sm,
.app-layout .btn-ovh-primary.btn-sm {
    border-radius: var(--app-radius);
}

/* -------------------------------------------------------------------------- */
/* Formulaires (hors hero search) */
/* -------------------------------------------------------------------------- */

.app-layout .form-control:not(.entreprises-search-form .form-control):not(.app-hero-search-form .form-control),
.app-layout .form-select:not(.app-hero-control) {
    border-radius: var(--ovh-radius, 8px);
    border-color: var(--ovh-border);
}

.app-layout .form-control:focus,
.app-layout .form-select:focus {
    border-color: var(--ovh-blue);
    box-shadow: 0 0 0 3px rgba(0, 80, 215, 0.15);
}

/* -------------------------------------------------------------------------- */
/* Dashboard */
/* -------------------------------------------------------------------------- */

.app-page-dashboard .dashboard-kpi .card-ovh {
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    border-radius: var(--app-radius);
}

.app-page-dashboard .dashboard-kpi .card-ovh:hover {
    box-shadow: var(--ovh-shadow-hover);
}

.app-page-dashboard .chart-wrap {
    position: relative;
    min-height: 280px;
}

/* -------------------------------------------------------------------------- */
/* Hero — thème brand (carte bleue, défaut) | thème light (carte blanche) */
/* -------------------------------------------------------------------------- */

.app-hero-search-inner {
    padding: 0;
}

.hero-search-form-stack {
    max-width: 420px;
}

/* --- Thème brand (OVH / Planning / Entreprises unifié) --- */

.hero-search.app-hero-search-wrap.app-hero-search-wrap--brand {
    background: var(--ovh-hero-gradient, linear-gradient(135deg, #0050d7, #003ea8));
    padding: 2.5rem 1.25rem;
    border-radius: var(--ovh-radius-xl, 24px);
    color: #fff;
    text-align: center;
    margin-bottom: 1.75rem;
    box-shadow: 0 12px 40px rgba(18, 63, 109, 0.22);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.hero-search.app-hero-search-wrap.app-hero-search-wrap--brand:hover {
    box-shadow: 0 16px 48px rgba(18, 63, 109, 0.28);
}

@media (min-width: 768px) {
    .hero-search.app-hero-search-wrap.app-hero-search-wrap--brand {
        padding: 3rem 2rem;
    }
}

.hero-search.app-hero-search-wrap--brand h1.hero-search-title,
.hero-search.app-hero-search-wrap--brand h1 {
    color: #fff !important;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-search.app-hero-search-wrap--brand .hero-lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.hero-search.app-hero-search-wrap--brand .hero-search-icon {
    font-size: 2.75rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.hero-search.app-hero-search-wrap--brand input,
.hero-search.app-hero-search-wrap--brand .form-control,
.hero-search.app-hero-search-wrap--brand .form-select.app-hero-control {
    min-height: 50px;
    border-radius: 999px;
    border: none;
    padding: 0.65rem 1.35rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.hero-search.app-hero-search-wrap--brand .form-control:focus,
.hero-search.app-hero-search-wrap--brand .form-select.app-hero-control:focus {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.hero-search.app-hero-search-wrap--brand .btn,
.hero-search.app-hero-search-wrap--brand .hero-search-submit {
    min-height: 50px;
    border-radius: 999px;
    padding: 0.65rem 1.75rem;
    background: #fff !important;
    color: #0050d7 !important;
    font-weight: 700;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 80, 215, 0.35);
    transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.hero-search.app-hero-search-wrap--brand .btn:hover,
.hero-search.app-hero-search-wrap--brand .hero-search-submit:hover {
    background: #f8f9fa !important;
    color: #003ea8 !important;
    box-shadow: 0 6px 20px rgba(0, 80, 215, 0.4);
    transform: translateY(-1px);
}

.hero-search.app-hero-search-wrap--brand .hero-search-footnote {
    color: rgba(255, 255, 255, 0.78);
}

/* --- Thème light (optionnel : $heroTheme = 'light') --- */

.hero-search.app-hero-search-wrap.app-hero-search-wrap--light {
    background: #fff;
    padding: 2rem 1.25rem;
    border-radius: var(--ovh-radius-lg, 20px);
    border: 1px solid rgba(18, 63, 109, 0.1);
    color: var(--ovh-text, #1a1a1a);
    text-align: center;
    margin-bottom: 1.75rem;
    box-shadow: 0 4px 24px rgba(18, 63, 109, 0.08);
}

.hero-search.app-hero-search-wrap--light h1.hero-search-title,
.hero-search.app-hero-search-wrap--light h1 {
    color: var(--ovh-text, #1a1a1a) !important;
    font-weight: 700;
}

.hero-search.app-hero-search-wrap--light .hero-lead {
    color: #5c6b7a;
    font-size: 1.05rem;
}

.hero-search.app-hero-search-wrap--light .hero-search-icon {
    font-size: 2.5rem;
    color: var(--ovh-blue, #0050d7);
}

.hero-search.app-hero-search-wrap--light input,
.hero-search.app-hero-search-wrap--light .form-control {
    min-height: 50px;
    border-radius: var(--ovh-radius, 12px);
    border: 1px solid var(--ovh-border, #dde4ed);
    padding: 0.65rem 1rem;
}

.hero-search.app-hero-search-wrap--light .btn,
.hero-search.app-hero-search-wrap--light .hero-search-submit {
    min-height: 50px;
    border-radius: var(--ovh-radius, 12px);
    background: rgba(0, 80, 215, 0.1) !important;
    color: var(--ovh-blue, #0050d7) !important;
    font-weight: 600;
    border: 1px solid rgba(0, 80, 215, 0.25) !important;
}

.hero-search.app-hero-search-wrap--light .hero-search-footnote {
    color: #5c6b7a;
}

/* Cartes dans l’app (fond gris page + cartes blanches ombrées) */
.app-layout .card {
    border-radius: var(--app-radius-lg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(18, 63, 109, 0.06);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.app-layout .card:hover {
    box-shadow: 0 8px 22px rgba(18, 63, 109, 0.1);
}

/* -------------------------------------------------------------------------- */
/* Kanban — colonnes teintées, cartes, drag */
/* -------------------------------------------------------------------------- */

.app-page-kanban .kanban-board-wrap {
    border-radius: var(--app-radius-lg);
}

.app-page-kanban .kanban-column-title {
    letter-spacing: 0.06em;
    font-size: 0.72rem;
}

.app-page-kanban .kanban-column--todo .kanban-column-head {
    background: linear-gradient(180deg, rgba(0, 80, 215, 0.12) 0%, rgba(0, 80, 215, 0.06) 100%);
    border-bottom: 1px solid rgba(0, 80, 215, 0.2);
    color: var(--ovh-blue-dark);
}

.app-page-kanban .kanban-column--todo .kanban-count {
    background: rgba(0, 80, 215, 0.15);
    color: var(--ovh-blue-dark);
}

.app-page-kanban .kanban-column--doing .kanban-column-head {
    background: linear-gradient(180deg, rgba(255, 159, 28, 0.2) 0%, rgba(255, 159, 28, 0.08) 100%);
    border-bottom: 1px solid rgba(200, 120, 0, 0.25);
    color: #8a5a00;
}

.app-page-kanban .kanban-column--doing .kanban-count {
    background: rgba(255, 159, 28, 0.25);
    color: #6b4700;
}

.app-page-kanban .kanban-column--done .kanban-column-head {
    background: linear-gradient(180deg, rgba(34, 139, 34, 0.14) 0%, rgba(34, 139, 34, 0.06) 100%);
    border-bottom: 1px solid rgba(34, 139, 34, 0.22);
    color: #1d6b1d;
}

.app-page-kanban .kanban-column--done .kanban-count {
    background: rgba(34, 139, 34, 0.18);
    color: #1d5a1d;
}

.app-page-kanban .kanban-list {
    min-height: 140px;
    background: rgba(245, 247, 250, 0.6);
    transition: background 0.2s ease;
}

.app-page-kanban .kanban-list--readonly {
    opacity: 0.92;
}

.app-page-kanban .kanban-card-inner {
    cursor: grab;
    border-color: rgba(18, 63, 109, 0.1) !important;
}

.app-page-kanban .kanban-list:not(.kanban-list--readonly) .kanban-card-inner:hover {
    box-shadow: 0 6px 18px rgba(18, 63, 109, 0.12) !important;
    border-color: rgba(0, 80, 215, 0.2) !important;
}

.app-page-kanban .kanban-card-title {
    color: var(--ovh-text);
    line-height: 1.45;
    font-weight: 500;
}

.app-page-kanban .kanban-sortable-ghost {
    opacity: 0.45;
}

.app-page-kanban .kanban-sortable-drag {
    opacity: 0.95;
}
