/* ============================================
   ELM Pro - Components Stylesheet
   ============================================ */

/* ============================================
   Competitors
   ============================================ */
.competitors-grid {
    display: grid;
    gap: 1rem;
}

.competitor-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    border: 2px solid transparent;
    transition: var(--transition);
}

.competitor-card:hover {
    border-color: var(--primary);
}

.competitor-card.franchise {
    border-left: 4px solid var(--danger);
}

.competitor-card.independant {
    border-left: 4px solid var(--success);
}

.competitor-card.association {
    border-left: 4px solid var(--info);
}

.competitor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.competitor-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.competitor-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    background: var(--white);
}

.competitor-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.competitor-card:hover .competitor-remove {
    opacity: 1;
}

.competitor-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.competitor-detail {
    display: flex;
    flex-direction: column;
}

.competitor-detail label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.competitor-detail input,
.competitor-detail select {
    padding: 0.5rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background: var(--white);
}

.competitor-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.competitor-rating .stars {
    color: var(--warning);
}

.competitor-rating span {
    font-size: 0.9rem;
    color: var(--gray);
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.benchmark-summary {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, var(--light) 100%);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.benchmark-summary h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.benchmark-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.benchmark-stat {
    text-align: center;
}

.benchmark-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.benchmark-stat .label {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ============================================
   SWOT Matrix
   ============================================ */
.swot-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.swot-quadrant {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.swot-quadrant.strengths {
    background: linear-gradient(135deg, #d5f5e3 0%, #abebc6 100%);
    border: 2px solid var(--success);
}

.swot-quadrant.weaknesses {
    background: linear-gradient(135deg, #fadbd8 0%, #f5b7b1 100%);
    border: 2px solid var(--danger);
}

.swot-quadrant.opportunities {
    background: linear-gradient(135deg, #d4efdf 0%, #a9dfbf 100%);
    border: 2px solid #27ae60;
}

.swot-quadrant.threats {
    background: linear-gradient(135deg, #fdebd0 0%, #f9e79f 100%);
    border: 2px solid var(--warning);
}

.swot-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.swot-header i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    display: block;
}

.swot-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.swot-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
}

.swot-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.swot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.swot-item button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.5;
    transition: var(--transition);
}

.swot-item:hover button {
    opacity: 1;
}

.swot-input {
    display: flex;
    gap: 0.5rem;
}

.swot-input input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.swot-input button {
    padding: 0.5rem 0.75rem;
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.swot-input button:hover {
    background: var(--primary);
}

/* ============================================
   Calculator
   ============================================ */
.potential-calculator {
    background: linear-gradient(135deg, #fafbfc 0%, var(--light) 100%);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.calc-row:last-child {
    margin-bottom: 0;
}

.calc-item {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    min-width: 120px;
}

.calc-item.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.calc-item.highlight.success {
    background: linear-gradient(135deg, var(--success) 0%, #219a52 100%);
}

.calc-item label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.calc-item input {
    width: 80px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.calc-result {
    font-size: 1.25rem;
    font-weight: 700;
}

.calc-result.big {
    font-size: 1.5rem;
}

.calc-operator {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray);
}

/* ============================================
   Business Plan
   ============================================ */
.business-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.bp-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.bp-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bp-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.bp-item label {
    font-size: 0.9rem;
}

.bp-item input {
    width: 120px;
    text-align: right;
    padding: 0.5rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
}

.bp-item.total {
    background: var(--dark);
    color: var(--white);
    font-weight: 600;
}

.bp-item.total span {
    font-size: 1.1rem;
}

.forecast-inputs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.forecast-inputs .form-group {
    flex: 1;
    min-width: 150px;
}

/* ============================================
   KPI Grid
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.kpi-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--gray);
}

.kpi-card.go-nogo {
    background: var(--gray-light);
}

.kpi-card.go-nogo.go {
    background: var(--success);
    color: var(--white);
}

.kpi-card.go-nogo.go .kpi-value,
.kpi-card.go-nogo.go .kpi-label {
    color: var(--white);
}

.kpi-card.go-nogo.nogo {
    background: var(--danger);
    color: var(--white);
}

.kpi-card.go-nogo.nogo .kpi-value,
.kpi-card.go-nogo.nogo .kpi-label {
    color: var(--white);
}

/* ============================================
   Scoring
   ============================================ */
.global-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
}

.score-gauge {
    width: 200px;
    height: 200px;
}

.score-gauge svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--light);
    stroke-width: 15;
}

.score-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 15;
    stroke-linecap: round;
    stroke-dasharray: 565;
    stroke-dashoffset: 565;
    transition: stroke-dashoffset 1s ease;
}

.score-text {
    font-size: 3rem;
    font-weight: 700;
    fill: var(--dark);
    transform: rotate(90deg);
    text-anchor: middle;
    dominant-baseline: middle;
}

.score-label {
    font-size: 1rem;
    fill: var(--gray);
    transform: rotate(90deg);
    text-anchor: middle;
}

.score-verdict {
    text-align: center;
}

.score-verdict h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.score-verdict.excellent h3 { color: var(--success); }
.score-verdict.good h3 { color: #27ae60; }
.score-verdict.average h3 { color: var(--warning); }
.score-verdict.poor h3 { color: var(--danger); }

.radar-container {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-item {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1rem;
}

.score-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.score-item-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-item-name i {
    color: var(--primary);
}

.score-item-value {
    font-weight: 700;
    color: var(--primary);
}

.score-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.recommendation.positive {
    border-left-color: var(--success);
}

.recommendation.negative {
    border-left-color: var(--danger);
}

.recommendation.neutral {
    border-left-color: var(--warning);
}

.recommendation i {
    font-size: 1.25rem;
}

.recommendation.positive i { color: var(--success); }
.recommendation.negative i { color: var(--danger); }
.recommendation.neutral i { color: var(--warning); }

.recommendation-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.recommendation-content p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ============================================
   Optional Sections & Toggle Switch
   ============================================ */
.optional-section .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.optional-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.optional-label {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: normal;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #bdc3c7;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Optional disabled message */
.optional-disabled {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-radius: 0 0 16px 16px;
}

.optional-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    color: #7f8c8d;
}

.optional-message i {
    font-size: 2rem;
    color: #bdc3c7;
}

.optional-message p {
    margin: 0;
    font-style: italic;
}

/* ============================================
   Export Options
   ============================================ */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.export-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.export-btn:hover {
    border-color: var(--primary);
    background: var(--white);
}

.export-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.export-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

.export-btn i {
    font-size: 2rem;
}

.export-btn span {
    font-size: 0.9rem;
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: var(--light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.view-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   Share Modal
   ============================================ */
.share-option {
    margin-bottom: 1.5rem;
}

.share-option h4 {
    margin-bottom: 0.75rem;
}

.share-link-container {
    display: flex;
    gap: 0.5rem;
}

.share-link-container input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.share-link-container button {
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

/* ============================================
   Placeholder
   ============================================ */
.placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    font-style: italic;
}

/* ============================================
   Section Rapport Ultra Moderne
   ============================================ */
.report-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 25px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.report-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.report-hero-icon {
    font-size: 4rem;
}

.report-hero-text h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: white;
}

.report-hero-text p {
    opacity: 0.85;
    font-size: 1rem;
}

.report-hero-stats {
    display: flex;
    gap: 30px;
}

.hero-stat {
    text-align: center;
    padding: 15px 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
}

.hero-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Export Main Grid */
.export-main-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.export-main-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--light);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.export-main-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.15);
}

.export-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.export-icon.pdf { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.export-icon.html { background: linear-gradient(135deg, #3498db, #2980b9); }
.export-icon.preview { background: linear-gradient(135deg, #9b59b6, #8e44ad); }

.export-info {
    flex: 1;
}

.export-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.export-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.export-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--light);
    color: var(--gray);
}

.export-badge.recommended {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.export-action {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.export-main-item:hover .export-action {
    transform: scale(1.1);
}

/* Contenu du rapport */
.report-contents {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--light);
    border-radius: 10px;
    transition: all 0.2s;
}

.content-item:hover {
    background: #e8e8e8;
}

.content-number {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.content-text {
    flex: 1;
}

.content-text strong {
    display: block;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 2px;
}

.content-text span {
    font-size: 0.85rem;
    color: var(--gray);
}

.content-check {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Export secondaire */
.export-secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.export-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    color: var(--dark);
}

.export-btn-secondary:hover {
    border-color: var(--primary);
    background: white;
    color: var(--primary);
}

.export-btn-secondary i {
    font-size: 1.2rem;
}

/* Score final card */
.score-final-card {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.score-final-card .card-body {
    padding: 0;
}

.score-final-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
}

.score-final-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--primary);
    flex-shrink: 0;
}

.score-final-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.score-final-label {
    font-size: 1rem;
    opacity: 0.7;
}

.score-final-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: white;
}

.score-final-info p {
    opacity: 0.85;
    line-height: 1.6;
}

.score-final-circle.excellent { border-color: var(--success); }
.score-final-circle.excellent .score-final-value { color: var(--success); }
.score-final-circle.bon { border-color: #3498db; }
.score-final-circle.bon .score-final-value { color: #3498db; }
.score-final-circle.optimiser { border-color: var(--warning); }
.score-final-circle.optimiser .score-final-value { color: var(--warning); }
.score-final-circle.risque { border-color: var(--danger); }
.score-final-circle.risque .score-final-value { color: var(--danger); }

/* ============================================
   Menu Utilisateur
   ============================================ */

/* Sources des données */
.sources-card {
    border-left: 4px solid var(--secondary);
}

.sources-info {
    padding: 10px 0;
}

.sources-intro {
    color: var(--gray);
    margin-bottom: 20px;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--light);
    border-radius: 10px;
    transition: all 0.2s;
}

.source-item:hover {
    background: #e0e0e0;
}

.source-icon {
    font-size: 1.8rem;
}

.source-content strong {
    display: block;
    color: var(--dark);
    margin-bottom: 3px;
}

.source-content span {
    font-size: 0.85rem;
    color: var(--gray);
}

.sources-update {
    color: var(--gray);
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid var(--light);
}

.badge-info {
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* ============================================
   Boutons et éléments IA
   ============================================ */
.btn-ai {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.btn-ai:hover {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.btn-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-google {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-google:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(66, 133, 244, 0.4);
}

.badge-ai {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* Bouton flottant IA */
.ai-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(99, 102, 241, 0.5);
    z-index: 999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.ai-fab:active {
    transform: scale(0.95);
}

/* Modal Chat IA */
.ai-chat-container {
    width: 450px;
    max-width: 95vw;
    height: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
}

.ai-chat-header {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.ai-chat-title i {
    font-size: 1.3rem;
}

.ai-chat-header .btn-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.ai-chat-header .btn-close:hover {
    background: rgba(255,255,255,0.3);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message .message-content {
    padding: 12px 16px;
    border-radius: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-message.assistant .message-content {
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chat-message .message-content.error {
    background: #fee2e2;
    color: #991b1b;
}

.ai-chat-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid var(--light);
    display: flex;
    gap: 10px;
}

.ai-chat-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--light);
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.ai-chat-input-container input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.ai-chat-input-container .btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-menu {
    position: relative;
    margin-left: 15px;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--light);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu-btn:hover {
    background: #e0e0e0;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-name-small {
    font-weight: 500;
    color: var(--dark);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-btn i.fa-chevron-down {
    font-size: 0.7rem;
    color: var(--gray);
    transition: transform 0.3s;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 250px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.dropdown-user-role {
    opacity: 0.9;
    font-size: 0.85rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--light);
    margin: 5px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--gray);
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout i {
    color: var(--danger);
}

.dropdown-item.logout:hover {
    background: #fdeaea;
}

/* ============================================
   Card Crédits Études
   ============================================ */

/* Logo MagicFit */
.logo-img {
    max-height: 45px;
    width: auto;
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--light);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Liste des projets */
.sidebar-projects {
    padding: 15px;
    border-bottom: 1px solid var(--light);
    max-height: 250px;
    overflow-y: auto;
}

.sidebar-projects h4 {
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.project-item:hover {
    background: #e0e0e0;
}

.project-item.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.project-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.project-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-date {
    font-size: 0.75rem;
    opacity: 0.7;
}

.project-item-status {
    margin-right: 8px;
}

.status-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.status-badge.draft { background: #fef3c7; color: #92400e; }
.status-badge.in_progress { background: #dbeafe; color: #1e40af; }
.status-badge.completed { background: #d1fae5; color: #065f46; }
.status-badge.exported { background: #e0e7ff; color: #3730a3; }

.project-item-actions button {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
    opacity: 0;
    transition: all 0.2s;
}

.project-item:hover .project-item-actions button {
    opacity: 1;
}

.project-item-actions button:hover {
    color: var(--danger);
}

.no-projects {
    text-align: center;
    padding: 20px;
    color: var(--gray);
}

.no-projects i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Competitor Card Google */
.competitor-card.google-result {
    border-left: 4px solid #4285f4;
}

.competitor-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f59e0b;
    font-weight: 600;
}

.competitor-rating span {
    color: var(--gray);
    font-weight: normal;
    font-size: 0.85rem;
}

.competitor-details .open { color: #22c55e; }
.competitor-details .closed { color: #ef4444; }

.credits-info-card {
    border-left: 4px solid #6366f1;
    margin-bottom: 20px;
}

.credits-info-card.unlimited {
    border-left-color: #22c55e;
}

.credits-info-card.empty {
    border-left-color: #ef4444;
}

.credits-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.credits-info-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.credits-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.credits-info-card.unlimited .credits-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.credits-info-card.empty .credits-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.credits-text h3 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    color: var(--dark);
}

.credits-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.credits-info-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.credits-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6366f1;
    min-width: 60px;
    text-align: center;
}

.credits-count.unlimited {
    color: #22c55e;
}

.credits-count.empty {
    color: #ef4444;
}

.btn-buy {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.export-badge.free {
    background: #dcfce7;
    color: #166534;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .swot-matrix {
        grid-template-columns: 1fr;
    }
    
    .business-plan-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .global-score-display {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .calc-row {
        flex-direction: column;
    }
    
    .calc-operator {
        transform: rotate(90deg);
    }
    
    .export-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
}
