/* ========================================
   FRANCE WEB SERVICES - CSS GLOBAL
   ======================================== */

/* Variables CSS centralisées */
:root {
    --blue-marine: #0a4275;
    --dark-gray: #333333;
    --light-blue: #1a73e8;
    --teal-metallic: #0d9488;
    --light-gray: #f0f0f0;
    --uk-red: #c8102e;
    --uk-blue: #012169;
    --footer-bg: #111827;
    --footer-text: #ffffff;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    top: 0 !important;
}

/* Couleurs principales */
.bg-blue-marine { background-color: var(--blue-marine); }
.text-blue-marine { color: var(--blue-marine); }
.text-blue-600 { color: var(--blue-marine); }
.border-blue-marine { border-color: var(--blue-marine); }
.bg-teal-metallic { background: linear-gradient(145deg, #0d9488, #0f766e); }
.text-uk-red { color: var(--uk-red); }
.bg-uk-red { background-color: var(--uk-red); }

/* Header et Navigation */
header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    z-index: 50;
    top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--blue-marine);
}

/* Menu styles */
.menu-item {
    transition: transform 0.3s ease;
    padding: 0.75rem;
}

.menu-item:hover {
    transform: translateY(-2px);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.subdropdown:hover .subdropdown-menu {
    display: block;
}

.dropdown-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 180px;
    z-index: 1000;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    padding: 8px 0;
}

.language-dropdown:hover .language-dropdown-menu {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.language-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.language-option img {
    width: 24px;
    margin-right: 10px;
}

/* Hero section */
.hero-section {
    background-image: linear-gradient(rgba(10, 66, 117, 0.6), rgba(10, 66, 117, 0.6));
    background-size: cover;
    background-position: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 73px;
}

/* Service cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Calculatrice flottante */
.calculator-widget {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 998;
    overflow: hidden;
    background: #f0f0f0;
    color: #333;
    transition: all 0.3s ease;
}

.calculator-widget.expanded {
    width: 280px;
    height: auto;
    min-height: 450px;
    max-height: none;
    border-radius: 16px;
}

.calculator-header {
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.calculator-widget.expanded .calculator-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calculator-body {
    padding: 15px;
    display: none;
}

.calculator-widget.expanded .calculator-body {
    display: block;
}

.calculator-display {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    padding: 12px;
    text-align: right;
    margin-bottom: 15px;
    border-radius: 8px;
    min-height: 50px;
    max-height: none;
    overflow: visible;
    word-wrap: break-word;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

.calculator-button {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 8px;
    color: #333;
    font-size: 1.1rem;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.calculator-button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.calculator-button.operator {
    background: rgba(0, 0, 0, 0.1);
}

.calculator-button.equals {
    background: rgba(0, 0, 0, 0.15);
}

.calculator-button.clear {
    background: rgba(255, 0, 0, 0.15);
}

.calculator-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
}

.calculator-widget.expanded .calculator-toggle {
    top: 10px;
    right: 10px;
    left: auto;
    transform: none;
}

/* Convertisseur de devises */
.currency-widget {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 998;
    overflow: hidden;
    background: #f0f0f0;
    color: #333;
    transition: all 0.3s ease;
}

.currency-widget.expanded {
    width: 320px;
    height: auto;
    min-height: 400px;
    max-height: none;
    border-radius: 16px;
}

.currency-header {
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.currency-widget.expanded .currency-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.currency-body {
    padding: 15px;
    display: none;
}

.currency-widget.expanded .currency-body {
    display: block;
}

.currency-input {
    margin-bottom: 10px;
}

.currency-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.currency-input input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.currency-input select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background-color: white;
}

.currency-result {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    min-height: 50px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.currency-convert-btn {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.currency-convert-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.currency-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.currency-toggle small {
    font-size: 0.7rem;
    margin-top: 3px;
}

.currency-widget.expanded .currency-toggle {
    top: 10px;
    right: 10px;
    left: auto;
    transform: none;
    width: auto;
    height: auto;
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 50%;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 999;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chatbot-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chatbot-container.open .chatbot-bubble {
    display: none;
}

.chatbot-container.open {
    width: 320px;
    height: 400px;
    border-radius: 10px;
    bottom: 20px;
    right: 20px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.chatbot-header {
    padding: 12px 15px;
    background: #555;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.chatbot-title {
    display: flex;
    align-items: center;
}

.chatbot-title i {
    margin-right: 8px;
}

.chatbot-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 250px;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 15px;
    max-width: 80%;
    word-break: break-word;
}

.bot-message {
    background: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background: #555;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chatbot-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: white;
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
}

.chatbot-input button {
    background: #555;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 2rem;
    padding-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: white;
}

/* Bouton retour haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 50px;
    height: 50px;
    background-color: var(--blue-marine);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 997;
    text-decoration: none;
}

.back-to-top:hover {
    background-color: #072e52;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Google Translate */
.skiptranslate {
    opacity: 0.01;
    height: 0;
    position: absolute;
    overflow: hidden;
}

.goog-te-banner-frame {
    display: none !important;
}

.goog-te-menu-value:hover {
    text-decoration: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

#google_translate_element {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }
    
    .calculator-widget, .currency-widget {
        display: none;
    }
    
    .chatbot-container {
        bottom: 90px;
        right: 20px;
        width: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Utilitaires Tailwind-like */
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.ml-1 { margin-left: 0.25rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.text-xl { font-size: 1.25rem; }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: bold; }
.font-medium { font-weight: 500; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-white { color: white; }
.bg-white { background-color: white; }
.rounded-lg { border-radius: 0.5rem; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.transition { transition: all 0.15s ease-in-out; }
.cursor-pointer { cursor: pointer; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.z-50 { z-index: 50; }
.w-full { width: 100%; }
.h-12 { height: 3rem; }
.object-cover { object-fit: cover; }
.border-t { border-top-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.hover\:text-blue-marine:hover { color: var(--blue-marine); }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }